home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / CMDS / rcs4.lha / makefile.orig < prev    next >
Makefile  |  1993-03-03  |  11KB  |  338 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   =
  33. DIFF      = /usr/local/lib/rdiff
  34. DIFF3     = /usr/local/lib/rdiff3
  35.  
  36. # 2.  Figure out where to put the RCS commands; define RCSDIR accordingly.
  37. RCSDIR    = /usr/local/bin
  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        = -DUSG
  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  = -i
  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='"${DESTDIR}$(RCSDIR)"'
  80. CFLAGS    = -O $(DEFINES)
  81. LINT = lint -c -u  -Dlint $(DEFINES)
  82.  
  83. # 8.  If you don't have release 2 RCS files around (e.g., if you don't
  84. #     have release 2 of RCS), remove the word -DCOMPAT2 from whatever
  85. #     variant of CFLAGS you selected. -DCOMPAT2 assures that release 2
  86. #     RCS files can still be read. (After all release 2 RCS files have
  87. #     been updated with release 3 or 4 ci or rcs, you can remake RCS without
  88. #     -DCOMPAT2.) Also, make sure that the co commands at the end of this
  89. #     file are commented out; otherwise, Make will complain.
  90. #
  91. # 9.  Now you are ready. Try to make 'all'. If all went well, make
  92. #     'install' if you want no logging of command usage, 'installog' otherwise.
  93. #
  94. # 10. IMPORTANT! When you have RCS installed, rename old
  95. #     release 2 RCS files as follows (if you have any):
  96. #     If the working file was "f.c" and the RCS file "f.c.v", rename the
  97. #     RCS file to "f.c,v". If the working file was "f.c" and the RCS file
  98. #     "f.v", rename the RCS file "f.c,v". Thus, suffixes are no longer
  99. #     dropped and RCS files end in ",v" rather than ".v".
  100. #
  101. # 11. If you want to maintain RCS with itself, be sure you preserve the
  102. #     original revision numbers, dates, etc. This is done by checking the
  103. #     files in with the -k option. When done, remove the comments from the
  104. #     co-rules at the end of this file.
  105. #
  106. BCOMMANDS   =   ci ident rcs rcsdiff rcsmerge rlog co
  107. # binary comands
  108.  
  109. RCSCOMMANDS = merge $(BCOMMANDS)
  110. # all commands
  111.  
  112. SOURCES = ci.c co.c ident.c maketime.c partime.c rcs.c rcsdiff.c rcsedit.c\
  113.     rcsfcmp.c rcsfnms.c rcsgen.c rcskeep.c rcskeys.c rcslex.c rcsmerge.c\
  114.     rcsrev.c rcssyn.c rcsutil.c rlog.c snoop.c\
  115.     rcsbase.h time.h merge.sh 
  116.  
  117. BOBJECTS = ci.o co.o ident.o rcs.o rcsdiff.o rcsedit.o\
  118.     rcsfcmp.o rcsfnms.o rcsgen.o rcskeep.o rcskeys.o rcslex.o rcsmerge.o\
  119.     rcsrev.o rcssyn.o rcsutil.o rlog.o snoop.o\
  120.     rcssynTST.o rcsrevTST.o rcsfnmsTST.o rcsfcmpTST.o rcskeepTST.o
  121.  
  122. all:    $(RCSCOMMANDS)
  123.  
  124. INSTALL = install
  125.  
  126. $(BOBJECTS):    rcsbase.h
  127.  
  128. partime.o maketime.o co.o ci.o rcs.o rlog.o rcsutil.o:        time.h
  129.  
  130. install:    all 
  131. #    Save the old commands if you have any.
  132. #    -cd ${DESTDIR}$(RCSDIR); mv $(RCSCOMMANDS) ${DESTDIR}$(OLDDIR)
  133.     ${INSTALL} -m 775 -o root -s ci ${DESTDIR}$(RCSDIR)
  134.     ${INSTALL} -m 775 -o root -s ident ${DESTDIR}$(RCSDIR)
  135.     ${INSTALL} -m 775 -o root -s rcs ${DESTDIR}$(RCSDIR)
  136.     ${INSTALL} -m 775 -o root -s rcsdiff ${DESTDIR}$(RCSDIR)
  137.     ${INSTALL} -m 775 -o root -s rcsmerge ${DESTDIR}$(RCSDIR)
  138.     ${INSTALL} -m 775 -o root -s rlog ${DESTDIR}$(RCSDIR)
  139.     ${INSTALL} -m 775 -o root -s co ${DESTDIR}$(RCSDIR)
  140.     ${INSTALL} -m 775 -o root -c merge ${DESTDIR}$(RCSDIR)
  141. #    ${INSTALL} -m 775 -o root -c rcsclean ${DESTDIR}$(RCSDIR)
  142. #    ${INSTALL} -m 775 -o root -c rcsfreeze.sh ${DESTDIR}${RCSDIR}/rcsfreeze
  143.  
  144. installog:    installsnoop install
  145.  
  146. installsnoop:    snoop
  147.     install -s snoop ${DESTDIR}$(SNOOP)
  148.     chmod u+s ${DESTDIR}$(SNOOP)
  149.     touch ${DESTDIR}$(SNOOPFILE)
  150.     chmod 644 ${DESTDIR}$(SNOOPFILE)
  151. # CAUTION: You may have to do a chown of SNOOP and SNOOPFILE (if not owned by root).
  152. lint: ci.lint co.lint ident.lint rlog.lint rcs.lint rcsdiff.lint rcsmerge.lint snoop.lint
  153.  
  154. clean:
  155.     -rm -f *.o; rm -f $(RCSCOMMANDS) snoop
  156.  
  157. 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
  158.  
  159. 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
  160.  
  161. ci.lint:
  162.     $(LINT) $(CISRC)
  163.     
  164. ci:    $(CIFILES)
  165.     cc $(LDFLAGS) -o ci $(CIFILES)
  166.  
  167. COFILES = co.o rcslex.o rcssyn.o rcsgen.o rcsedit.o rcskeys.o rcsrev.o rcsutil.o rcsfnms.o partime.o maketime.o
  168.  
  169. COSRC = co.c rcslex.c rcssyn.c rcsgen.c rcsedit.c rcskeys.c rcsrev.c rcsutil.c rcsfnms.c partime.c maketime.c
  170. co.lint:
  171.     $(LINT) $(COSRC)
  172. co:    $(COFILES)
  173.     cc $(LDFLAGS) -o co $(COFILES)
  174.  
  175. ident:    ident.o rcskeys.o
  176.     cc -o ident ident.o rcskeys.o
  177.  
  178. ident.lint:
  179.     $(LINT) ident.c rcskeys.c
  180.  
  181. merge:    merge.sh
  182.     sed -e '/^#/d' -e 's:DIFF3=.*$$:DIFF3=$(DIFF3):' merge.sh > merge
  183. #    This takes out the comment lines and substitutes in DIFF3.
  184. #    (Comments are not permitted in some older shells.)
  185.     chmod 755 merge
  186.  
  187. RLOG = rlog.o rcslex.o rcssyn.o rcsrev.o rcsutil.o partime.o maketime.o rcsfnms.o
  188. RLOGSRC = rlog.c rcslex.c rcssyn.c rcsrev.c rcsutil.c partime.c maketime.c rcsfnms.c
  189. rlog:    $(RLOG)
  190.     cc $(LDFLAGS) -o rlog $(RLOG)
  191.  
  192. rlog.lint:
  193.     $(LINT) $(RLOGSRC)
  194.  
  195. RCS = rcs.o rcslex.o rcssyn.o rcsrev.o rcsutil.o rcsgen.o rcsedit.o rcskeys.o rcsfnms.o
  196.  
  197. RCSSRC = rcs.c rcslex.c rcssyn.c rcsrev.c rcsutil.c rcsgen.c rcsedit.c rcskeys.c rcsfnms.c
  198. rcs:    $(RCS)
  199.     cc $(LDFLAGS) -o rcs $(RCS)
  200.  
  201. rcs.lint:
  202.     $(LINT) $(RCSSRC)
  203.  
  204. rcsclean:    rcsclean.sh
  205.     sed -e '/^#/d' rcsclean.sh > rcsclean
  206. #    This takes out the comments (not permitted in older shells).
  207.     chmod 755 rcsclean
  208.  
  209. RCSDIFF = rcsdiff.o rcsutil.o rcsfnms.o rcsrev.o rcssyn.o rcslex.o
  210. RCSDIFFSRC = rcsdiff.c rcsutil.c rcsfnms.c rcsrev.c rcssyn.c rcslex.c
  211.  
  212. rcsdiff:    $(RCSDIFF)
  213.     cc -o rcsdiff $(RCSDIFF)
  214.  
  215. rcsdiff.lint:
  216.     $(LINT) $(RCSDIFFSRC)
  217. RCSMERGE = rcsmerge.o rcsutil.o rcsfnms.o rcsrev.o rcssyn.o rcslex.o
  218. RCSMERGESRC = rcsmerge.c rcsutil.c rcsfnms.c rcsrev.c rcssyn.c rcslex.c
  219. rcsmerge:    $(RCSMERGE)
  220.     cc -o rcsmerge $(RCSMERGE)
  221. rcsmerge.lint:
  222.     $(LINT) $(RCSMERGESRC)
  223.     
  224. snoop:    snoop.o
  225.     cc -o snoop snoop.o
  226. snoop.lint:
  227.     $(LINT) snoop.c
  228.  
  229. SOURCE=    ci.c co.c curdir.c ident.c maketime.c partime.c rcs.c \
  230.     rcsclean.c rcsdiff.c rcsedit.c rcsfcmp.c rcsfnms.c rcsgen.c \
  231.     rcskeep.c rcskeys.c rcslex.c rcsmerge.c rcsrev.c rcssyn.c rcsutil.c \
  232.     rlog.c snoop.c
  233.  
  234. HFILES=    rcsbase.h time.h
  235.  
  236. depend:    ${SOURCE} ${HFILES}
  237.     cc -M  ${CFLAGS} ${SOURCE} > makedep
  238.     echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
  239.     echo '$$r makedep' >>eddep
  240.     echo 'w' >>eddep
  241.     cp Makefile Makefile.bak
  242.     ex - Makefile < eddep
  243.     rm eddep makedep
  244.  
  245.  
  246. # DO NOT DELETE THIS LINE - 
  247. ci.o: ci.c
  248. ci.o: ./rcsbase.h
  249. ci.o: /usr/include/stdio.h
  250. ci.o: /usr/include/sys/types.h
  251. ci.o: /usr/include/sys/stat.h
  252. ci.o: ./time.h
  253. co.o: co.c
  254. co.o: ./rcsbase.h
  255. co.o: /usr/include/stdio.h
  256. co.o: ./time.h
  257. co.o: /usr/include/sys/types.h
  258. co.o: /usr/include/sys/stat.h
  259. curdir.o: curdir.c
  260. curdir.o: ./rcsbase.h
  261. curdir.o: /usr/include/stdio.h
  262. curdir.o: /usr/include/sys/param.h
  263. curdir.o: /usr/include/machine/machparam.h
  264. curdir.o: /usr/include/signal.h
  265. curdir.o: /usr/include/sys/types.h
  266. curdir.o: /usr/include/sys/stat.h
  267. curdir.o: /usr/include/sys/dir.h
  268. ident.o: ident.c
  269. ident.o: ./rcsbase.h
  270. ident.o: /usr/include/stdio.h
  271. maketime.o: maketime.c
  272. maketime.o: ./time.h
  273. maketime.o: /usr/include/sys/types.h
  274. maketime.o: /usr/include/sys/timeb.h
  275. partime.o: partime.c
  276. partime.o: /usr/include/stdio.h
  277. partime.o: /usr/include/ctype.h
  278. partime.o: ./time.h
  279. rcs.o: rcs.c
  280. rcs.o: /usr/include/sys/types.h
  281. rcs.o: /usr/include/sys/stat.h
  282. rcs.o: /usr/include/sysexits.h
  283. rcs.o: ./rcsbase.h
  284. rcs.o: /usr/include/stdio.h
  285. rcsclean.o: rcsclean.c
  286. rcsclean.o: ./rcsbase.h
  287. rcsclean.o: /usr/include/stdio.h
  288. rcsdiff.o: rcsdiff.c
  289. rcsdiff.o: ./rcsbase.h
  290. rcsdiff.o: /usr/include/stdio.h
  291. rcsedit.o: rcsedit.c
  292. rcsedit.o: ./rcsbase.h
  293. rcsedit.o: /usr/include/stdio.h
  294. rcsfcmp.o: rcsfcmp.c
  295. rcsfcmp.o: ./rcsbase.h
  296. rcsfcmp.o: /usr/include/stdio.h
  297. rcsfnms.o: rcsfnms.c
  298. rcsfnms.o: ./rcsbase.h
  299. rcsfnms.o: /usr/include/stdio.h
  300. rcsfnms.o: /usr/include/sys/types.h
  301. rcsfnms.o: /usr/include/sys/stat.h
  302. rcsfnms.o: /usr/include/sys/dir.h
  303. rcsgen.o: rcsgen.c
  304. rcsgen.o: ./rcsbase.h
  305. rcsgen.o: /usr/include/stdio.h
  306. rcskeep.o: rcskeep.c
  307. rcskeep.o: ./rcsbase.h
  308. rcskeep.o: /usr/include/stdio.h
  309. rcskeys.o: rcskeys.c
  310. rcskeys.o: ./rcsbase.h
  311. rcskeys.o: /usr/include/stdio.h
  312. rcslex.o: rcslex.c
  313. rcslex.o: ./rcsbase.h
  314. rcslex.o: /usr/include/stdio.h
  315. rcsmerge.o: rcsmerge.c
  316. rcsmerge.o: ./rcsbase.h
  317. rcsmerge.o: /usr/include/stdio.h
  318. rcsrev.o: rcsrev.c
  319. rcsrev.o: ./rcsbase.h
  320. rcsrev.o: /usr/include/stdio.h
  321. rcssyn.o: rcssyn.c
  322. rcssyn.o: ./rcsbase.h
  323. rcssyn.o: /usr/include/stdio.h
  324. rcsutil.o: rcsutil.c
  325. rcsutil.o: /usr/include/sys/types.h
  326. rcsutil.o: /usr/include/sys/stat.h
  327. rcsutil.o: /usr/include/signal.h
  328. rcsutil.o: ./rcsbase.h
  329. rcsutil.o: /usr/include/stdio.h
  330. rcsutil.o: /usr/include/pwd.h
  331. rlog.o: rlog.c
  332. rlog.o: ./time.h
  333. rlog.o: ./rcsbase.h
  334. rlog.o: /usr/include/stdio.h
  335. snoop.o: snoop.c
  336. snoop.o: ./rcsbase.h
  337. snoop.o: /usr/include/stdio.h
  338.