home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 2 / goldfish_vol2_cd1.bin / files / dev / c / cweb / makefile.pc < prev    next >
Makefile  |  1994-08-12  |  6KB  |  239 lines

  1. # This file, makefile.pc, is part of CWEB.
  2. # It is distributed WITHOUT ANY WARRANTY, express or implied.
  3. #
  4. # Modified for the Borland Turbo C/C++ 3.1 compiler under MSDOS by
  5. # Andreas Scherer (Abt-Wolf-Straße 17, 96215 Lichtenfels, Germany), July 1994
  6. # Last updated by Andreas Scherer, August 12, 1994
  7.  
  8. # Copyright (C) 1987,1990,1993 Silvio Levy and Donald E. Knuth
  9. # Copyright (C) 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. #
  21. # Read the README file, then edit this file to reflect local conditions
  22. #
  23.  
  24. # directory for TeX inputs (cwebmac.tex, ccwebmac.tex, or gcwebmac.tex go here)
  25. MACROSDIR= macros/
  26.  
  27. # directory for CWEB inputs in @i files
  28. CWEBINPUTS= inputs/
  29.  
  30. # extension for manual pages ("l" distinguishes local from system stuff)
  31. MANEXT= l
  32. #MANEXT= 1
  33.  
  34. # directory for manual pages (cweb.1 goes here)
  35. MANDIR=
  36.  
  37. # destination directory for executables; must end in /
  38. DESTDIR= bin/
  39.  
  40. # directory for GNU EMACS Lips code (cweb.el goes here)
  41. EMACSDIR=
  42.  
  43. # directory for the language header file "cweb.h"
  44. CATINCLUDE= bin/catalogs/
  45.  
  46. # Set DESTPREF to null if you want to call the executables "tangle" and "weave"
  47. # (probably NOT a good idea; we recommend leaving DESTPREF=c)
  48. DESTPREF=c
  49.  
  50. # Set CCHANGES to comm-foo.ch if you need changes to common.w
  51. CCHANGES=common.ch
  52.  
  53. # Set TCHANGES to ctang-foo.ch if you need changes to ctangle.w
  54. TCHANGES=ctangle.ch
  55.  
  56. # Set WCHANGES to cweav-foo.ch if you need changes to cweave.w
  57. WCHANGES=cweave.ch
  58.  
  59. # Set PCHANGES to prod-foo.ch if you need changes to prod.w
  60. PCHANGES=
  61.  
  62. # Set MCHANGES to wmerge-foo.ch if you need changes to wmerge.w
  63. MCHANGES=wmerge.ch
  64.  
  65. # These lists of arguments are specific for BCC.
  66. # Change, add or delete things here to suit your personal conditions.
  67. CFLAGS = -I$(CATINCLUDE) -DCWEBINPUTS="$(CWEBINPUTS)" -mh -AT
  68. LINKFLAGS = $(CFLAGS)
  69.  
  70. # By default my version of cweave includes the option for AMIGA keywords
  71. # and the use of German macros.  So you have to switch these off for all
  72. # the CWEB documentation.  Also the `f' flag is turned off to save paper
  73. WFLAGS=-f
  74.  
  75. # What C compiler are you using?
  76. CC = bcc
  77. LINK = bcc
  78. MAKE = make
  79.  
  80. # RM and CP are used below in case rm and cp are aliased
  81. RM= del
  82. CP= copy
  83. INSTALL= copy
  84.  
  85. ##########  You shouldn't have to change anything after this point #######
  86.  
  87. CWEAVE = cweave
  88. CTANGLE = ctangle
  89. WMERGE = wmerge
  90. SOURCES = cweave.w common.w ctangle.w
  91. ALMOSTALL = common.w ctangle.w wmerge.w makefile readme \
  92.     common.c common.h ctangle.c wmerge.c \
  93.     cwebman.tex cwebmang.ch cweb.1 cweb.man cweb.el prod.w \
  94.     $(CCHANGES) $(CHCHANGES) $(TCHANGES) $(WCHANGES) $(PCHANGES) \
  95.     comm-vms.ch ctang-vms.ch cweav-vms.ch \
  96.     comm-man.ch ctang-man.ch cweav-man.ch \
  97.     makefile.amiga makefile.pc makefile.unix \
  98.     $(MACROSDIR)cwebmac.tex $(MACROSDIR)ccwebmac.tex $(MACROSDIR)gcwebmac.tex \
  99.     $(CATINCLUDE)cweb.h examples
  100. ALL =  $(ALMOSTALL) cweave.w
  101.  
  102. .SUFFIXES: .dvi .tex .w
  103.  
  104. .w.tex:
  105.     $(CWEAVE) $(WFLAGS) $* $*
  106.  
  107. .tex.dvi:       
  108.     tex $<
  109.  
  110. .w.dvi:
  111.     $(MAKE) $*.tex
  112.     $(MAKE) $*.dvi
  113.  
  114. .c.obj:
  115.     $(CC) $(CFLAGS) -c $*.c
  116.  
  117. .w.c:
  118.     $(CTANGLE) $* $*
  119.  
  120. .w.obj:
  121.     $(MAKE) $*.c
  122.     $(MAKE) $*.obj
  123.  
  124. # When you say `smake' without any arguments, `smake' will jump to this item
  125. default: ctangle.exe cweave.exe
  126.  
  127. # The complete set of files contains the two programs `ctangle' and
  128. # `cweave' plus the program `wmerge', the manuals `cwebman' and `cwebmang'
  129. # and the source documentations.
  130. all: progs docs
  131.  
  132. # The objects of desire
  133. progs: ctangle.exe cweave.exe wmerge.exe
  134.  
  135. cautiously: $(CTANGLE)
  136.     $(CP) common.c SAVEcommon.c
  137.     $(CTANGLE) common $(CCHANGES)
  138.     diff common.c SAVEcommon.c
  139.     $(RM) SAVEcommon.c
  140.     $(CP) ctangle.c SAVEctangle.c
  141.     $(CTANGLE) ctangle $(TCHANGES)
  142.     diff ctangle.c SAVEctangle.c
  143.     $(RM) SAVEctangle.c
  144.  
  145. SAVEctangle.c:
  146.     $(CP) ctangle.c SAVEctangle.c
  147.  
  148. SAVEcommon.c:
  149.     $(CP) common.c SAVEcommon.c
  150.  
  151. common.c: common.w $(CCHANGES)
  152.     $(CTANGLE) common $(CCHANGES)
  153.  
  154. common.obj: common.c $(CATINCLUDE)cweb.h
  155.  
  156. ctangle.exe: ctangle.obj common.obj
  157.     $(LINK) $(LINKFLAGS) ctangle.obj common.obj
  158.  
  159. ctangle.c: ctangle.w $(TCHANGES)
  160.     $(CTANGLE) ctangle $(TCHANGES)
  161.  
  162. ctangle.obj: ctangle.c $(CATINCLUDE)cweb.h common.h
  163.  
  164. cweave.exe: cweave.obj common.obj
  165.     $(LINK) $(LINKFLAGS) cweave.obj common.obj
  166.  
  167. cweave.c: cweave.w $(WCHANGES)
  168.     $(CTANGLE) cweave $(WCHANGES)
  169.  
  170. cweave.obj: cweave.c $(CATINCLUDE)cweb.h common.h
  171.  
  172. wmerge.exe: wmerge.c
  173.     $(CC) $(CFLAGS) wmerge.c
  174.  
  175. wmerge.c: wmerge.w $(MCHANGES)
  176.     $(CTANGLE) wmerge $(MCHANGES)
  177.  
  178. # Take a good lecture for bedtime reading
  179. docs: cwebman.dvi cwebmang.dvi common.dvi ctangle.dvi cweave.dvi wmerge.dvi
  180.  
  181. cwebman.dvi: cwebman.tex
  182. cwebmang.dvi: cwebmang.tex
  183. common.dvi: common.tex
  184. ctangle.dvi: ctangle.tex
  185. cweave.dvi: cweave.tex
  186. wmerge.dvi: wmerge.tex
  187.  
  188. usermanual: cwebmang.dvi
  189.  
  190. fullmanual: usermanual $(SOURCES) comm-man.ch ctang-man.ch cweav-man.ch
  191.     $(MAKE) cweave
  192.     $(CWEAVE) common.w comm-man.ch
  193.     $(MAKE) common.dvi
  194.     $(CWEAVE) ctangle.w ctang-man.ch
  195.     $(MAKE) ctangle.dvi
  196.     $(CWEAVE) cweave.w cweav-man.ch
  197.     $(MAKE) cweave.dvi
  198.  
  199. cwebmang.tex: cwebman.tex cwebmang.ch
  200.     $(WMERGE) cwebman.tex cwebmang.ch cwebmang.tex
  201.  
  202. # for making the documentation we will have to include the change files
  203. ctangle.tex: ctangle.w common.h $(TCHANGES)
  204.     $(CWEAVE) $(WFLAGS) ctangle $(TCHANGES)
  205.  
  206. cweave.tex: cweave.w common.h $(WCHANGES)
  207.     $(CWEAVE) $(WFLAGS) cweave $(WCHANGES)
  208.  
  209. common.tex: common.w $(CCHANGES)
  210.     $(CWEAVE) $(WFLAGS) common $(CCHANGES)
  211.  
  212. wmerge.tex: wmerge.w $(MCHANGES)
  213.     $(CWEAVE) $(WFLAGS) wmerge $(MCHANGES)
  214.  
  215. # be sure to leave ctangle.c and common.c and common.h for bootstrapping
  216. clean:
  217.     $(RM) *.obj 
  218.     $(RM) *.bak
  219.     $(RM) *.log 
  220.     $(RM) *.dvi 
  221.     $(RM) *.toc 
  222.     $(RM) *.idx 
  223.     $(RM) *.scn 
  224.     $(RM) common.tex 
  225.     $(RM) cweave.tex 
  226.     $(RM) cweave.c 
  227.     $(RM) ctangle.tex 
  228.     $(RM) cweave.exe 
  229.     $(RM) ctangle.exe 
  230.     $(RM) cwebmang.tex 
  231.     $(RM) wmerge.tex 
  232.     $(RM) wmerge.exe
  233.  
  234. # Install the new program versions where they can be found
  235. install: bin/ctangle bin/cweave bin/wmerge $(MACROSDIR)ccwebmac.tex
  236.     $(INSTALL) cweave.exe $(DESTDIR)$(DESTPREF)weave.exe
  237.     $(INSTALL) ctangle.exe $(DESTDIR)$(DESTPREF)tangle.exe
  238.     $(INSTALL) wmerge.exe $(DESTDIR)wmerge.exe
  239.