[comp.lang.c] Using RCS and make

mrt7455@evtprp0b (Michael R Tucker) (06/04/90)

	I am looking into using RCS for version control of my software 
projects.  I would like to know how to use RCS and make together.  If any
one can help me, I'd sure appreciate it.  I would like to see an example 
makefile using RCS.

nboogaar@ruunsa.fys.ruu.nl (Martin v.d. Boogaard) (06/05/90)

In <137@evtprp0b.UUCP> mrt7455@evtprp0b (Michael R Tucker) writes:


> I would like to see an example makefile using RCS.

(Not really a question for comp.lang.c., but...)

Try GNU Make. If any file foo.x doesn't exist, GNU Make will check whether
it can find a file foo.x,v or ./RCS/foo.x,v. If one of these exists it will be
checked out before Make proceeds with the next step towards the target.
There is no need to specify anything extra in your Makefile. It only takes one
weekend to read the GNU Make manual.


Martin J. van den Boogaard         | Dept. of Atomic & Interface Physics
                                   | Debye Institute--Utrecht University
P.O. Box 80.000                    |
NL-3508 TA  Utrecht                | decnet:   ruunsc::boogaard
the Netherlands                    | bitnet:   boogaard@hutruu51
+31 30 532904                      | internet: nboogaar@fys.ruu.nl

ghoti+@andrew.cmu.edu (Adam Stoller) (06/05/90)

I don't remember where this was originally posted - but perhaps it might
help you.  As I only have a printed copy of the message - I hope I
haven't made any typos - re-typing it.  I also have not yet had the time
to try this out (so please don't attribute any flames or credit to me)

--fish
________________

From: jeff@samna.uucp (Jeff Barber)
Subject: RCS and makefiles (Was Re: Advantages of SCCS?)
Date: 11 May 90 15:01:36 GMT

[.....]
How about adding this at the begining of your makefile (or add it to the
default rules if you have the source to make).

---------------- Cut Here ----------------
.SUFFIXES:	.c,v .h,v .h
CO =		co
COFLAGS =	

.h,v.h:	;	$(CO) $(COFLAGS) $<

.c,v.c:	;	$(CO) $(COFLAGS) $<

.c,v.o	;	$(CO) $(COFLAGS) $<
		$(CC) $(CFLAGS) -c $*.c
		rm -f $*.c

.c,v:	;	$(CO) $(COFLAGS) $<
		$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $*.c
		rm -f $*.c
---------------- Cut Here ----------------