Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!cs.utexas.edu!milano!bigtex!pmafire!mike From: mike@pmafire.UUCP (mike caldwell) Newsgroups: comp.lang.c Subject: Re: C function prototyping and large projects Message-ID: <401@pmafire.UUCP> Date: 20 Sep 88 18:35:54 GMT References: <659.2333D240@stjhmc.fidonet.org> Reply-To: mike@pmafire.UUCP (mike caldwell) Organization: WINCO, INEL, Idaho Lines: 28 In article <659.2333D240@stjhmc.fidonet.org> will.summers@p6.f18.n114.z1.fidonet.org (will summers) writes: > > In article <24@motto.UUCP> russ@motto.UUCP (Russell Crook) writes: > >I guess it's possible to write a SED script to update the prototypes imbedded >in parse.h, but the script would need to "know" which .c files go with which >.h and so be package dependant. > >To keep the source conventional, .c files never #include .hp's directly. Only >.h's #include .hp's. > If you encased your SED script in a shell script that is passed the source .c file and the target .hp files then only the makefile would have to know the dependencies. As a quick, dirty example: In the makefile: parse1.hp: parse1.c shell_script parse1.c parse1.hp In shell_script: rm $2 sed -f SEDscript $1 >$2 or whatever.