|
|
1.1 root 1: #$Header: /usr/src/local/bin/rcs/src/RCS/Makefile,v 1.10 87/12/18 17:06:19 narten Exp $
2: # Copyright (C) 1982 by Walter F. Tichy
3: # Purdue University
4: # Computer Science Department
5: # West Lafayette, IN 47907
6: #
7: # All rights reserved. No part of this software may be sold or distributed
8: # in any form or by any means without the prior written permission of the
9: # author.
10: # Report problems and direct all inquiries to
11: # tichy@purdue, decvax!purdue!tichy
12: #
13: # INSTRUCTIONS
14: # ============
15: # 0. If you are porting to different hardware,
16: # check the instructions in rcsbase.h
17: #
18: # Note: instructions 1-5 are normally taken care of by the calling make,
19: # which passes in DIFF, DIFF3, RCSDIR, OLDDIR, OS, and LOCKING.
20: #
21: # 1. Early version of diff did not support options needed by RCS.
22: # Newer versions of diff, support them and diff is no longer distributed with
23: # RCS. The following definitions apply only if you have both old versions
24: # and new versions of diff, and you want RCS to use the new versions.
25: # The default should be :
26: #DIFF = /bin/diff
27: #DIFF3 = /usr/lib/diff3
28:
29: # Figure out where to put the modified diff and diff3 commands, and
30: # install them. (Read the instructions in the Make-files).
31: # Define the macros DIFF and DIFF3 accordingly (below).
32: DESTDIR =
33: DIFF = /bin/diff
34: DIFF3 = /usr/lib/diff3
35:
36: # 2. Figure out where to put the RCS commands; define RCSDIR accordingly.
37: RCSDIR = /usr/new
38: MERGE = $(RCSDIR)/merge
39:
40: # 3. Figure out where to put your old RCS commands; define OLDDIR
41: # accordingly. This is not needed if you don't have an old release of RCS.
42: OLDDIR = /usr/old/bin
43:
44: # 4. Set the operating system variable OS. If you run on 4.1 BSD, do not
45: # define OS:
46: # OS =
47: # If you run on USG Unix or UN*X, use:
48: # OS = -DUSG
49: # If you run on Version 6 Unix, use:
50: # OS = -DV6
51: # If you run on 4.2 or 4.3 BSD, use:
52: # OS = -DV4_2BSD
53: OS = -DV4_2BSD
54:
55: # 5. Decide whether you want strict locking as the default or not.
56: # If you want strict locking, use:
57: # LOCKING = 1
58: # otherwise:
59: # LOCKING = 0
60: LOCKING = 1
61:
62: # 6. Decide what loader flags you need, and define LDFLAGS accordingly.
63: # On the Vax you need none, on PDP-11s with split i/d you need -i.
64: #LDFLAGS = -i
65: LDFLAGS =
66:
67: # 7. RCS can maintain a log of the use of the co and ci commands. If you
68: # want the logging, you must
69: # a) define SNOOP (that's where the process that writes the log goes),
70: # b) define SNOOPFILE (that's the file where SNOOP writes the log;
71: # it must be owned by the same user that owns SNOOP),
72: # c) include SNOOP and SNOOPFILE in the CFLAGS macro.
73: # If you don't want the logging of command usage, omit the SNOOP and
74: # SNOOPFILE definitions from CFLAGS.
75: # The two variants of the CFLAG macros are given below.
76: SNOOPFILE = /usr/log/rcslog/log
77: SNOOP = /usr/local/bin/snoop
78:
79:
80: DEFINES= $(OS) -DSTRICT_LOCKING=$(LOCKING) -DDIFF='"${DESTDIR}$(DIFF)"' -DMERGE='"${DESTDIR}$(MERGE)"' -DTARGETDIR='"${DESTDIR}$(RCSDIR)"'
81: CFLAGS = -O $(DEFINES)
82: LINT = lint -c -u -Dlint $(DEFINES)
83:
84: # 8. If you don't have release 2 RCS files around (e.g., if you don't
85: # have release 2 of RCS), remove the word -DCOMPAT2 from whatever
86: # variant of CFLAGS you selected. -DCOMPAT2 assures that release 2
87: # RCS files can still be read. (After all release 2 RCS files have
88: # been updated with release 3 or 4 ci or rcs, you can remake RCS without
89: # -DCOMPAT2.) Also, make sure that the co commands at the end of this
90: # file are commented out; otherwise, Make will complain.
91: #
92: # 9. Now you are ready. Try to make 'all'. If all went well, make
93: # 'install' if you want no logging of command usage, 'installog' otherwise.
94: #
95: # 10. IMPORTANT! When you have RCS installed, rename old
96: # release 2 RCS files as follows (if you have any):
97: # If the working file was "f.c" and the RCS file "f.c.v", rename the
98: # RCS file to "f.c,v". If the working file was "f.c" and the RCS file
99: # "f.v", rename the RCS file "f.c,v". Thus, suffixes are no longer
100: # dropped and RCS files end in ",v" rather than ".v".
101: #
102: # 11. If you want to maintain RCS with itself, be sure you preserve the
103: # original revision numbers, dates, etc. This is done by checking the
104: # files in with the -k option. When done, remove the comments from the
105: # co-rules at the end of this file.
106: #
107: BCOMMANDS = ci ident rcs rcsdiff rcsmerge rlog co sccstorcs
108: # binary comands
109:
110: RCSCOMMANDS = merge $(BCOMMANDS)
111: # all commands
112:
113: SOURCES = ci.c co.c ident.c maketime.c partime.c rcs.c rcsdiff.c rcsedit.c\
114: rcsfcmp.c rcsfnms.c rcsgen.c rcskeep.c rcskeys.c rcslex.c rcsmerge.c\
115: rcsrev.c rcssyn.c rcsutil.c rlog.c snoop.c\
116: rcsbase.h time.h merge.sh sccstorcs.c
117:
118: BOBJECTS = ci.o co.o ident.o rcs.o rcsdiff.o rcsedit.o\
119: rcsfcmp.o rcsfnms.o rcsgen.o rcskeep.o rcskeys.o rcslex.o rcsmerge.o\
120: rcsrev.o rcssyn.o rcsutil.o rlog.o snoop.o\
121: rcssynTST.o rcsrevTST.o rcsfnmsTST.o rcsfcmpTST.o rcskeepTST.o \
122: sccstorcs.o
123:
124: all: $(RCSCOMMANDS)
125:
126: INSTALL = install
127:
128: $(BOBJECTS): rcsbase.h
129:
130: partime.o maketime.o co.o ci.o rcs.o rlog.o rcsutil.o: time.h
131:
132: install: all
133: # Save the old commands if you have any.
134: # -cd ${DESTDIR}$(RCSDIR); mv $(RCSCOMMANDS) ${DESTDIR}$(OLDDIR)
135: ${INSTALL} -m 775 -o bin -g bin -s ci ${DESTDIR}$(RCSDIR)
136: ${INSTALL} -m 775 -o bin -g bin -s ident ${DESTDIR}$(RCSDIR)
137: ${INSTALL} -m 775 -o bin -g bin -s rcs ${DESTDIR}$(RCSDIR)
138: ${INSTALL} -m 775 -o bin -g bin -s rcsdiff ${DESTDIR}$(RCSDIR)
139: ${INSTALL} -m 775 -o bin -g bin -s rcsmerge ${DESTDIR}$(RCSDIR)
140: ${INSTALL} -m 775 -o bin -g bin -s rlog ${DESTDIR}$(RCSDIR)
141: ${INSTALL} -m 775 -o bin -g bin -s co ${DESTDIR}$(RCSDIR)
142: ${INSTALL} -m 775 -o bin -g bin -c merge ${DESTDIR}$(RCSDIR)
143: # ${INSTALL} -m 775 -o bin -g bin -c rcsclean ${DESTDIR}$(RCSDIR)
144: # ${INSTALL} -m 775 -o bin -g bin -c rcsfreeze.sh ${DESTDIR}${RCSDIR}/rcsfreeze
145: ${INSTALL} -m 775 -o bin -g bin -c sccstorcs ${DESTDIR}$(RCSDIR)
146:
147: installog: installsnoop install
148:
149: installsnoop: snoop
150: install -s snoop ${DESTDIR}$(SNOOP)
151: chmod u+s ${DESTDIR}$(SNOOP)
152: touch ${DESTDIR}$(SNOOPFILE)
153: chmod 644 ${DESTDIR}$(SNOOPFILE)
154: # CAUTION: You may have to do a chown of SNOOP and SNOOPFILE (if not owned by root).
155: lint: ci.lint co.lint ident.lint rlog.lint rcs.lint rcsdiff.lint rcsmerge.lint snoop.lint
156:
157: clean:
158: -rm -f *.o; rm -f $(RCSCOMMANDS) snoop
159:
160: CIFILES = ci.o rcslex.o rcssyn.o rcsgen.o rcsedit.o rcskeys.o rcsrev.o rcsutil.o rcsfnms.o partime.o maketime.o rcskeep.o rcsfcmp.o
161:
162: CISRC = ci.c rcslex.c rcssyn.c rcsgen.c rcsedit.c rcskeys.c rcsrev.c rcsutil.c rcsfnms.c partime.c maketime.c rcskeep.c rcsfcmp.c
163:
164: ci.lint:
165: $(LINT) $(CISRC)
166:
167: ci: $(CIFILES)
168: cc $(LDFLAGS) -o ci $(CIFILES)
169:
170: COFILES = co.o rcslex.o rcssyn.o rcsgen.o rcsedit.o rcskeys.o rcsrev.o rcsutil.o rcsfnms.o partime.o maketime.o
171:
172: COSRC = co.c rcslex.c rcssyn.c rcsgen.c rcsedit.c rcskeys.c rcsrev.c rcsutil.c rcsfnms.c partime.c maketime.c
173: co.lint:
174: $(LINT) $(COSRC)
175: co: $(COFILES)
176: cc $(LDFLAGS) -o co $(COFILES)
177:
178: ident: ident.o rcskeys.o
179: cc -o ident ident.o rcskeys.o
180:
181: ident.lint:
182: $(LINT) ident.c rcskeys.c
183:
184: merge: merge.sh
185: sed -e '/^#/d' -e 's:DIFF3=.*$$:DIFF3=$(DIFF3):' merge.sh > merge
186: # This takes out the comment lines and substitutes in DIFF3.
187: # (Comments are not permitted in some older shells.)
188: chmod 755 merge
189:
190: RLOG = rlog.o rcslex.o rcssyn.o rcsrev.o rcsutil.o partime.o maketime.o rcsfnms.o
191: RLOGSRC = rlog.c rcslex.c rcssyn.c rcsrev.c rcsutil.c partime.c maketime.c rcsfnms.c
192: rlog: $(RLOG)
193: cc $(LDFLAGS) -o rlog $(RLOG)
194:
195: rlog.lint:
196: $(LINT) $(RLOGSRC)
197:
198: RCS = rcs.o rcslex.o rcssyn.o rcsrev.o rcsutil.o rcsgen.o rcsedit.o rcskeys.o rcsfnms.o
199:
200: RCSSRC = rcs.c rcslex.c rcssyn.c rcsrev.c rcsutil.c rcsgen.c rcsedit.c rcskeys.c rcsfnms.c
201: rcs: $(RCS)
202: cc $(LDFLAGS) -o rcs $(RCS)
203:
204: rcs.lint:
205: $(LINT) $(RCSSRC)
206:
207: rcsclean: rcsclean.sh
208: sed -e '/^#/d' rcsclean.sh > rcsclean
209: # This takes out the comments (not permitted in older shells).
210: chmod 755 rcsclean
211:
212: RCSDIFF = rcsdiff.o rcsutil.o rcsfnms.o rcsrev.o rcssyn.o rcslex.o
213: RCSDIFFSRC = rcsdiff.c rcsutil.c rcsfnms.c rcsrev.c rcssyn.c rcslex.c
214:
215: rcsdiff: $(RCSDIFF)
216: cc -o rcsdiff $(RCSDIFF)
217:
218: rcsdiff.lint:
219: $(LINT) $(RCSDIFFSRC)
220: RCSMERGE = rcsmerge.o rcsutil.o rcsfnms.o rcsrev.o rcssyn.o rcslex.o
221: RCSMERGESRC = rcsmerge.c rcsutil.c rcsfnms.c rcsrev.c rcssyn.c rcslex.c
222: rcsmerge: $(RCSMERGE)
223: cc -o rcsmerge $(RCSMERGE)
224: rcsmerge.lint:
225: $(LINT) $(RCSMERGESRC)
226:
227: snoop: snoop.o
228: cc -o snoop snoop.o
229: snoop.lint:
230: $(LINT) snoop.c
231:
232: SCCSTORCS= sccstorcs.o
233: SCCSTORCSSRC = sccstorcs.c
234:
235: sccstorcs: $(SCCSTORCS)
236: cc -o $@ $(SCCSTORCS)
237:
238: sccstorcs.lint:
239: $(LINT) $(SCCSTORCSSRC)
240:
241: SOURCE= ci.c co.c curdir.c ident.c maketime.c partime.c rcs.c \
242: rcsclean.c rcsdiff.c rcsedit.c rcsfcmp.c rcsfnms.c rcsgen.c \
243: rcskeep.c rcskeys.c rcslex.c rcsmerge.c rcsrev.c rcssyn.c rcsutil.c \
244: rlog.c snoop.c sccstorcs.c
245:
246: HFILES= rcsbase.h time.h
247:
248: depend: ${SOURCE} ${HFILES}
249: mkdep ${CFLAGS} ${SOURCE}
250:
251: # DO NOT DELETE THIS LINE -- mkdep uses it.
252: # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
253:
254: ci.o: ci.c rcsbase.h /usr/include/stdio.h /usr/include/sys/types.h
255: ci.o: /usr/include/sys/stat.h time.h
256: co.o: co.c rcsbase.h /usr/include/stdio.h time.h /usr/include/sys/types.h
257: co.o: /usr/include/sys/stat.h
258: curdir.o: curdir.c rcsbase.h /usr/include/stdio.h /usr/include/sys/param.h
259: curdir.o: /usr/include/sys/types.h /usr/include/signal.h
260: curdir.o: /usr/include/machine/trap.h /usr/include/machine/machparam.h
261: curdir.o: /usr/include/sys/stat.h /usr/include/sys/dir.h
262: ident.o: ident.c rcsbase.h /usr/include/stdio.h
263: maketime.o: maketime.c rcsbase.h /usr/include/stdio.h time.h
264: maketime.o: /usr/include/sys/types.h /usr/include/sys/timeb.h
265: partime.o: partime.c /usr/include/stdio.h /usr/include/ctype.h time.h
266: rcs.o: rcs.c /usr/include/sys/types.h /usr/include/sys/stat.h rcsbase.h
267: rcs.o: /usr/include/stdio.h
268: rcsclean.o: rcsclean.c rcsbase.h /usr/include/stdio.h
269: rcsdiff.o: rcsdiff.c /usr/include/ctype.h rcsbase.h /usr/include/stdio.h
270: rcsedit.o: rcsedit.c rcsbase.h /usr/include/stdio.h
271: rcsfcmp.o: rcsfcmp.c rcsbase.h /usr/include/stdio.h
272: rcsfnms.o: rcsfnms.c rcsbase.h /usr/include/stdio.h /usr/include/sys/types.h
273: rcsfnms.o: /usr/include/sys/stat.h /usr/include/sys/dir.h
274: rcsgen.o: rcsgen.c rcsbase.h /usr/include/stdio.h
275: rcskeep.o: rcskeep.c rcsbase.h /usr/include/stdio.h
276: rcskeys.o: rcskeys.c rcsbase.h /usr/include/stdio.h
277: rcslex.o: rcslex.c rcsbase.h /usr/include/stdio.h /usr/include/varargs.h
278: rcsmerge.o: rcsmerge.c rcsbase.h /usr/include/stdio.h
279: rcsrev.o: rcsrev.c rcsbase.h /usr/include/stdio.h
280: rcssyn.o: rcssyn.c rcsbase.h /usr/include/stdio.h
281: rcsutil.o: rcsutil.c /usr/include/sys/types.h /usr/include/sys/stat.h
282: rcsutil.o: /usr/include/signal.h /usr/include/machine/trap.h rcsbase.h
283: rcsutil.o: /usr/include/stdio.h /usr/include/pwd.h
284: rlog.o: rlog.c time.h rcsbase.h /usr/include/stdio.h
285: snoop.o: snoop.c rcsbase.h /usr/include/stdio.h
286: sccstorcs.o: sccstorcs.c /usr/include/stdio.h
287:
288: # IF YOU PUT ANYTHING HERE IT WILL GO AWAY
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.