Cake (was Recursive #includes)

Leo de Wit leo at philmds.UUCP
Sun Mar 5 22:24:32 AEST 1989


In article <20078 at santra.UUCP> alo at hut.fi (Antti Louko) writes:
|When I saw cake first time, it seemed just fine. But after a while I
|realized one thing. After that I haven't used cake anymore.
|
|Lets have an Cakefile:
|
|$ cat Cakefile
|vax:	/dev/null
|	cp /dev/null vax
|
|$ cake
|cp /dev/null 1
|$
|
|Funny, uh? If you have a SUN, replace "vax" with "sun".

How about undefining some predefined macros?
This one is for Ultrix 2.0:

/lib/cpp -Uunix -Ubsd4_2 -Uultrix -Uvax -U__LINE__ -U__FILE__ makefile

Of course, if you want to use those names also for conditional make
rules inclusion, you're out of luck. But so you are if you try to
declare 'vax' as a variable in a C program! From this viewpoint and
to enhance cakefile portability I would prefer to leave them #defined
and refrain from using targets like 'vax', etc.

(B.T.W. I found those macros using 'strings -2 /lib/cpp')

    Leo.



More information about the Comp.lang.c mailing list