Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-lcc!styx!ames!ucbcad!ucbvax!sdcsvax!sdchem!tps From: tps@sdchem.UUCP (Tom Stockfisch) Newsgroups: comp.lang.c Subject: Re: Function prototypes (was: miscellaneous unrelated stuff) Message-ID: <731@sdchema.sdchem.UUCP> Date: Tue, 5-May-87 00:29:58 EDT Article-I.D.: sdchema.731 Posted: Tue May 5 00:29:58 1987 Date-Received: Wed, 6-May-87 00:48:52 EDT References: <18346@ucbvax.BERKELEY.EDU> <7973@utzoo.UUCP> <796@rtech.UUCP> <1821@husc6.UUCP> <2023@bunker.UUCP> Sender: news@sdchem.UUCP Reply-To: tps@sdchemf.UUCP (Tom Stockfisch) Organization: UC San Diego Lines: 32 In article <2023@bunker.UUCP> hjg@bunker.UUCP (Harry J. Gross) writes: >In article <1821@husc6.UUCP> olson@endor.UUCP (Eric Olson) writes: >>.... So I can prototype >>everything in a header file included in all my modules, but then adding a >>module forces a complete re-make. > It's kind of kludgey (sp?), but if you _know_ that the only change to >the header was the addition of a prototype that is currently unused in any other >module, you could *touch* each of the other modules (.c and .obj). Then make >should leave them alone. > If there is a better way, I don't know what it is, BUT I SURE WOULD >LIKE TO!!! The way I handle it is to have my declaration/prototype header file contain *only* declarations/prototypes, and then I DON'T MENTION IT IN THE MAKEFILE. I can't think of a single case when this has caused a typing problem. The way you mess up in this case is to change a function's type in its module and forget to change it in the header file. Mentioning the header file in the "Makefile" doesn't catch this error. Header files with defines and macros are a different story and probably should be listed in dependency rules. I think it is a very bad mistake ever to "touch" source files. You are perverting information which you will probably need in the future even if you can't think why now. || Tom Stockfisch, UCSD Chemistry tps%chem@sdcsvax.ucsd.edu or sdcsvax!sdchem!tps