Path: utzoo!attcan!uunet!munnari.oz.au!csc!ccadfa!cjsv From: cjsv@ccadfa.adfa.oz.au (Christopher JS Vance) Newsgroups: comp.unix.wizards Subject: Re: rules for RCS in make Message-ID: <1185@ccadfa.adfa.oz.au> Date: 16 Mar 90 06:14:15 GMT References: <1990Mar15.172216.4674@max.sunysb.edu> Organization: Computer Centre, University College, UNSW, ADFA, Canberra, Australia Lines: 26 rosalia@max.sunysb.edu (Mark Galassi) writes: >Does anyone have a rule for make, so that any .c file will depend >on an RCS/file.c,v and it will be generated with "co file.c"? >I can do it by hand, for every .c file, but I would much prefer to >have a rule. Unfortunately the rule cannot be a simple one like >the .c from .o rule, because of the RCS/ prefix. If you're happy to keep your RCS files in the same directory as your object code, rather than a separate directory, the answer is fairly straightforward. RCS does not insist that the ,v files be in a different directory. I've done this, and have been reasonably happy with the result. | .c,v.o: | $(CO) $(COFLAGS) $< | $(CC) $(CCFLAGS) -c $< | -rm -f $< Or somethining similar (i.e., this is from non-recent memory). If you do want to keep your files in a separate directory, you could check whether your make understands VPATH. I've not tried this with RCS. If the manual doesn't mention VPATH, it may still be there (try strings ...).