home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / CMDS / rcs4.lha / makefile.orgosk < prev    next >
Makefile  |  1993-03-03  |  11KB  |  339 lines

  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   = /h0/usr/cmds/
  33. DIFF      = diff
  34. DIFF3     = diff3
  35.  
  36. # 2.  Figure out where to put the RCS commands; define RCSDIR accordingly.
  37. RCSDIR    = /h0/usr/cmds
  38. MERGE     = 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        =
  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   = 0
  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  = -ix -l=/h0/lib/os9lib.l
  65.  
  66. # 7.  RCS can maintain a log of the use of the co and ci commands. If you
  67. #     want the logging, you must
  68. #     a) define SNOOP (that's where the process that writes the log goes),
  69. #     b) define SNOOPFILE (that's the file where SNOOP writes the log;
  70. #        it must be owned by the same user that owns SNOOP),
  71. #     c) include SNOOP and SNOOPFILE in the CFLAGS macro.
  72. #     If you don't want the logging of command usage, omit the SNOOP and
  73. #     SNOOPFILE definitions from CFLAGS.
  74. #     The two variants of the CFLAG macros are given below.
  75. #SNOOPFILE = /usr/log/rcslog/log
  76. #SNOOP    = /usr/local/bin/snoop
  77.  
  78.  
  79. DEFINES= $(OS) -DSTRICT_LOCKING=$(LOCKING) -DDIFF='"${DESTDIR}$(DIFF)"' -DMERGE='"${DESTDIR}$(MERGE)"' -DTARGETDIR='"$(RCSDIR)"'
  80. CFLAGS    = -ixqt=/dd $(DEFINES)
  81. LINT = lint -c -u  -Dlint $(DEFINES)
  82. SHELL= sh
  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 rcsident rcs rcsdiff rcsmerge rlog co
  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 
  117.  
  118. BOBJECTS = ci.r co.r ident.r rcs.r rcsdiff.r rcsedit.r\
  119.     rcsfcmp.r rcsfnms.r rcsgen.r rcskeep.r rcskeys.r rcslex.r rcsmerge.r\
  120.     rcsrev.r rcssyn.r rcsutil.r rlog.r snoop.r\
  121.     rcssynTST.r rcsrevTST.r rcsfnmsTST.r rcsfcmpTST.r rcskeepTST.r
  122.  
  123. all:    $(RCSCOMMANDS)
  124.  
  125. INSTALL = install
  126.  
  127. $(BOBJECTS):    rcsbase.h
  128.  
  129. partime.r maketime.r co.r ci.r rcs.r rlog.r rcsutil.r:        time.h
  130.  
  131. install:    all 
  132. #    Save the old commands if you have any.
  133. #    -cd ${DESTDIR}$(RCSDIR); mv $(RCSCOMMANDS) ${DESTDIR}$(OLDDIR)
  134. #    ${INSTALL} -m 775 -o root -s ci ${DESTDIR}$(RCSDIR)
  135. #    ${INSTALL} -m 775 -o root -s rcsident ${DESTDIR}$(RCSDIR)
  136. #    ${INSTALL} -m 775 -o root -s rcs ${DESTDIR}$(RCSDIR)
  137. #    ${INSTALL} -m 775 -o root -s rcsdiff ${DESTDIR}$(RCSDIR)
  138. #    ${INSTALL} -m 775 -o root -s rcsmerge ${DESTDIR}$(RCSDIR)
  139. #    ${INSTALL} -m 775 -o root -s rlog ${DESTDIR}$(RCSDIR)
  140. #    ${INSTALL} -m 775 -o root -s co ${DESTDIR}$(RCSDIR)
  141. #    ${INSTALL} -m 775 -o root -c merge ${DESTDIR}$(RCSDIR)
  142. #    ${INSTALL} -m 775 -o root -c rcsclean ${DESTDIR}$(RCSDIR)
  143. #    ${INSTALL} -m 775 -o root -c rcsfreeze.sh ${DESTDIR}${RCSDIR}/rcsfreeze
  144.  
  145. installog:    installsnoop install
  146.  
  147. installsnoop:    snoop
  148. #    install -s snoop ${DESTDIR}$(SNOOP)
  149. #    chmod u+s ${DESTDIR}$(SNOOP)
  150. #    touch ${DESTDIR}$(SNOOPFILE)
  151. #    chmod 644 ${DESTDIR}$(SNOOPFILE)
  152. # CAUTION: You may have to do a chown of SNOOP and SNOOPFILE (if not owned by root).
  153. lint: ci.lint co.lint ident.lint rlog.lint rcs.lint rcsdiff.lint rcsmerge.lint snoop.lint
  154.  
  155. clean:
  156.     -rm -f *.r; rm -f $(RCSCOMMANDS) snoop
  157.  
  158. CIFILES = ci.r rcslex.r rcssyn.r rcsgen.r rcsedit.r rcskeys.r rcsrev.r rcsutil.r rcsfnms.r partime.r maketime.r rcskeep.r rcsfcmp.r
  159.  
  160. 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
  161.  
  162. ci.lint:
  163.     $(LINT) $(CISRC)
  164.     
  165. ci:    $(CIFILES)
  166.     cc $(LDFLAGS) -f=$(RCSDIR)/ci $(CIFILES)
  167.  
  168. COFILES = co.r rcslex.r rcssyn.r rcsgen.r rcsedit.r rcskeys.r rcsrev.r rcsutil.r rcsfnms.r partime.r maketime.r
  169.  
  170. COSRC = co.c rcslex.c rcssyn.c rcsgen.c rcsedit.c rcskeys.c rcsrev.c rcsutil.c rcsfnms.c partime.c maketime.c
  171. co.lint:
  172.     $(LINT) $(COSRC)
  173. co:    $(COFILES)
  174.     cc $(LDFLAGS) -f=$(RCSDIR)/co $(COFILES)
  175.  
  176. rcsident:    ident.r rcskeys.r
  177.     cc $(LDFLAGS) -f=$(RCSDIR)/rcsident ident.r rcskeys.r
  178.  
  179. ident.lint:
  180.     $(LINT) ident.c rcskeys.c
  181.  
  182. merge:    merge.sh
  183. #    sed -e '/^#/d' -e 's:DIFF3=.*$$:DIFF3=$(DIFF3):' merge.sh > merge
  184. #    This takes out the comment lines and substitutes in DIFF3.
  185. #    (Comments are not permitted in some older shells.)
  186. #    chmod 755 merge
  187.  
  188. RLOG = rlog.r rcslex.r rcssyn.r rcsrev.r rcsutil.r partime.r maketime.r rcsfnms.r
  189. RLOGSRC = rlog.c rcslex.c rcssyn.c rcsrev.c rcsutil.c partime.c maketime.c rcsfnms.c
  190. rlog:    $(RLOG)
  191.     cc $(LDFLAGS) -f=$(RCSDIR)/rlog $(RLOG)
  192.  
  193. rlog.lint:
  194.     $(LINT) $(RLOGSRC)
  195.  
  196. RCS = rcs.r rcslex.r rcssyn.r rcsrev.r rcsutil.r rcsgen.r rcsedit.r rcskeys.r rcsfnms.r
  197.  
  198. RCSSRC = rcs.c rcslex.c rcssyn.c rcsrev.c rcsutil.c rcsgen.c rcsedit.c rcskeys.c rcsfnms.c
  199. rcs:    $(RCS)
  200.     cc $(LDFLAGS) -f=$(RCSDIR)/rcs $(RCS)
  201.  
  202. rcs.lint:
  203.     $(LINT) $(RCSSRC)
  204.  
  205. rcsclean:    rcsclean.sh
  206. #    sed -e '/^#/d' rcsclean.sh > rcsclean
  207. #    This takes out the comments (not permitted in older shells).
  208. #    chmod 755 rcsclean
  209.  
  210. RCSDIFF = rcsdiff.r rcsutil.r rcsfnms.r rcsrev.r rcssyn.r rcslex.r
  211. RCSDIFFSRC = rcsdiff.c rcsutil.c rcsfnms.c rcsrev.c rcssyn.c rcslex.c
  212.  
  213. rcsdiff:    $(RCSDIFF)
  214.     cc $(LDFLAGS) -f=$(RCSDIR)/rcsdiff $(RCSDIFF)
  215.  
  216. rcsdiff.lint:
  217.     $(LINT) $(RCSDIFFSRC)
  218. RCSMERGE = rcsmerge.r rcsutil.r rcsfnms.r rcsrev.r rcssyn.r rcslex.r
  219. RCSMERGESRC = rcsmerge.c rcsutil.c rcsfnms.c rcsrev.c rcssyn.c rcslex.c
  220. rcsmerge:    $(RCSMERGE)
  221.     cc $(LDFLAGS) -f=$(RCSDIR)/rcsmerge $(RCSMERGE)
  222. rcsmerge.lint:
  223.     $(LINT) $(RCSMERGESRC)
  224.     
  225. snoop:    snoop.r
  226.     cc $(LDFLAGS) -f=$(RCSDIR)/snoop snoop.r
  227. snoop.lint:
  228.     $(LINT) snoop.c
  229.  
  230. SOURCE=    ci.c co.c curdir.c ident.c maketime.c partime.c rcs.c \
  231.     rcsclean.c rcsdiff.c rcsedit.c rcsfcmp.c rcsfnms.c rcsgen.c \
  232.     rcskeep.c rcskeys.c rcslex.c rcsmerge.c rcsrev.c rcssyn.c rcsutil.c \
  233.     rlog.c snoop.c
  234.  
  235. HFILES=    rcsbase.h time.h
  236.  
  237. depend:    ${SOURCE} ${HFILES}
  238.     cc -M  ${CFLAGS} ${SOURCE} > makedep
  239.     echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
  240.     echo '$$r makedep' >>eddep
  241.     echo 'w' >>eddep
  242.     cp Makefile Makefile.bak
  243.     ex - Makefile < eddep
  244.     rm eddep makedep
  245.  
  246.  
  247. # DO NOT DELETE THIS LINE - 
  248. ci.r: ci.c
  249. ci.r: ./rcsbase.h
  250. ci.r: /h0/defs/stdio.h
  251. ci.r: /h0/defs/sys/types.h
  252. ci.r: /h0/defs/sys/stat.h
  253. ci.r: ./time.h
  254. co.r: co.c
  255. co.r: ./rcsbase.h
  256. co.r: /h0/defs/stdio.h
  257. co.r: ./time.h
  258. co.r: /h0/defs/sys/types.h
  259. co.r: /h0/defs/sys/stat.h
  260. curdir.r: curdir.c
  261. curdir.r: ./rcsbase.h
  262. curdir.r: /h0/defs/stdio.h
  263. #curdir.r: /h0/defs/sys/param.h
  264. #curdir.r: /h0/defs/machine/machparam.h
  265. curdir.r: /h0/defs/signal.h
  266. curdir.r: /h0/defs/sys/types.h
  267. curdir.r: /h0/defs/sys/stat.h
  268. curdir.r: /h0/defs/dir.h
  269. ident.r: ident.c
  270. ident.r: ./rcsbase.h
  271. ident.r: /h0/defs/stdio.h
  272. maketime.r: maketime.c
  273. maketime.r: ./time.h
  274. maketime.r: /h0/defs/sys/types.h
  275. #maketime.r: /h0/defs/sys/timeb.h
  276. partime.r: partime.c
  277. partime.r: /h0/defs/stdio.h
  278. partime.r: /h0/defs/ctype.h
  279. partime.r: ./time.h
  280. rcs.r: rcs.c
  281. rcs.r: /h0/defs/sys/types.h
  282. rcs.r: /h0/defs/sys/stat.h
  283. #rcs.r: /h0/defs/sysexits.h
  284. rcs.r: ./rcsbase.h
  285. rcs.r: /h0/defs/stdio.h
  286. rcsclean.r: rcsclean.c
  287. rcsclean.r: ./rcsbase.h
  288. rcsclean.r: /h0/defs/stdio.h
  289. rcsdiff.r: rcsdiff.c
  290. rcsdiff.r: ./rcsbase.h
  291. rcsdiff.r: /h0/defs/stdio.h
  292. rcsedit.r: rcsedit.c
  293. rcsedit.r: ./rcsbase.h
  294. rcsedit.r: /h0/defs/stdio.h
  295. rcsfcmp.r: rcsfcmp.c
  296. rcsfcmp.r: ./rcsbase.h
  297. rcsfcmp.r: /h0/defs/stdio.h
  298. rcsfnms.r: rcsfnms.c
  299. rcsfnms.r: ./rcsbase.h
  300. rcsfnms.r: /h0/defs/stdio.h
  301. rcsfnms.r: /h0/defs/sys/types.h
  302. rcsfnms.r: /h0/defs/sys/stat.h
  303. rcsfnms.r: /h0/defs/dir.h
  304. rcsgen.r: rcsgen.c
  305. rcsgen.r: ./rcsbase.h
  306. rcsgen.r: /h0/defs/stdio.h
  307. rcskeep.r: rcskeep.c
  308. rcskeep.r: ./rcsbase.h
  309. rcskeep.r: /h0/defs/stdio.h
  310. rcskeys.r: rcskeys.c
  311. rcskeys.r: ./rcsbase.h
  312. rcskeys.r: /h0/defs/stdio.h
  313. rcslex.r: rcslex.c
  314. rcslex.r: ./rcsbase.h
  315. rcslex.r: /h0/defs/stdio.h
  316. rcsmerge.r: rcsmerge.c
  317. rcsmerge.r: ./rcsbase.h
  318. rcsmerge.r: /h0/defs/stdio.h
  319. rcsrev.r: rcsrev.c
  320. rcsrev.r: ./rcsbase.h
  321. rcsrev.r: /h0/defs/stdio.h
  322. rcssyn.r: rcssyn.c
  323. rcssyn.r: ./rcsbase.h
  324. rcssyn.r: /h0/defs/stdio.h
  325. rcsutil.r: rcsutil.c
  326. rcsutil.r: /h0/defs/sys/types.h
  327. rcsutil.r: /h0/defs/sys/stat.h
  328. rcsutil.r: /h0/defs/signal.h
  329. rcsutil.r: ./rcsbase.h
  330. rcsutil.r: /h0/defs/stdio.h
  331. rcsutil.r: /h0/defs/pwd.h
  332. rlog.r: rlog.c
  333. rlog.r: ./time.h
  334. rlog.r: ./rcsbase.h
  335. rlog.r: /h0/defs/stdio.h
  336. snoop.r: snoop.c
  337. snoop.r: ./rcsbase.h
  338. snoop.r: /h0/defs/stdio.h
  339.