SCCS unedit

michael maxwell michaelm at bcsaic.UUCP
Fri Jan 24 07:36:14 AEST 1986


Is there a quick way to get SCCS to unedit all files which haven't been
modified?  My problem is this: I do an SCCS edit of the SCCS directory, which
has on the order of 20 files.  I do some testing of the system defined by
these files, in the process modifying *some* of them.  When I get done, I want
SCCS to delta the modified ones, but just unedit the others.

What I do now is to run sccs diffs on all 20 files.  If the file has been
changed, I inform the user (me) of the changes and delta it, letting the user
supply the comment; otherwise I just unedit the file.  The trouble is that
some of these files are quite long, and it takes a long time to run sccs
diffs.  It occurred to me that I could examine the time of last modification
of the p-file and the "gotten" file, and only run sccs diffs if the gotten
file has a later date of modification.  It then occurred to me that this is
what "make" is supposed to do, and maybe I could get "make" to do all this for
me.  Now if I just had one or two files, I suppose the Makefile could have 
entries like this ("p.foo" is in the directory SCCS, and "foo" is in the next 
higher directory; the Makefile is assumed to be in the SCCS dir):

p.foo: ../foo
	-if `sccs diffs ../foo` ; \
	sccs unedit ../foo ; \
	else ; \
	sccs delta ../foo ; \
	fi

The problem is, I have 20 or so files, and add a new file from time to time;
so I would have to add a new procedure in my Makefile each time I add a new 
file.  This looks like what make's implicit rules for suffixes were made for, 
except that this time it's a prefix (p.), not a suffix, and there are no
implicit rules for prefixes.

Am I missing something?  Or should I just bite the bullet and use 
"find -name -newer" with "for[each]" in a [c]shell script to create my own
version of make?
-- 
Mike Maxwell
Boeing Artificial Intelligence Center
	...uw-beaver!uw-june!bcsaic!michaelm



More information about the Comp.unix mailing list