help with make needed

Rich Salz rsalz at bbn.com
Thu Apr 27 04:13:03 AEST 1989


In <19308 at adm.BRL.MIL> dpaulso at relay.nswc.navy.mil writes:

>In several makefiles I've seen the prerequisite `FRC' used, as in
	Makefile:	FRC
		- at if echo "Makefile: $(TARGET) ; @/bin/false" | make -qf - ; \
		then rm -f $(TARGET) ; fi
>but i've not seen any reference to `FRC' in TFM.  any hints as to what
>it means and/or does?

What missing from the above example is this line in the Makefile.
	FRC:

What we're doing is saying the Makefile depends on FRC, a file that
(presumably) doesn't exist.  We tell make how to make FRC:  it has
no dependants, and you don't do anything.  This means, in essence, every
time make checks on Makefile, it checks on FRC, sees it doesn't exist,
does nothing to build it, but notes that everything that depends on it
is now out of date.

In short, it's a way of forcing something to always be rebuilt.  Sometimes
you see tricks like making "/tmp" be the dependant instead of FRC, since
/tmp is something that exists and, hopefully, getting modified often.
There's other tricks, too, but they basically come down to variations on
these two practices.

I first saw the FRC convention get widespread notice when ATT released the
SystemV "Augmented make" (the one that uses .c~ to represent SCCS files).

This isn't the clearest language in the world, sorry.
	/r$
-- 
Please send comp.sources.unix-related mail to rsalz at uunet.uu.net.



More information about the Comp.unix.questions mailing list