Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!bbn!bbn.com!rsalz From: rsalz@bbn.com (Rich Salz) Newsgroups: comp.unix.questions Subject: Re: help with make needed Message-ID: <1703@fig.bbn.com> Date: 26 Apr 89 18:13:03 GMT References: <19308@adm.BRL.MIL> Organization: BBN Systems and Technologies Corporation Lines: 32 In <19308@adm.BRL.MIL> dpaulso@relay.nswc.navy.mil writes: >In several makefiles I've seen the prerequisite `FRC' used, as in Makefile: FRC -@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@uunet.uu.net.