Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!ames!ucbcad!ucbvax!sdcsvax!sdchem!tps From: tps@sdchem.UUCP Newsgroups: comp.lang.c Subject: Re: Function prototypes (was: miscellaneous unrelated stuff) Message-ID: <733@sdchema.sdchem.UUCP> Date: Wed, 6-May-87 17:27:18 EDT Article-I.D.: sdchema.733 Posted: Wed May 6 17:27:18 1987 Date-Received: Fri, 8-May-87 04:35:08 EDT References: <18346@ucbvax.BERKELEY.EDU> <7973@utzoo.UUCP> Sender: news@sdchem.UUCP Reply-To: tps@sdchemf.UUCP (Tom Stockfisch) Organization: UC San Diego Lines: 31 In article <839@kodak.UUCP> grodberg@kodak.UUCP (Jeremy Grodberg) writes: >In article <731@sdchema.sdchem.UUCP> tps@sdchemf.UUCP (Tom Stockfisch) writes: >>The way I handle (keeping function prototypes up to date without having make >do complete recompiles) is to have my declaration/prototype header file contain >>*only* declarations/prototypes, and then I DON'T MENTION IT IN THE MAKEFILE. > There is an other way you mess up using Tom's method, which is a serious >drawback.... For example, if you have function foo that calls function bar, and >change bar's type from float to double, you won't hear about the fact that >you forgot to change foo's function call until you have some other reason >to recompile foo. It is very unlikely that you would not change foo() if you changed bar(). For instance, if you change bar() from float to double, you will probably change foo to double as well. If you don't change anything in foo.c, then you will have to remember to 'rm foo.o' before the re-make. When I make a bunch of type changes (which occurs very infrequently) I sometimes 'rm *.o' just to be safe. I don't agree that my method has a "serious drawback" when I have used it for several years in working with makefiles, I rarely waste time doing recompiling all source files, and I have to spend very little time thinking about when an object file will become truly out of date. || Tom Stockfisch, UCSD Chemistry tps%chem@sdcsvax.ucsd.edu or sdcsvax!sdchem!tps