C function prototyping and large projects

mike caldwell mike at pmafire.UUCP
Wed Sep 21 04:35:54 AEST 1988


In article <659.2333D240 at stjhmc.fidonet.org> 
will.summers at p6.f18.n114.z1.fidonet.org (will summers) writes:
>
> In article <24 at motto.UUCP> russ at 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.



More information about the Comp.lang.c mailing list