home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 3 / goldfish_volume_3.bin / files / dev / c / cweb / makefile.amiga < prev    next >
Encoding:
Makefile  |  1994-12-14  |  7.8 KB  |  258 lines

  1. # This file, makefile.amiga, is part of CWEB (Version 3.3 [p11]).
  2. # It is distributed WITHOUT ANY WARRANTY, express or implied.
  3. #
  4. # Modified for SAS/C 6.51 under AmigaOS 2.1 on an AMIGA 2000 by
  5. # (scherer@genesis.informatik.rwth-aachen.de), March 1993
  6. # Last updated by Andreas Scherer, December 13, 1994
  7.  
  8. # Copyright (C) 1987,1990,1993 Silvio Levy and Donald E. Knuth
  9. # Copyright (C) 1993,1994 Andreas Scherer
  10.  
  11. # Permission is granted to make and distribute verbatim copies of this
  12. # document provided that the copyright notice and this permission notice
  13. # are preserved on all copies.
  14.  
  15. # Permission is granted to copy and distribute modified versions of this
  16. # document under the conditions for verbatim copying, provided that the
  17. # entire resulting derived work is given a different name and distributed
  18. # under the terms of a permission notice identical to this one.
  19.  
  20. # Read the README file, then edit this file to reflect local conditions
  21. #
  22.  
  23. # directory for TeX inputs (cwebmac.tex and (X|d|i)cwebmac.tex go here)
  24. MACROSDIR= cweb:macros/
  25.  
  26. # directory for CWEB inputs in @i files
  27. CWEBINPUTS= CWeb:,CWeb:include,CWeb:inputs
  28.  
  29. # extension for manual pages ("l" distinguishes local from system stuff)
  30. MANEXT= l
  31. #MANEXT= 1
  32.  
  33. # directory for manual pages (cweb.1 goes here)
  34. MANDIR= cweb:
  35.  
  36. # destination directory for executables; must end in /
  37. DESTDIR= cweb:bin/
  38.  
  39. # directory for GNU EMACS Lips code (cweb.el goes here)
  40. EMACSDIR= s:
  41.  
  42. # directory for language catalogs with message texts of the script file
  43. CATDIR= Locale:catalogs/
  44.  
  45. # directory for the language header file "cweb.h"
  46. CATINCLUDE= bin/catalogs/
  47.  
  48. # Set DESTPREF to null if you want to call the executables "tangle" and "weave"
  49. # (probably NOT a good idea; we recommend leaving DESTPREF=c)
  50. DESTPREF=c
  51.  
  52. # Set CCHANGES to comm-foo.ch if you need changes to common.w
  53. CCHANGES=common.ch
  54.  
  55. # Set TCHANGES to ctang-foo.ch if you need changes to ctangle.w
  56. TCHANGES=ctangle.ch
  57.  
  58. # Set WCHANGES to cweav-foo.ch if you need changes to cweave.w
  59. WCHANGES=cweave.ch
  60.  
  61. # Set PCHANGES to prod-foo.ch if you need changes to prod.w
  62. PCHANGES=
  63.  
  64. # Set MCHANGES to wmerge-foo.ch if you need changes to wmerge.w
  65. MCHANGES=wmerge.ch
  66.  
  67. # Set EXTENSION to either `c' if you want to treat CWEB as a system
  68. # of ordinary ANSI-C programs, or to `cc', `cxx', `cpp' or similar
  69. # if you want to treat CWEB as a system of C++ programs.  Your
  70. # compiler should be able to distinguish between the two forms
  71. # according to the source file extension.  Even with ANSI-C programs
  72. # it is strongly recommended to use C++ compilers, because of the
  73. # much stricter checking of type conversions and module interfaces.
  74. # For highest portability, all of the extra features of C++ are
  75. # avoided in the CWEB system.
  76. EXTENSION=cc
  77.  
  78. # These lists of arguments are specific for SC and SLINK.
  79. # Change, add or delete things here to suit your personal conditions.
  80. OBJS = LIB:cres.o
  81. LIBS = LIB:sc.lib
  82. CFLAGS = CPU=ANY INCLUDEDIR=$(CATINCLUDE) DEFINE=_DEV_NULL="NIL:" \
  83.     DEFINE=_STRICT_ANSI DEFINE=CWEBINPUTS="$(CWEBINPUTS)" \
  84.     DEFINE=SEPARATORS=",/:" NOSTACKCHECK NOICONS VERBOSE \
  85.     IGNORE=304+1597 OPTIMIZE
  86. LINKFLAGS = VERBOSE NOICONS STRIPDEBUG LIB $(LIBS) FROM $(OBJS)
  87.  
  88. # The `f' flag is turned off to save paper
  89. # The `lX' flag includes Xcwebmac.tex
  90. # The `s' flag displays some statistics
  91. WFLAGS=-f +lX +s
  92. TFLAGS=+s
  93.  
  94. # What C compiler are you using?
  95. CC = SC
  96. LINK = SLink
  97. MAKE = SMake
  98.  
  99. # RM and CP are used below in case rm and cp are aliased
  100. RM= delete
  101. CP= copy
  102. INSTALL= copy
  103.  
  104. ##########  You shouldn't have to change anything after this point #######
  105.  
  106. CWEAVE = cweave
  107. CTANGLE = ctangle
  108. WMERGE = wmerge
  109. SOURCES = cweave.w common.w ctangle.w
  110. ALMOSTALL = common.w ctangle.w wmerge.w makefile readme common.h \
  111.     common.$(EXTENSION) ctangle.$(EXTENSION) wmerge.$(EXTENSION) \
  112.     cwebman.tex cwebmana.ch cweb.1 cweb.man cweb.el prod.w \
  113.     $(CCHANGES) $(CHCHANGES) $(TCHANGES) $(WCHANGES) $(PCHANGES) \
  114.     comm-vms.ch ctang-vms.ch cweav-vms.ch \
  115.     comm-man.ch ctang-man.ch cweav-man.ch \
  116.     makefile.amiga makefile.pc makefile.unix \
  117.     $(MACROSDIR)cwebmac.tex $(MACROSDIR)Xcwebmac.tex \
  118.     $(MACROSDIR)dcwebmac.tex $(MACROSDIR)icwebmac.tex \
  119.     $(CATINCLUDE)cweb.h $(CATINCLUDE)dcweb.h $(CATINCLUDE)icweb.h \
  120.     examples
  121. ALL =  $(ALMOSTALL) cweave.w
  122.  
  123. .SUFFIXES: .dvi .tex .w
  124.  
  125. .w.tex:
  126.     $(CWEAVE) $(WFLAGS) $* $*
  127.  
  128. .tex.dvi:    
  129.     virtex &plain "\language=0 \input " $<
  130.  
  131. .w.dvi:
  132.     $(MAKE) $*.tex
  133.     $(MAKE) $*.dvi
  134.  
  135. .$(EXTENSION).o:
  136.     $(CC) $(CFLAGS) $*.$(EXTENSION)
  137.  
  138. .w.o:
  139.     $(MAKE) $*.$(EXTENSION)
  140.     $(MAKE) $*.o
  141.  
  142. # When you say `smake' without any arguments, `smake' will jump to this item
  143. default: ctangle cweave
  144.  
  145. # The complete set of files contains the two programs `ctangle' and
  146. # `cweave' plus the program `wmerge', the manuals `cwebman' and `cwebmana'
  147. # and the source documentations.
  148. all: progs docs
  149.  
  150. # The objects of desire
  151. progs: ctangle cweave wmerge
  152.  
  153. cautiously: ctangle
  154.     $(CP) common.$(EXTENSION) SAVEcommon.$(EXTENSION)
  155.     $(CTANGLE) $(TFLAGS) common $(CCHANGES) common.$(EXTENSION)
  156.     diff common.$(EXTENSION) SAVEcommon.$(EXTENSION)
  157.     $(RM) SAVEcommon.$(EXTENSION)
  158.     $(CP) ctangle.$(EXTENSION) SAVEctangle.$(EXTENSION)
  159.     $(CTANGLE) $(TFLAGS) ctangle $(TCHANGES) ctangle.$(EXTENSION)
  160.     diff ctangle.$(EXTENSION) SAVEctangle.$(EXTENSION)
  161.     $(RM) SAVEctangle.$(EXTENSION)
  162.  
  163. SAVEctangle.$(EXTENSION):
  164.     $(CP) ctangle.$(EXTENSION) SAVEctangle.$(EXTENSION)
  165.  
  166. SAVEcommon.$(EXTENSION):
  167.     $(CP) common.$(EXTENSION) SAVEcommon.$(EXTENSION)
  168.  
  169. common.$(EXTENSION): common.w $(CCHANGES)
  170.     $(CTANGLE) $(TFLAGS) common $(CCHANGES) common.$(EXTENSION)
  171.  
  172. common.o: common.$(EXTENSION) $(CATINCLUDE)cweb.h
  173.  
  174. ctangle: ctangle.o common.o
  175.     $(LINK) $(LINKFLAGS) common.o ctangle.o TO ctangle
  176.  
  177. ctangle.$(EXTENSION): ctangle.w $(TCHANGES)
  178.     $(CTANGLE) $(TFLAGS) ctangle $(TCHANGES) ctangle.$(EXTENSION)
  179.  
  180. ctangle.o: ctangle.$(EXTENSION) $(CATINCLUDE)cweb.h common.h
  181.  
  182. cweave: cweave.o common.o
  183.     $(LINK) $(LINKFLAGS) common.o cweave.o TO cweave
  184.  
  185. cweave.$(EXTENSION): cweave.w $(WCHANGES)
  186.     $(CTANGLE) $(TFLAGS) cweave $(WCHANGES) cweave.$(EXTENSION)
  187.  
  188. cweave.o: cweave.$(EXTENSION) $(CATINCLUDE)cweb.h common.h
  189.     $(CC) $(CFLAGS) code=FAR cweave.$(EXTENSION)
  190.  
  191. wmerge: wmerge.o
  192.     $(LINK) $(LINKFLAGS) wmerge.o TO wmerge
  193.  
  194. wmerge.o: wmerge.$(EXTENSION)
  195.     $(CC) $(CFLAGS) wmerge.$(EXTENSION)
  196.  
  197. wmerge.$(EXTENSION): wmerge.w $(MCHANGES)
  198.     $(CTANGLE) $(TFLAGS) wmerge $(MCHANGES) wmerge.$(EXTENSION)
  199.  
  200. # Take a good lecture for bedtime reading
  201. docs: cwebman.dvi cwebmana.dvi common.dvi ctangle.dvi cweave.dvi wmerge.dvi
  202.  
  203. cwebman.dvi: cwebman.tex
  204. cwebmana.dvi: cwebmana.tex
  205. common.dvi: common.tex
  206. ctangle.dvi: ctangle.tex
  207. cweave.dvi: cweave.tex
  208. wmerge.dvi: wmerge.tex
  209.  
  210. usermanual: cwebmana.dvi
  211.  
  212. fullmanual: usermanual $(SOURCES) comm-man.ch ctang-man.ch cweav-man.ch
  213.     $(MAKE) cweave
  214.     $(CWEAVE) common.w comm-man.ch
  215.     $(MAKE) common.dvi
  216.     $(CWEAVE) ctangle.w ctang-man.ch
  217.     $(MAKE) ctangle.dvi
  218.     $(CWEAVE) cweave.w cweav-man.ch
  219.     $(MAKE) cweave.dvi
  220.  
  221. cwebmana.tex: cwebman.tex cwebmana.ch
  222.     $(WMERGE) cwebman.tex cwebmana.ch cwebmana.tex
  223.  
  224. # for making the documentation we will have to include the change files
  225. ctangle.tex: ctangle.w common.h $(TCHANGES)
  226.     $(CWEAVE) $(WFLAGS) ctangle $(TCHANGES)
  227.  
  228. cweave.tex: cweave.w common.h $(WCHANGES)
  229.     $(CWEAVE) $(WFLAGS) cweave $(WCHANGES)
  230.  
  231. common.tex: common.w $(CCHANGES)
  232.     $(CWEAVE) $(WFLAGS) common $(CCHANGES)
  233.  
  234. wmerge.tex: wmerge.w $(MCHANGES)
  235.     $(CWEAVE) $(WFLAGS) wmerge $(MCHANGES)
  236.  
  237. # be sure to leave ctangle.$(EXTENSION) and common.$(EXTENSION)
  238. # and common.h for bootstrapping
  239. clean:
  240.     $(RM) \#?.(o|lnk|bak|log|dvi|toc|idx|scn) \
  241.     common.tex cweave.tex cweave.$(EXTENSION) ctangle.tex \
  242.     cweave ctangle cwebmana.tex wmerge.tex wmerge
  243.  
  244. # Install the new program versions where they can be found
  245. install: bin/ctangle bin/cweave bin/wmerge
  246.     $(INSTALL) cweave $(DESTDIR)$(DESTPREF)weave
  247.     $(INSTALL) ctangle $(DESTDIR)$(DESTPREF)tangle
  248.     $(INSTALL) wmerge $(DESTDIR)wmerge
  249.  
  250. # Make a shipable archive
  251. cweb.lha: $(ALL)
  252.     lha a x cweb.lha $(ALL)
  253.  
  254. cweb.tar.gz: $(ALL)
  255.     tar cvf cweb.tar $(ALL)
  256.     gzip cweb.tar
  257.