Question about RCS check-in
John G Dobnick
jgd at csd4.csd.uwm.edu
Wed Jun 27 16:19:55 AEST 1990
>From article <1990Jun22.212249.6130 at sq.sq.com>, by lee at sq.sq.com (Liam R. E. Quin):
> shaw at hpihoah.HP.COM (Joy-lim Shaw) and others suggest:
>> [...]
>> You can use:
>> $(SRCS): $(RCSDIR)/$$@,v
>> @$(CO) $(COFLAGS) $@
>>in your makefiles to checkout files only if their corresponding RCS file
>>is newer
> The obvious problem is that a change to the date of the ,v file does not
> necessarily reflect a change to the actual source file.
>
> One way round this is to have a shell script "cocmp", say, that does a
> co followed by a cmp, and only overwrites the source file if the version
> checked out was different. [...]
>
> Has anyone done this?
Strangely enough, yes. In the copy of RCS I obtained (Version 4, from
Purdue or from uunet), there is an 'rcsclean' program that does exactly
this. Manpage extract follows:
^->RCSCLEAN(L) UNIX Programmer's Manual RCSCLEAN(L)
^->
^->NAME
^-> rcsclean - clean up working files
^->
[...]
^->
^->DESCRIPTION
^-> Rcsclean removes working files that were checked out and
^-> never modified. For each file given, rcsclean compares the
^-> working file and a revision in the corresponding RCS file.
^-> If it finds no difference, it removes the working file, and,
^-> if the revision was locked by the caller, unlocks the revi-
^-> sion.
^->
[...]
^->
^->EXAMPLES
^-> The command
^->
^-> rcsclean *.c *.h
^->
^-> removes all working files ending in ".c" or ".h" that were
^-> not changed since their checkout.
[...]
--
John G Dobnick (JGD2)
Computing Services Division @ University of Wisconsin - Milwaukee
INTERNET: jgd at csd4.csd.uwm.edu ATTnet: (414) 229-5727
UUCP: uunet!uwm!csd4.csd.uwm.edu!jgd
"Knowing how things work is the basis for appreciation,
and is thus a source of civilized delight." -- William Safire
More information about the Comp.unix.wizards
mailing list