[comp.unix.questions] make & RCS

nagel@paris.ics.uci.edu (Mark Nagel) (09/27/88)

Not having a make that knows about RCS is a real pain.  As far as I
can tell, I need to explicitly state dependencies between RCS/foo.c,v
and foo.c for all files in my project.  This works, but it has the
unpleasant side effect of spewing forth warnings about infinite
loops (because the dependencies go both ways -- one for checkin and
one for checkout).  I tried to set up default dependencies with
.SUFFIXES, but that didn't seem to work out too well either.  Somehow,
I feel there must be an easier way.  Can anyone suggest one to me?

-- 
Mark Nagel
Department of Information and Computer Science, UC Irvine
nagel@ics.uci.edu             (ARPA)            Graduate School:  It's not
{sdcsvax|ucbvax}!ucivax!nagel (UUCP)            just a job, it's an indenture.

maddog@anuck.UUCP (j.j.tupper) (09/29/88)

In article <752@paris.ics.uci.edu> nagel@paris.ics.uci.edu (Mark Nagel) writes:
>...  I tried to set up default dependencies with
>.SUFFIXES, but that didn't seem to work out too well either.  Somehow,
>I feel there must be an easier way.  Can anyone suggest one to me?

We get around that by not using RCS sub-directories (the ,v files are kept in
the same directory as the sources). Then a simple production for .c,v.c: works
fine.

We build our system from ,v files and only do checkins manually, therefore
our make system never has to do checkins (I can't help you with your
infinite loop problem).
		-maddog

jerryp@cmx.npac.syr.edu (Jerry Peek) (11/07/88)

[This posting was pretty old, but I figured I'd answer since no one else
did.  The disadvantages of reading news once a month, sigh...]

In article <752@paris.ics.uci.edu> nagel@paris.ics.uci.edu (Mark Nagel) writes:
> Not having a make that knows about RCS is a real pain.  As far as I
> can tell, I need to explicitly state dependencies between RCS/foo.c,v
> and foo.c for all files in my project.

When you say "that knows about RCS," do you mean your make doesn't have rules
like .c,v.c defined?  That's probably too simple an explanation.

Does your make understand .PREFIXES?  If it does, you can put the following
line in your makefile.  If make doesn't find a .c,v file in the current
directory, this tells it to check the ./RCS directory as well:

	.PREFIXES: ./RCS

You can add other directories (like /usr/project/RCS) at the end, too.

--Jerry Peek, Northeast Parallel Architectures Center, Syracuse, NY
  jerryp@cmx.npac.syr.edu
  +1 315 443-1722

nagel@paris.ics.uci.edu (Mark Nagel) (11/08/88)

In article <810@cmx.npac.syr.edu>, jerryp@cmx (Jerry Peek) writes:
|[This posting was pretty old, but I figured I'd answer since no one else
|did.  The disadvantages of reading news once a month, sigh...]
|
|In article <752@paris.ics.uci.edu> nagel@paris.ics.uci.edu (Mark Nagel) writes:
|> Not having a make that knows about RCS is a real pain.  As far as I
|> can tell, I need to explicitly state dependencies between RCS/foo.c,v
|> and foo.c for all files in my project.
|
|When you say "that knows about RCS," do you mean your make doesn't have rules
|like .c,v.c defined?  That's probably too simple an explanation.
|
|Does your make understand .PREFIXES?  If it does, you can put the following
|line in your makefile.  If make doesn't find a .c,v file in the current
|directory, this tells it to check the ./RCS directory as well:
|
|	.PREFIXES: ./RCS
|
|You can add other directories (like /usr/project/RCS) at the end, too.

Yes, I don't have a make that has builtin knowledge of the RCS
directory and rcs commands.  I received several replies about this
via email and almost all said "use gnumake".  I probably will end
up doing that.  I never did hear anything about the .PREFIXES
dependency, although I heard about the VPATH variable.  You can use
this to set a search path just like the shell PATH variable.
Interestingly enough, the system I'm developing on (Sun 4 with
SunOS 4.0) has a make that has the VPATH variable mentioned in strings
output, but it is not documented and it doesn't seem to work.  Like
I said, I'll probably start using gnumake, since this is only for
my own benefit -- the distributed program will use a different makefile.

Mark D. Nagel
  UC Irvine - Dept of Info and Comp Sci | The probability of someone
  nagel@ics.uci.edu             (ARPA)  | watching you is proportional to
  {sdcsvax|ucbvax}!ucivax!nagel (UUCP)  | the stupidity of your action.

thf@otter.hpl.hp.com (Toby Ferguson) (12/16/88)

I've heard about gnumake but don't know where to get it.  Can you tell me?