Xref: utzoo comp.lang.c:11617 comp.sys.ibm.pc:17653 Path: utzoo!attcan!uunet!peregrine!elroy!ames!pasteur!ucbvax!ucsfcgl!cgl.ucsf.edu!kneller From: kneller@cgl.ucsf.edu (Don Kneller) Newsgroups: comp.lang.c,comp.sys.ibm.pc Subject: Re: Automatic Function Prototype Generation Message-ID: <11067@cgl.ucsf.EDU> Date: 1 Aug 88 22:25:12 GMT References: <306@optilink.UUCP> Sender: daemon@cgl.ucsf.edu Reply-To: kneller@socrates.ucsf.edu.UUCP (Don Kneller) Organization: UCSF Computer Graphics Lab Lines: 24 In article <306@optilink.UUCP> cramer@optilink.UUCP (Clayton Cramer) writes: >Microsoft C has an option /Zg for automatic generation of function >prototypes. > >[ In makefiles ] this works (clumsily), but there are two problems: > >1. If you change a function definition in foo.c, and you have included >foo.e in foo.c, you will get complaints that will prevent a compile >from happening, and prevent a new foo.e from being produced. You can turn off the old prototypes with a conditional directive. Your .c.e rule can look like: .c.e: echo #ifndef NOPROTOTYPES > $*.tmp cl -AL -c -Zg -DNOPROTOTYPES $*.c >> $*.tmp echo #endif >> $*.tmp updexh $*.tmp $*.e ----- Don Kneller UUCP: ...ucbvax!ucsfcgl!kneller INTERNET: kneller@cgl.ucsf.edu BITNET: kneller@ucsfcgl.BITNET