RCS interface to make

Guy Harris guy at sun.uucp
Mon May 27 08:07:53 AEST 1985


> I usally make a new rule like:
> .c.c: 
> 	co $<
> at the beginning of the makefile and it will check out the sources when
> it finds that the .c file is not there.

Yes, but if you want to make "foo.o" and there is no explicit rule saying
"foo.o" depends on "foo.c", "make" will look for "foo.*" and, if it doesn't
find "foo.c" (not "foo.c,v" or "RCS/foo.c,v"), it'll say it doesn't know how
to make "foo.o".  The "augmented Make" solution (done by Ed Bradford at AT&T
BL Columbus and put into System III and later USDL UNIXes) has a rule that
says how to make "foo.o" from "s.foo.c".  Unfortunately, this means that if
you change the ".c.o" rule you also have to change the ".c~.o" rule to match
it; otherwise, if you make "foo.o" from "s.foo.c" it'll do the compilation
differently than it will if you make "foo.o" from "foo.c".

There is also code in the augmented Make which will "get" things
automatically, without using Make rules; this is only used to get the
Makefile from an SCCS version.  When I put RCS support into Make at CCI, I
ended up using that code for all checkouts and having Make know that if it
can make "foo.o" from "foo.c", it can also make it from "foo.c,v" or
"RCS/foo.c,v" if it checks "foo.c" out first.  That way, any changes to the
".c.o" rule will also take effect if it has to check the ".c" file out first.

	Guy Harris



More information about the Comp.unix mailing list