make -d work for clean/info/check etc.
[unix-history] / usr / src / usr.bin / sccs / sccs.1
CommitLineData
a2a3f7d9 1.TH SCCS LOCAL
39ae1365
EA
2.SH NAME
3sccs \- front end for the
4.SM SCCS
5subsystem
6.SH SYNOPSIS
7.B sccs
8[
9.B \-r
10] [
11.BI \-p path
e5b52011
EA
12] [
13.BI \-d path
39ae1365
EA
14] command [ flags ] [ args ]
15.SH DESCRIPTION
16.I Sccs
17is a front end
2de7ab2b
EA
18to the
19.SM SCCS
20programs
21that help them mesh more cleanly
39ae1365 22with the rest of UNIX.
af83554c
EA
23It also includes the capability to run
24``set user id'' to another user
25to provide additional protection.
39ae1365
EA
26.PP
27Basically,
28.I sccs
29runs the
30.I command
31with the specified
32.I flags
33and
34.I args.
35Each
36argument
37is modified to be prepended
324bd523 38with ``SCCS/s.''
e5b52011
EA
39unless
40it specifies a directory
41or the final component
42of the pathname
43begins with ``s.''.
39ae1365
EA
44.PP
45Flags to be interpreted by the
46.I sccs
47program must be before the
48.I command
49argument.
50Flags to be passed to the actual
51.SM SCCS
52program
53must come after the
54.I command
55argument.
56These flags are specific to the command
57and are discussed in the documentation for that command.
58.PP
9e6171bb
EA
59Besides the usual
60.SM SCCS
61commands,
62several ``pseudo-commands'' can be issued.
63These are:
94d25808
EA
64.IP edit 1i
65Equivalent to ``get \-e''.
66.IP delget
9e6171bb
EA
67Perform a delta on the named files
68and then get new versions.
69The new versions will have id keywords expanded,
70and will not be editable.
b7991d06 71.IP deledit
94d25808
EA
72Equivalent to ``delget'' except that the
73``get'' phase includes the ``\-e'' flag.
74This option is useful for making a ``checkpoint''
75of your current editting phase.
9e6171bb
EA
76.IP fix
77Must be followed by a
78.B \-r
79flag.
80This command essentially removes the named delta,
81but leaves you with a copy of the delta
82with the changes that were in it.
83It is useful for fixing small compiler bugs, etc.
84Since it doesn't leave audit trails,
85it should be used carefully.
86.IP clean
87Takes no arguments.
88This routine removes everything from the current directory
89that can be recreated from SCCS files.
90It will not remove any files being editted.
9ef9beda
EA
91.IP unedit
92This is the opposite of an ``edit''
93or a ``get \-e''.
94It should be used with extreme caution,
95since any changes you made since the get
96will be irretrievably lost.
94d25808
EA
97.IP info
98Gives a listing of all files being editted.
a2a3f7d9
EA
99.IP check
100Like ``info''
101except that nothing is printed if nothing is being edited,
102and a non-zero exit status is returned if anything
103is being edited.
104The intent is to have this included in an ``install''
105entry in a makefile
106to insure that everything is included into the
107.SM SCCS
108file
109before a version is installed.
9e6171bb 110.PP
39ae1365
EA
111The
112.B \-r
113flag runs
114.I sccs
115as the real user
af83554c
EA
116rather than as whatever effective user
117.I sccs
118is ``set user id'' to.
39ae1365
EA
119The
120.B \-p
70caf673
EA
121flag defines the pathname of the directory
122in which
39ae1365 123.SM SCCS
70caf673
EA
124will be found;
125``SCCS'' is the default.
e5b52011
EA
126The
127.B \-d
128flag gives a base directory
129for the pathname search;
130it differs from
131.B \-p
132in that the
133.B \-d
134argument is prepended to the entire pathname
135and the
136.B \-p
137argument is inserted before the final component of the
138pathname.
139For example,
140``sccs -d/x -py get a/b''
141will convert to
142``get /x/a/y/s.b''.
143The intent here is to create aliases such as
144``alias syssccs sccs -d/usr/src''
145which will be used as
146``syssccs get cmd/who.c''.
70caf673
EA
147.PP
148Certain commands (such as
149.IR admin )
af83554c
EA
150cannot be run ``set user id'' by all users,
151since this would allow anyone to change the authorizations.
152These commands are always run as the real user.
39ae1365
EA
153.SH EXAMPLES
154.de BX
155.nf
156.in +0.5i
157.sp 0.3
158..
159.de EX
160.fi
161.in -0.5i
162.sp 0.3
163..
164To get a file for editting,
165edit it,
166and produce a new delta:
167.BX
2de7ab2b
EA
168sccs get \-e file.c
169ex file.c
170sccs delta file.c
39ae1365
EA
171.EX
172To get a file from another directory:
173.BX
2de7ab2b 174sccs \-p/usr/src/sccs/s. get cc.c
39ae1365
EA
175.EX
176or
177.BX
2de7ab2b 178sccs get /usr/src/sccs/s.cc.c
39ae1365
EA
179.EX
180To make a delta of a large number of files
181in the current directory:
182.BX
2de7ab2b 183sccs delta *.c
39ae1365
EA
184.EX
185In a makefile, to get source files
186from an
187.SM SCCS
188file if it does not already exist:
189.BX
190SRCS = <list of source files>
191OBJS = <list of object files>
192.sp 0.4
193$(OBJS): $(SRCS)
194.sp 0.4
70caf673
EA
195$(SRCS):
196 sccs get $(REL) $@
39ae1365
EA
197.EX
198.SH "SEE ALSO"
199admin(SCCS),
200chghist(SCCS),
201comb(SCCS),
202delta(SCCS),
203get(SCCS),
204help(SCCS),
205prt(SCCS),
206rmdel(SCCS),
207sccsdiff(SCCS),
208what(SCCS),
39ae1365 209.SH AUTHOR
2de7ab2b 210Eric Allman (ingres:eric)
39ae1365
EA
211.SH DISCLAIMER
212Since it is not yet clear
213what this program should do,
214it should not be considered
215a stable program product.
216Please send any
217constructive suggestions
2de7ab2b 218to ingres:eric.