home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OS9000 / APPS / rcs.lzh / rcs1 / Makefile < prev    next >
Makefile  |  1996-04-20  |  8KB  |  221 lines

  1. #$Header: Makefile_v 1.3 96/04/21 01:26:50 hiro Exp $
  2. # Copyright (C) 1982, 1988, 1989 Walter Tichy
  3. #   Distributed under license by the Free Software Foundation, Inc.
  4. #
  5. # This file is part of RCS.
  6. #
  7. # RCS is free software; you can redistribute it and/or modify
  8. # it under the terms of the GNU General Public License as published by
  9. # the Free Software Foundation; either version 1, or (at your option)
  10. # any later version.
  11. #
  12. # RCS is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. # GNU General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU General Public License
  18. # along with RCS; see the file COPYING.  If not, write to
  19. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  20. #
  21. # Report problems and direct all questions to:
  22. #
  23. #    rcs-bugs@cs.purdue.edu
  24. #
  25. #               INSTRUCTIONS
  26. #               ============
  27. # 0.  If you are porting to different hardware,
  28. #     check the instructions in rcsbase.h
  29. #
  30. # Note: instructions 1-5 are normally taken care of by the calling make,
  31. # which passes in DIFF, DIFF3, RCSDIR, OLDDIR, OS, and LOCKING.
  32. #
  33. # 1. Early version of diff did not support options needed by RCS.
  34. #    Newer versions of diff, support them and diff is no longer distributed with
  35. #    RCS. The following definitions apply only if you have both old versions
  36. #    and new versions of diff, and you want RCS to use the new versions.
  37. #    The default should be :
  38. #
  39.  
  40. DIFF      = diff
  41. DIFF3     = diff3
  42.  
  43. # 2.  Figure out where to put the RCS commands; define RCSDIR accordingly.
  44.  
  45. RCSDIR  = .
  46.  
  47. # 3.  Figure out where to put your old RCS commands; define OLDDIR
  48. #     accordingly. This is not needed if you don't have an old release of RCS.
  49. OLDDIR    = /dd/JUNK
  50.  
  51. # 4.  Set the operating system variable OS. If you run on 4.1 BSD, do not
  52. #     define OS:
  53. #     OS  =
  54. #     If you run on USG Unix or UN*X, use:
  55. #     OS  = -DUSG
  56. #     If you run on Version 6 Unix, use:
  57. #     OS  = -DV6
  58. #     If you run on 4.2 or 4.3 BSD, use:
  59. #     OS = -DV4_2BSD
  60. #OS        = -DOSK -D_OS9000
  61. OS        = -DOSK
  62.  
  63. #     Also, set SIGNAL_TYPE to be what your signal() handlers yield.
  64. #     Old-fashioned signal handlers yield 'int'; the newer ones 'void'.
  65.  
  66. SIGNAL_TYPE = int
  67.  
  68. # 5.  Decide whether you want strict locking as the default or not.
  69. #     If you want strict locking, use:
  70. #     LOCKING = 1
  71. #     otherwise:
  72. #     LOCKING = 0
  73. LOCKING        = 0
  74.  
  75. # 6.  Decide what loader flags you need, and define LDFLAGS accordingly.
  76. #     On the Vax you need none, on PDP-11s with split i/d you need -i.
  77. LFLAGS = -w=/dd/LIB -bp -M=24k
  78. LDFLAGS = $(LFLAGS)
  79.  
  80. # 7.  RCS can maintain a log of the use of the co and ci commands. If you
  81. #     want the logging, you must
  82. #     a) define SNOOP (that's where the process that writes the log goes),
  83. #     b) define SNOOPFILE (that's the file where SNOOP writes the log;
  84. #        it must be owned by the same user that owns SNOOP),
  85. #     c) include SNOOP and SNOOPFILE in the CFLAGS macro.
  86. #     If you don't want the logging of command usage, omit the SNOOP and
  87. #     SNOOPFILE definitions from CFLAGS.
  88. #     The two variants of the CFLAG macros are given below.
  89. SNOOPFILE    = /dd/SYS/rcslog
  90. SNOOP        = snoop
  91.  
  92. DEFINES = -DCOMPAT2 $(OS) -DDIFF="diff" -DCO="co" -DMERGE="rcsmerge" \
  93.         -DSIGNAL_TYPE=int -DSTRICT_LOCKING=$(LOCKING) -DSNOOP="snoop" \
  94.         -DSNOOPFILE="$(SNOOPFILE)" -DGNUDIFF -DOSK
  95.  
  96. RDIR = RELS
  97. TDIR = /tmp
  98. SPECIAL_FLAGS = -bp
  99. CFLAGS = -v=/dd/DEFS -v=. -v=/dd/DEFS $(DEFINES) -t=$(TDIR) $(SPECIAL_FLAGS)
  100.  
  101. # 8.  If you don't have release 2 RCS files around (e.g., if you don't
  102. #     have release 2 of RCS), remove the word -DCOMPAT2 from whatever
  103. #     variant of CFLAGS you selected. -DCOMPAT2 assures that release 2
  104. #     RCS files can still be read. (After all release 2 RCS files have
  105. #     been updated with release 3 or 4 ci or rcs, you can remake RCS without
  106. #     -DCOMPAT2.) Also, make sure that the co commands at the end of this
  107. #     file are commented out; otherwise, Make will complain.
  108. #
  109. # 9.  Now you are ready. Try to make 'depend' and 'all'. If all went well, make
  110. #     'install' if you want no logging of command usage, 'installog' otherwise.
  111. #
  112. # 10. IMPORTANT! When you have RCS installed, rename old
  113. #     release 2 RCS files as follows (if you have any):
  114. #     If the working file was "f.c" and the RCS file "f.c.v", rename the
  115. #     RCS file to "f.c,v". If the working file was "f.c" and the RCS file
  116. #     "f.v", rename the RCS file "f.c,v". Thus, suffixes are no longer
  117. #     dropped and RCS files end in ",v" rather than ".v".
  118. #
  119. # 11. If you want to maintain RCS with itself, be sure you preserve the
  120. #     original revision numbers, dates, etc. This is done by checking the
  121. #     files in with the -k option. When done, remove the comments from the
  122. #     co-rules at the end of this file.
  123. #
  124.  
  125. CC = cc
  126.  
  127. ODIR = BUILD/CMDS
  128.  
  129. LDIR=/dd/LIB
  130. ALDIR=/dd/LIB
  131. #LIBS = -l=$(LDIR)/sys_clib.l -l=$(LDIR)/clib.l -l=$(LDIR)/os_lib.l
  132. LIBS=
  133.  
  134. LD = cc
  135.  
  136. #CHMOD = attr -e -r -pe -pr -ge -gr
  137. CHMOD = attr -e -r -pe -pr
  138. CD = chd
  139.  
  140. all : $(ODIR)/rcsident $(ODIR)/rcs $(ODIR)/rcsmerge $(ODIR)/snoop \
  141.      $(ODIR)/rcsdiff $(ODIR)/co $(ODIR)/ci $(ODIR)/rlog \
  142.      $(ODIR)/mani $(ODIR)/srcin $(ODIR)/puttot
  143.     Echo "Compiling of RCS is over"
  144.  
  145. OBJS = ci.r co.r ident.r rcs.r rcsdiff.r rcsedit.r \
  146.     rcsfcmp.r rcsfnms.r rcsgen.r rcskeep.r rcskeys.r rcslex.r rcsmerge.r \
  147.     rcsrev.r rcssyn.r rcsutil.r rlog.r snoop.r \
  148.     osk.r utime.r builddirlist.r stat.r partime.r maketime.r mani.r    \
  149.     puttot.r srcin.r
  150.  
  151. $(OBJS): rcsbase.h
  152.     $(CC) $*.c $(CFLAGS) -r=$(RDIR)
  153.  
  154. utime.r: utime.h
  155.  
  156. stat.r: stat.h
  157.  
  158. ci.r co.r rcsfnms.r maketime.r partime.r rcs.r rcsutil.r rlog.r : time.h
  159.  
  160. $(ODIR)/rcsident: ident.r rcskeys.r
  161.     chd $(RDIR); $(CC) -g -fd=../$(ODIR)/rcsident $(LDFLAGS) ident.r rcskeys.r $(LIBS); $(CHMOD) ../$@
  162.  
  163.  
  164. RCSFILES = rcs.r rcssyn.r rcsrev.r rcsgen.r rcsedit.r rcskeys.r rcsfnms.r builddirlist.r \
  165.     rcslex.r rcsutil.r \
  166.     osk.r utime.r stat.r
  167.  
  168. $(ODIR)/rcs:    $(RCSFILES)
  169.     chd $(RDIR); $(CC) -g -fd=../$(ODIR)/rcs $(LDFLAGS) $(RCSFILES) $(LIBS); $(CHMOD) ../$@
  170. #    chd $(RDIR); $(LD) -O=../$(ODIR)/rcs $(RCSFILES)
  171.  
  172. RCSDIFF = rcsdiff.r rcsfnms.r builddirlist.r rcsrev.r rcssyn.r \
  173.         rcslex.r rcsutil.r \
  174.         osk.r utime.r stat.r
  175.  
  176. $(ODIR)/rcsdiff:    $(RCSDIFF)
  177.     chd $(RDIR); $(CC) -g -fd=../$(ODIR)/rcsdiff $(LDFLAGS) $(RCSDIFF) $(LIBS); $(CHMOD) ../$@
  178.  
  179. RCSMERGE = rcsmerge.r rcsfnms.r builddirlist.r rcsrev.r rcssyn.r \
  180.             rcslex.r rcsutil.r \
  181.             osk.r utime.r stat.r
  182.  
  183. $(ODIR)/rcsmerge:    $(RCSMERGE)
  184.     chd $(RDIR); $(CC) -g -fd=../$(ODIR)/rcsmerge $(LDFLAGS) $(RCSMERGE) $(LIBS); $(CHMOD) ../$@
  185.  
  186. $(ODIR)/snoop:    snoop.r
  187.     chd $(RDIR); $(CC) -g -fd=../$(ODIR)/snoop $(LDFLAGS) $*.r $(LIBS); $(CHMOD) ../$@
  188.  
  189. COFILES = co.r rcssyn.r rcsgen.r rcsedit.r rcskeys.r rcsrev.r \
  190.         rcsfnms.r builddirlist.r partime.r \
  191.         maketime.r rcslex.r rcsutil.r\
  192.         osk.r utime.r stat.r
  193.  
  194. $(ODIR)/co : $(COFILES)
  195.     chd $(RDIR); $(CC) -g -fd=../$(ODIR)/co $(LDFLAGS) $(COFILES) $(LIBS); $(CHMOD) ../$@
  196.  
  197. CIFILES = ci.r rcskeys.r rcsrev.r partime.r rcskeep.r rcsfcmp.r rcsfnms.r builddirlist.r \
  198.         rcssyn.r rcsgen.r rcsedit.r \
  199.         maketime.r rcslex.r rcsutil.r \
  200.         osk.r utime.r stat.r
  201.  
  202. $(ODIR)/ci : $(CIFILES)
  203.     chd $(RDIR); $(CC) -g -fd=../$(ODIR)/ci $(LDFLAGS) $(CIFILES) $(LIBS); $(CHMOD) ../$@
  204.  
  205. RLOGFILES = rlog.r rcssyn.r rcsrev.r partime.r rcsfnms.r builddirlist.r \
  206.         maketime.r rcslex.r rcsutil.r \
  207.         osk.r utime.r stat.r
  208.  
  209. $(ODIR)/rlog: $(RLOGFILES)
  210.     chd $(RDIR); $(CC) -g -fd=../$(ODIR)/rlog $(LDFLAGS) $(RLOGFILES) $(LIBS); $(CHMOD) ../$@
  211.  
  212. $(ODIR)/mani: mani.r
  213.     chd $(RDIR); $(CC) -g -fd=../$(ODIR)/mani $(LDFLAGS) $(LIBS) $*.r; $(CHMOD) ../$@
  214.  
  215. $(ODIR)/srcin: srcin.r
  216.     chd $(RDIR);    \
  217.     $(CC) -g -fd=../$(ODIR)/srcin $(LDFLAGS) $(LIBS) $*.r osk.r; $(CHMOD) ../$@
  218.  
  219. $(ODIR)/puttot: puttot.r
  220.     chd $(RDIR); $(CC) -g -fd=../$(ODIR)/puttot $(LDFLAGS) $(LIBS) $*.r; $(CHMOD) ../$@
  221.