home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / rcs567s.zip / rcs / src / Makefile < prev    next >
Makefile  |  1994-03-20  |  8KB  |  270 lines

  1. # Make RCS.
  2. #
  3. # $Id: Makefile,v 5.24 1994/03/20 04:52:58 eggert Exp $
  4. # Copyright 1982, 1988, 1989 Walter Tichy
  5. # Copyright 1990, 1991, 1992, 1993, 1994 Paul Eggert
  6. #   Distributed under license by the Free Software Foundation, Inc.
  7. #
  8. # This file is part of RCS.
  9. #
  10. # RCS is free software; you can redistribute it and/or modify
  11. # it under the terms of the GNU General Public License as published by
  12. # the Free Software Foundation; either version 2, or (at your option)
  13. # any later version.
  14. #
  15. # RCS is distributed in the hope that it will be useful,
  16. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  18. # GNU General Public License for more details.
  19. #
  20. # You should have received a copy of the GNU General Public License
  21. # along with RCS; see the file COPYING.  If not, write to
  22. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  23. #
  24. # Report problems and direct all questions to:
  25. #
  26. #    rcs-bugs@cs.purdue.edu
  27. #
  28.  
  29. # default target
  30. default :: all
  31.  
  32. # See the file INSTALL for more information on the configuration section.
  33. # ----- start of configuration section -----
  34.  
  35. #(Unix
  36.  
  37.  BINDIR = /usr/local/bin
  38. #BINDIR = /bin# see the file INSTALL
  39. #BINDIR = /usr/bin# see the file INSTALL
  40.  
  41.  CC = cc
  42. #CC = cc -g# debug
  43. #CC = gcc -g# GCC
  44.  
  45.  CC_D =
  46.  
  47.  CC_O = -O
  48. #CC_O =# debug
  49. #CC_O = -O2 -fomit-frame-pointer# GCC (debugging impossible)
  50. #CC_O = -O -R# BSD compilers that do not support `const'
  51.  
  52.  CC_W =
  53. #CC_W = -fno-common \
  54. #    -Wall -Wcast-qual -Wconversion -Wmissing-prototypes \
  55. #    -Wnested-externs -Wpointer-arith -Wshadow \
  56. #    -Wstrict-prototypes -Wtraditional -Wwrite-strings# GCC 2.*
  57.  
  58.  CFLAGS = -Dhas_conf_h $(CC_D) $(CC_O) $(CC_W)
  59.  
  60.  COMPAT2 = 0
  61. #COMPAT2 = 1
  62.  
  63.  DESTBINDIR = $(DESTDIR)$(BINDIR)
  64.  
  65.  DIFF = $(DIFFPREFIX)diff
  66. #DIFF = $(DIFFPREFIX)rdiff# short for ``RCS diff'' on some hosts
  67.  
  68.  DIFFPREFIX = $(BINDIR)/
  69. #DIFFPREFIX = /usr/local/gnu/
  70. #DIFFPREFIX = /bin/
  71. #DIFFPREFIX = /usr/bin/
  72.  
  73.  DIFF_FLAGS = -an# GNU diff -- must be version 1.15 or later
  74. #DIFF_FLAGS = -n# traditional diff
  75.  
  76.  DIFF_L = 1# GNU diff
  77. #DIFF_L = 0# traditional diff
  78.  
  79.  DIFF_SUCCESS = 0
  80. #DIFF_SUCCESS = EXIT_SUCCESS
  81.  DIFF_FAILURE = 1
  82. #DIFF_FAILURE = EXIT_FAILURE
  83.  DIFF_TROUBLE = 2
  84. #DIFF_TROUBLE = (EXIT_FAILURE*2)
  85.  
  86.  DIFF3 = $(DIFF)3# GNU diff3
  87. #DIFF3 = /usr/lib/diff3# traditional diff3
  88. #DIFF3 = /usr/5lib/diff3prog# other aliases for traditional diff3
  89. #DIFF3 = /usr/lib/diff3prog
  90. #DIFF3 = /usr/lib/rdiff3
  91.  
  92.  DIFF3_A = 1# GNU diff -- must be version 2.1 or later
  93. #DIFF3_A = 0# traditional diff3, and GNU diff versions before 2.1
  94.  
  95.  DIFF3_BIN = 1# GNU diff
  96. #DIFF3_BIN = 0# traditional diff
  97.  
  98.  ED = /bin/ed
  99.  
  100.  EXECUTABLE_GROUP = staff# BSD unix installation
  101.  EXECUTABLE_PERMISSIONS = -g $(EXECUTABLE_GROUP) -m 775# BSD unix installation
  102.  INSTALL = install -c $(EXECUTABLE_PERMISSIONS)# BSD unix installation
  103. #INSTALL = cp# traditional Unix installation
  104.  
  105.  LDFLAGS =
  106.  
  107.  LDLIBS =
  108.  
  109.  LINK = $(CC) $(LDFLAGS)
  110.  
  111.  LINT = lint -abchx# traditional and BSD lint
  112. #LINT = lint# System V lint
  113.  
  114.  MAKE = make
  115.  
  116.  OTHER_OBJECT =
  117.  
  118.  RCSPREFIX = $(BINDIR)/
  119. #RCSPREFIX =
  120.  
  121.  REMOVE = rm -f
  122.  
  123.  SENDMAIL = "/bin/mail"
  124. #SENDMAIL = "/etc/delivermail", "-w"
  125. #SENDMAIL = "/usr/bin/mail"
  126. #SENDMAIL = "/usr/lib/sendmail"
  127. #SENDMAIL = "mail"
  128. #SENDMAIL =# for impoverished hosts that lack electronic mail
  129.  
  130.  TESTPREFIX =
  131.  
  132.  o = .o
  133. #o = .s# Minix/PC with ACK cc
  134.  
  135.  x =
  136.  
  137. #)
  138. # On non-Unix hosts you must manually create and edit conf.h from conf.heg.
  139.  
  140. # ----- end of configuration section -----
  141. # You shouldn't have to change anything past this point.
  142.  
  143.  
  144. # Avoid brain damage in some versions of 'make'.
  145. SHELL = /bin/sh
  146.  
  147. # all commands
  148. RCSCOMMANDS = ci$x co$x ident$x merge$x \
  149.     rcs$x rcsclean$x rcsdiff$x rcsmerge$x rlog$x
  150.  
  151. all :: $(RCSCOMMANDS)
  152.  
  153. install :: all
  154.     test -d $(DESTBINDIR)
  155.     $(INSTALL) ci$x $(DESTBINDIR)
  156.     $(INSTALL) co$x $(DESTBINDIR)
  157.     $(INSTALL) ident$x $(DESTBINDIR)
  158.     $(INSTALL) merge$x $(DESTBINDIR)
  159.     $(INSTALL) rcs$x $(DESTBINDIR)
  160.     $(INSTALL) rcsclean$x $(DESTBINDIR)
  161.     $(INSTALL) rcsdiff$x $(DESTBINDIR)
  162.     $(INSTALL) rcsmerge$x $(DESTBINDIR)
  163.     $(INSTALL) rlog$x $(DESTBINDIR)
  164.  
  165. # Install RCS and (if applicable) GNU diff before running these tests.
  166. # To test RCS before installing it, see the file INSTALL.
  167. RCSTEST = \
  168.     CC='$(CC)' CFLAGS='$(CFLAGS)' \
  169.     DIFF='$(DIFF)' \
  170.     LDFLAGS='$(LDFLAGS)' LDLIBS='$(LDLIBS)' \
  171.     PATH=$(BINDIR):$(DIFFPREFIX).:$$PATH \
  172.     sh $(TESTPREFIX)rcstest
  173. installtest ::
  174.     $(RCSTEST)
  175. installdebug ::
  176.     $(RCSTEST) -v
  177.  
  178. clean ::
  179.     $(REMOVE) a.* RCS/a.*
  180.     $(REMOVE) *$o
  181.     $(REMOVE) $(RCSCOMMANDS)
  182.     $(REMOVE) conf.h conf.err core*
  183.  
  184. #(Unix
  185. conf.h : conf.sh Makefile
  186.     $(REMOVE) a.*
  187.     CC='$(CC)' CFLAGS='$(CFLAGS)' \
  188.     COMPAT2='$(COMPAT2)' \
  189.     DIFF3='$(DIFF3)' DIFF3_A='$(DIFF3_A)' DIFF3_BIN='$(DIFF3_BIN)' \
  190.     DIFF='$(DIFF)' DIFF_FLAGS='$(DIFF_FLAGS)' DIFF_L='$(DIFF_L)' \
  191.     DIFF_SUCCESS='$(DIFF_SUCCESS)' DIFF_FAILURE='$(DIFF_FAILURE)' DIFF_TROUBLE='$(DIFF_TROUBLE)' \
  192.     ED='$(ED)' \
  193.     LDFLAGS='$(LDFLAGS)' LDLIBS='$(LDLIBS)' \
  194.     RCSPREFIX='$(RCSPREFIX)' \
  195.     SENDMAIL='$(SENDMAIL)' \
  196.     $(SHELL) -x conf.sh 3>&1 >a.h 2>conf.err
  197.     mv a.h $@
  198.     $(REMOVE) a.* core*
  199. #)
  200.  
  201. ci = ci$o rcslex$o rcssyn$o rcsgen$o rcsedit$o rcskeys$o rcsmap$o \
  202.     rcsrev$o rcsutil$o rcsfnms$o maketime$o partime$o rcstime$o rcskeep$o \
  203.     rcsfcmp$o version$o $(OTHER_OBJECT)
  204. ci$x : $(ci)
  205.     $(LINK) $(ci) -o $@ $(LDLIBS)
  206.  
  207. co = co$o rcslex$o rcssyn$o rcsgen$o rcsedit$o rcskeys$o rcsmap$o \
  208.     rcsrev$o rcsutil$o rcsfnms$o maketime$o partime$o rcstime$o rcskeep$o \
  209.     version$o $(OTHER_OBJECT)
  210. co$x : $(co)
  211.     $(LINK) $(co) -o $@ $(LDLIBS)
  212.  
  213. ident = ident$o rcsmap$o version$o $(OTHER_OBJECT)
  214. ident$x : $(ident)
  215.     $(LINK) $(ident) -o $@ $(LDLIBS)
  216.  
  217. merge = merge$o merger$o rcsfnms$o rcslex$o \
  218.     rcsmap$o rcsrev$o rcssyn$o rcsutil$o \
  219.     rcskeep$o rcskeys$o maketime$o partime$o rcstime$o version$o \
  220.     $(OTHER_OBJECT)
  221. merge$x : $(merge)
  222.     $(LINK) $(merge) -o $@ $(LDLIBS)
  223.  
  224. rlog = rlog$o rcslex$o rcsmap$o rcssyn$o rcsrev$o rcsutil$o \
  225.     maketime$o partime$o rcstime$o rcsfnms$o rcskeep$o rcskeys$o \
  226.     version$o $(OTHER_OBJECT)
  227. rlog$x : $(rlog)
  228.     $(LINK) $(rlog) -o $@ $(LDLIBS)
  229.  
  230. rcs = rcs$o rcslex$o rcssyn$o rcsrev$o rcsutil$o rcsgen$o \
  231.     rcsedit$o rcskeys$o rcsmap$o rcsfnms$o rcskeep$o \
  232.     maketime$o partime$o rcstime$o version$o $(OTHER_OBJECT)
  233. rcs$x : $(rcs)
  234.     $(LINK) $(rcs) -o $@ $(LDLIBS)
  235.  
  236. rcsclean = rcsclean$o rcsedit$o rcsfcmp$o rcsfnms$o rcsgen$o rcskeys$o \
  237.     rcslex$o rcsmap$o rcsrev$o rcssyn$o rcsutil$o rcskeep$o \
  238.     maketime$o partime$o rcstime$o version$o $(OTHER_OBJECT)
  239. rcsclean$x : $(rcsclean)
  240.     $(LINK) $(rcsclean) -o $@ $(LDLIBS)
  241.  
  242. rcsdiff = rcsdiff$o rcsutil$o rcsfnms$o rcsmap$o rcsrev$o rcssyn$o \
  243.     rcslex$o maketime$o partime$o rcstime$o rcskeep$o rcskeys$o \
  244.     version$o $(OTHER_OBJECT)
  245. rcsdiff$x : $(rcsdiff)
  246.     $(LINK) $(rcsdiff) -o $@ $(LDLIBS)
  247.  
  248. rcsmerge = rcsmerge$o merger$o rcsutil$o rcsfnms$o rcsmap$o rcsrev$o \
  249.     rcssyn$o rcslex$o rcskeep$o rcskeys$o \
  250.     maketime$o partime$o rcstime$o version$o $(OTHER_OBJECT)
  251. rcsmerge$x : $(rcsmerge)
  252.     $(LINK) $(rcsmerge) -o $@ $(LDLIBS)
  253.  
  254. SOURCE=    ci.c co.c ident.c maketime.c merge.c merger.c partime.c rcs.c \
  255.     rcsclean.c rcsdiff.c rcsedit.c rcsfcmp.c rcsfnms.c rcsgen.c \
  256.     rcskeep.c rcskeys.c rcslex.c rcsmap.c rcsmerge.c rcsrev.c rcssyn.c \
  257.     rcstime.c rcsutil.c rlog.c version.c
  258. OBJECT=    ci$o co$o ident$o maketime$o merge$o merger$o partime$o rcs$o \
  259.     rcsclean$o rcsdiff$o rcsedit$o rcsfcmp$o rcsfnms$o rcsgen$o \
  260.     rcskeep$o rcskeys$o rcslex$o rcsmap$o rcsmerge$o rcsrev$o rcssyn$o \
  261.     rcstime$o rcsutil$o rlog$o version$o
  262.  
  263. lint :: conf.h
  264.     $(LINT) $(CC_D) -DRCS_lint=1 $(SOURCE)
  265.  
  266. conf_h = conf.h
  267. $(OBJECT) : $(conf_h) rcsbase.h
  268. maketime$o partime$o rcstime$o : partime.h
  269. maketime$o rcstime$o : maketime.h
  270.