home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / fweb153.zip / fweb-1.53 / web / Makefile < prev    next >
Makefile  |  1995-09-23  |  19KB  |  640 lines

  1.  
  2. # --- FWEB MAKE FILE (v. 1.50) ---
  3.  
  4. # NOTE:  The procedures for using this make file were changed beginning
  5. # with v1.30. 
  6. # Unix users should first type ``./configure'' for compiling a new version.
  7. # See the more detailed instructions below.
  8.  
  9. # PLEASE REPORT ANY DIFFICULTIES WITH USING THIS MAKE FILE OR WITH ANY
  10. # OTHER ASPECT OF COMPILING OR RUNNING FWEB:  krommes@princeton.edu.
  11.  
  12. # You should PREFACE ALL MAJOR OPERATIONS with
  13.  
  14. #    make -n ...
  15.  
  16. # This tells you what will happen without actually performing the operations.
  17.  
  18.  
  19. # --- PRINCIPAL ENTRY POINTS ---
  20.  
  21. # The principal entry points to this make file can be determined by saying
  22. # ``make help''.  (See the help: target below.)
  23.  
  24.  
  25. # BEFORE USING THIS MAKE FILE: 
  26.  
  27. #    (1) If you are a Unix user, do the following:
  28.  
  29. #        cd web
  30. #        ./configure [--prefix=path] [--exec-prefix=path]
  31. # (This generates the following files appropriate to your system:
  32. #    defaults.mk from defaults.mk.in;
  33. #    config.h from config.h.in;
  34. #    custom.h from custom.h.in.)
  35.  
  36. #        make
  37. # (log on as root)        
  38. #        make install
  39.  
  40. # If you are not a Unix user, DO NOT PROCEED for v1.50, as the following
  41. # system-specific bootstrap procedures have not been tested and upgraded for
  42. # this version.
  43.  
  44. #    (2) Select a boot subdirectory (containing system-specific files) most
  45. # relevant to your machine; call that $(BOOT_D).  For example, 
  46. # BOOT_D = boot/unix/ansi.
  47.  
  48. #    (3) Copy $(BOOT_D)/defaults.mk to the web subdirectory.
  49.  
  50. #    (4) Verify the system-specific definitions in defaults.mk.  An example
  51. # of defaults.mk is provided in each bootstrap subdirectory.  The possible
  52. # things that you may put into defaults.mk are discussed in 
  53. # $(MANUAL)/INSTALL_FWEB.tex.
  54.  
  55. #    (4) Copy $(BOOT_D)/custom.h to the web subdirectory.  This file
  56. # contains definitions of various machine- or operating-system-dependent
  57. # flags.  It will be included into the *.c files by the C compiler.
  58.  
  59.  
  60. # --- INCLUDING FILES into the Makefile ---
  61.  
  62. # The file defaults.mk customizes the operation of Makefile for your
  63. # compiler environment.
  64. # NOTE: Not all makes include files in identical ways; you may need to
  65. # modify the next line:
  66.  
  67. include defaults.mk # Unix
  68. # ! include "defaults.mk" # Borland/Microsoft
  69.  
  70.  
  71. # --------------------- DON'T TOUCH LINES BELOW HERE!!! --------------------
  72.  
  73. # Experts will note that this file sometimes doesn't use the full power of
  74. # make. This is because some of the makes on the personal computers didn't work
  75. # correctly with some of the more sophisticated commands.
  76.  
  77. # Here we set up the command-line options for the FWEB processors.  Those
  78. # options are as follows:
  79.  
  80. # COMPILER --- Either CC or GCC.  Presently only GCC is relevant, and then
  81. #            only for the Sun.
  82. # FILE --- Should more properly be called PATH.  The directory
  83. #            specification for the output file.
  84. # HOME_MACHINE --- The machine on which you're tangling.  See custom.web or
  85. #             custom.h for a list of the possible macros to use here.
  86. # MACHINE --- The machine for which you're generating C code.
  87.  
  88. # DEBUGGING --- Used by the developer.
  89. # STAT --- Optional additional commands, e.g., the statistics option -s;
  90. #        sometimes used by the developer.
  91. # UNDEF --- Used by the developer.
  92. #
  93. # You can override  macros such as MACHINE and FILE from the command line,
  94. # in the form, e.g.,
  95. #    make MACHINE=SGI FILE="$HOME/fweb/v1.1/unix/sgi"
  96.  
  97. UNDEF =
  98. DEBUGGING =
  99. STAT =
  100.  
  101. # In $(OPTIONS), 
  102. # the -u option is used to cancel out a possible +m command in the .fweb
  103. # ini file. For the use of CUSTOM_OPTIONS, see custom.web. 
  104. # To kill off line numbers, say ``STAT = -\#'' for many makes, or 
  105. # ``STAT = -^#'' for the Microsoft nmake.
  106.  
  107. OPTIONS = -u$(HOME_MACHINE) -m$(MACHINE) $(DEBUGGING)\
  108.      $(UNDEF) -m$(COMPILER) $(STAT) -=$(FILE)$(@)
  109.  
  110. # Other upper-case macros, such as OS_HWEB, are used to express hidden
  111. # dependencies because of files that are @i'd or #included.
  112.  
  113. # For more discussion of the various files, please see INSTALL_FWEB.tex.
  114.  
  115. # Set up the directory macros.  (top_srcdir and srcdir should be set in
  116. # defaults.mk.  If they are not, one must say `top_srcdir=..', `srcdir=.')
  117.  
  118. # --- Top-level--- 
  119. FWEB0 = $(top_srcdir)
  120.  
  121. # --- The bootstrap directory tree ---
  122. BOOT = $(FWEB0)/boot
  123.  
  124. # --- Where the demo programs are kept ---
  125. DEMOS = $(FWEB0)/demos
  126.  
  127. # --- Where the user manual and fwebmac.sty are kept ---
  128. MANUAL = $(FWEB0)/manual
  129.  
  130. # --- Where *.web, *.hweb, *.c, and *.h are kept ---
  131. WEB = $(srcdir)
  132.  
  133. # If you just say ``make'' or ``make bootstrap'', the source files are
  134. # touched first so they're sure to be newer than the web files.  If you don't
  135. # have a 'touch' facility, try saying ``make -t ...'' 
  136. all bootstrap boot: tch_src both $(MANUAL)/fweb.info
  137.  
  138. tch_src:
  139.     $(TOUCH) $(WEB)/typedefs.hweb $(WEB)/*.h $(WEB)/*.c 
  140.  
  141. # --- This entry makes both FWEB processors from the FWEB sources. ---
  142. both: ftangle fweave
  143.  
  144. # --- The ``make bootstrap'' command assumes that the WEB files are there.
  145. # However, if you're just compiling you shouldn't need the WEB files.  In the
  146. # absence of a WEB file, the null .DEFAULT command ``rebuilds'' the WEB file.
  147. # Then make will try to invoke ftangle.  That shouldn't be there either,
  148. # but if it is, it will try to tangle a non-existent file.  The .IGNORE
  149. # command tells make to continue anyway; then it will just compile.  
  150. # (Unfortunately, these commands don't work with all makes, so they're
  151. # commented out.)
  152. #.DEFAULT:
  153.  
  154. #.IGNORE:
  155.  
  156. # --- Remake things if the make commands themselves change ---
  157. # .KEEP_STATE:
  158.  
  159. # --- CUSTOMIZATION FILE ---
  160. $(WEB)/custom.h $(WEB)/custom.h.in: $(WEB)/custom.web
  161.     ./ftangle $(WEB)/custom $(OPTIONS) $(CUSTOM_OPTIONS) -# -v
  162.  
  163. # --- EXTRA MACRO FILE ---
  164. $(WEB)/strmac.h: $(WEB)/strmac.web $(WEB)/os.$(HWEB)
  165.     ./ftangle $(WEB)/strmac $(OPTIONS)
  166.  
  167. # --- #INCLUDEs ---
  168. INCLUDES_H = $(WEB)/os.h $(WEB)/config.h $(WEB)/custom.h $(WEB)/strmac.h
  169.  
  170. D_TYPE_H = $(WEB)/d_type.h $(INCLUDES_H)
  171. Y_TYPE_H = $(WEB)/y_type.h $(INCLUDES_H)
  172. C_TYPE_H = $(WEB)/c_type.h $(Y_TYPE_H) $(D_TYPE_H)
  173.  
  174. A_TYPE_H = $(WEB)/a_type.h $(INCLUDES_H)
  175. S_TYPE_H = $(WEB)/s_type.h $(A_TYPE_H)
  176.  
  177. M_TYPE_H = $(WEB)/m_type.h $(INCLUDES_H)
  178. E_TYPE_H = $(WEB)/e_type.h $(C_TYPE_H)
  179. R_TYPE_H = $(WEB)/r_type.h $(C_TYPE_H)
  180. T_TYPE_H = $(WEB)/t_type.h\
  181.          $(S_TYPE_H) $(R_TYPE_H) $(E_TYPE_H) $(M_TYPE_H)
  182.  
  183. P_TYPE_H = $(WEB)/p_type.h $(INCLUDES_H)
  184. W_TYPE_H = $(WEB)/w_type.h\
  185.          $(P_TYPE_H) $(C_TYPE_H) $(S_TYPE_H) $(D_TYPE_H)
  186.  
  187. TYPEDEFS_H = $(WEB)/typedefs.h $(WEB)/os.h
  188. MAP_H = $(WEB)/map.h $(C_TYPE_H) $(S_TYPE_H)
  189.  
  190. # --- PORTABILITY ISSUES are mostly localized here. ---
  191. OS_HWEB = $(WEB)/os.$(HWEB) $(WEB)/sfile.$(HWEB) 
  192. INCLUDES_HWEB = $(WEB)/sfile.$(HWEB) $(WEB)/includes.$(HWEB)\
  193.          $(WEB)/proto.$(HWEB) $(WEB)/time.$(HWEB)
  194. COMMON_HWEB = $(OS_HWEB) $(WEB)/typedefs.$(HWEB) $(WEB)/mem.$(HWEB)
  195.  
  196. $(WEB)/os.h: $(WEB)/os.web $(INCLUDES_HWEB)
  197.     ./ftangle $(WEB)/os $(OPTIONS) -#
  198.  
  199. # --- The fundamental macro packages: ---
  200. $(WEB)/typedefs.hweb $(WEB)/typedefs.h: $(WEB)/typedefs.web
  201.     ./ftangle $(WEB)/typedefs $(OPTIONS) --F -# -=$(FILE)typedefs.h
  202.  
  203. $(WEB)/map.h: $(WEB)/map.web
  204.     ./ftangle $(WEB)/map $(OPTIONS)
  205.  
  206. # --- COMMON (Routines common to both ftangle and fweave) ---
  207. COMMON = $(INCLUDES_HWEB) $(OS_HWEB)\
  208.         $(WEB)/typedefs.$(HWEB)\
  209.         $(WEB)/mem.$(HWEB) $(WEB)/trunc.$(HWEB) 
  210. COMMON_WEB = $(WEB)/common.web $(COMMON) 
  211.  
  212. $(WEB)/common.c: $(COMMON_WEB)
  213.     ./ftangle $(WEB)/common $(OPTIONS)
  214.  
  215. C_TYPE_WEB = $(WEB)/c_type.web $(OS_HWEB) 
  216.  
  217. $(WEB)/c_type.h: $(C_TYPE_WEB)
  218.     ./ftangle $(WEB)/c_type $(OPTIONS)
  219.  
  220. Y_TYPE_WEB = $(WEB)/y_type.web $(OS_HWEB)
  221.  
  222. $(WEB)/y_type.h: $(Y_TYPE_WEB)
  223.     ./ftangle $(WEB)/y_type $(OPTIONS)
  224.  
  225. COMMON_C = $(WEB)/common.c $(TYPEDEFS_H) $(MAP_H)
  226.  
  227. COMMONS = common.$(O) $(COMMON2)
  228.  
  229. commons:  $(COMMONS)
  230.  
  231. common.$(O): $(COMMON_C)
  232.     $(COMPILE) $(PART1) $(WEB)/common.c        
  233.  
  234. common2.$(O): $(COMMON_C) 
  235.     $(COMPILE) $(PART2) $(WEB)/common.c        
  236.  
  237.  
  238. # --- STYLE (Reading the style file; also needed for both ftangle and
  239. # fweave) --- 
  240. S_TYPE_WEB = $(WEB)/s_type.web
  241.  
  242. $(WEB)/s_type.h: $(S_TYPE_WEB)
  243.     ./ftangle $(WEB)/s_type $(OPTIONS)
  244.  
  245. STYLE =  $(OS_HWEB) $(INCLUDES_HWEB)\
  246.          $(WEB)/typedefs.$(HWEB) $(WEB)/mem.$(HWEB)
  247. STYLE_WEB = $(WEB)/style.web $(STYLE)
  248.  
  249. $(WEB)/style.c: $(STYLE_WEB)
  250.     ./ftangle $(WEB)/style $(OPTIONS)
  251.  
  252. style.$(O): $(WEB)/style.c $(TYPEDEFS_H) $(MAP_H)
  253.     $(COMPILE) $(WEB)/style.c        
  254.  
  255.  
  256. # --- TERMCAP (Dummy termcap routines) ---
  257. A_TYPE_WEB = $(WEB)/a_type.web $(OS_HWEB)
  258.  
  259. $(WEB)/a_type.h: $(A_TYPE_WEB)
  260.     ./ftangle $(WEB)/a_type $(OPTIONS)
  261.  
  262. TERMCAP0_WEB = $(WEB)/termcap0.web 
  263.  
  264. $(WEB)/termcap0.c: $(TERMCAP0_WEB)
  265.     ./ftangle $(WEB)/termcap0 $(OPTIONS)
  266.  
  267. termcap0.$(O): $(WEB)/termcap0.c $(A_TYPE_H)
  268.     $(COMPILE) $(WEB)/termcap0.c
  269.  
  270.  
  271. # --- RESERVED WORDS ---
  272. D_TYPE_WEB = $(WEB)/d_type.web $(OS_HWEB)
  273.  
  274. $(WEB)/d_type.h: $(D_TYPE_WEB)
  275.     ./ftangle $(WEB)/d_type $(OPTIONS)
  276.  
  277. RESERVED_WEB = $(WEB)/reserved.web $(COMMON_HWEB)
  278.  
  279. $(WEB)/reserved.c: $(RESERVED_WEB)
  280.     ./ftangle $(WEB)/reserved $(OPTIONS)
  281.  
  282. RESERVED_C = $(WEB)/reserved.c $(TYPEDEFS_H) $(C_TYPE_H)
  283.  
  284. RESERVES = reserved.$(O) $(RESERVED2)
  285.  
  286. reserves: $(RESERVES)
  287.  
  288. reserved.$(O): $(RESERVED_C)
  289.     $(COMPILE) $(PART1) $(WEB)/reserved.c
  290.  
  291. reservd2.$(O): $(RESERVED_C)
  292.     $(COMPILE) $(PART2) $(WEB)/reserved.c
  293.  
  294.  
  295. # --- MACS (Macro processing for ftangle) ---
  296. M_TYPE_WEB = $(WEB)/m_type.web $(OS_HWEB)  
  297.  
  298. $(WEB)/m_type.h: $(M_TYPE_WEB)
  299.     ./ftangle $(WEB)/m_type $(OPTIONS)
  300.  
  301. MACS = $(COMMON_HWEB) $(WEB)/macs.$(HWEB) $(WEB)/t_codes.$(HWEB)\
  302.         $(WEB)/texts.$(HWEB) $(WEB)/stacks.$(HWEB)\
  303.         $(WEB)/val.$(HWEB) $(WEB)/trunc.$(HWEB)
  304. MACS_WEB = $(WEB)/macs.web $(MACS)  
  305.  
  306. $(WEB)/macs.c: $(MACS_WEB)
  307.     ./ftangle $(WEB)/macs $(OPTIONS)    
  308.  
  309. macs.$(O): $(WEB)/macs.c $(T_TYPE_H) $(TYPEDEFS_H) $(MAP_H)
  310.     $(COMPILE) $(WEB)/macs.c        
  311.  
  312.  
  313. # --- RATFOR (Implementing the Ratfor language for ftangle) ---
  314. RATFOR = $(COMMON_HWEB) $(WEB)/t_codes.$(HWEB) $(WEB)/texts.$(HWEB)\
  315.         $(WEB)/stacks.$(HWEB) $(WEB)/val.$(HWEB)\
  316.         $(WEB)/macs.$(HWEB)\
  317.         $(WEB)/trunc.$(HWEB)
  318. RATFOR_WEB = $(WEB)/ratfor.web $(RATFOR)  
  319.  
  320. $(WEB)/ratfor.c: $(RATFOR_WEB)
  321.     ./ftangle $(WEB)/ratfor $(OPTIONS)
  322.  
  323. R_TYPE_WEB = $(WEB)/r_type.web $(OS_HWEB)  
  324.  
  325. $(WEB)/r_type.h: $(R_TYPE_WEB)
  326.     ./ftangle $(WEB)/r_type $(OPTIONS)
  327.  
  328. RATFOR_C = $(WEB)/ratfor.c $(T_TYPE_H) $(TYPEDEFS_H) $(MAP_H)
  329.  
  330. RATFORS = ratfor$(LOAD_RATFOR).$(O) $(RATFOR2)
  331.  
  332. ratfors:  $(RATFORS)
  333.  
  334. ratfor.$(O): $(RATFOR_C)
  335.     $(COMPILE) $(PART1) $(WEB)/ratfor.c        
  336.  
  337. ratfor2.$(O): $(RATFOR_C)
  338.     $(COMPILE) $(PART2) $(WEB)/ratfor.c        
  339.  
  340. RATFOR0_WEB = $(WEB)/ratfor0.web $(RATFOR)
  341.  
  342. $(WEB)/ratfor0.c: $(RATFOR0_WEB)
  343.     ./ftangle $(WEB)/ratfor0 $(OPTIONS)
  344.  
  345. ratfor0.$(O): $(WEB)/ratfor0.c $(T_TYPE_H)
  346.     $(COMPILE) $(WEB)/ratfor0.c
  347.  
  348.  
  349. # --- EVAL (Expression evaluation) ---
  350. EVAL = $(COMMON_HWEB) $(WEB)/val.$(HWEB) $(WEB)/os.$(HWEB)\
  351.         $(WEB)/t_codes.$(HWEB)
  352. EVAL_WEB = $(WEB)/eval.web $(EVAL)  
  353.  
  354. $(WEB)/eval.c: $(EVAL_WEB)
  355.     ./ftangle $(WEB)/eval $(OPTIONS)    
  356.  
  357. E_TYPE_WEB = $(WEB)/e_type.web $(OS_HWEB) 
  358.  
  359. $(WEB)/e_type.h: $(E_TYPE_WEB)
  360.     ./ftangle $(WEB)/e_type $(OPTIONS)
  361.  
  362. eval.$(O): $(WEB)/eval.c $(E_TYPE_H) $(TYPEDEFS_H)
  363.     $(COMPILE) $(WEB)/eval.c        
  364.  
  365.  
  366. # --- FTANGLE (The ftangle processor) ---
  367. FTANGLE = $(COMMON_HWEB) $(WEB)/macs.$(HWEB) $(WEB)/t_codes.$(HWEB)\
  368.         $(WEB)/texts.$(HWEB) $(WEB)/stacks.$(HWEB)\
  369.         $(WEB)/val.$(HWEB) $(WEB)/trunc.$(HWEB)
  370. FTANGLE_WEB = $(WEB)/ftangle.web $(FTANGLE)  
  371.  
  372. $(WEB)/ftangle.c: $(FTANGLE_WEB)
  373.     ./ftangle $(WEB)/ftangle $(OPTIONS)
  374.  
  375. T_TYPE_WEB = $(WEB)/t_type.web $(OS_HWEB) 
  376.  
  377. $(WEB)/t_type.h: $(T_TYPE_WEB)
  378.     ./ftangle $(WEB)/t_type $(OPTIONS)
  379.  
  380. FTANGLE_C = $(WEB)/ftangle.c $(T_TYPE_H) $(TYPEDEFS_H) $(MAP_H)
  381.  
  382. FTANGLES = ftangle.$(O) $(FTANGLE2) $(FTANGLE3)
  383.  
  384. ftangles: $(FTANGLES)
  385.  
  386. ftangle.$(O): $(FTANGLE_C)
  387.     $(COMPILE) $(PART1) $(WEB)/ftangle.c    
  388.  
  389. ftangle2.$(O): $(FTANGLE_C)
  390.     $(COMPILE) $(PART2) $(WEB)/ftangle.c     
  391.  
  392. ftangle3.$(O): $(FTANGLE_C)
  393.     $(COMPILE) $(PART3) $(WEB)/ftangle.c
  394.  
  395. # In the following, ftangle0 is used when making with LOAD_RATFOR=0.
  396. ftangle ftangle0 ftangle.exe: $(FTANGLES)\
  397.         $(COMMONS) $(RATFORS) $(RESERVES) \
  398.         eval.$(O) macs.$(O) style.$(O) $(TERMCAP0)
  399.     $(LINK) ftangle$(OBJ) $(FTANGLE2) $(FTANGLE3)\
  400.         common$(OBJ) $(COMMON2)\
  401.         reserved$(OBJ) $(RESERVED2)\
  402.         ratfor$(LOAD_RATFOR)$(OBJ) $(RATFOR2)\
  403.         eval$(OBJ) macs$(OBJ) style$(OBJ) $(TERMCAP0)\
  404.         $(LIBS)
  405.  
  406. # --- PROD (The ``productions'' for fweave) ---
  407. P_TYPE_WEB = $(WEB)/p_type.web $(OS_HWEB)  
  408.  
  409. $(WEB)/p_type.h: $(P_TYPE_WEB)
  410.     ./ftangle $(WEB)/p_type $(OPTIONS)
  411.  
  412. PROD = $(COMMON_HWEB) $(WEB)/xrefs.$(HWEB) $(WEB)/tokens.$(HWEB)\
  413.         $(WEB)/ccodes.$(HWEB) $(WEB)/output.$(HWEB)\
  414.         $(WEB)/scraps.$(HWEB)
  415.  
  416. PROD_WEB = $(WEB)/prod.web $(PROD)  
  417.  
  418. $(WEB)/prod.c: $(PROD_WEB)
  419.     ./ftangle $(WEB)/prod $(OPTIONS)    
  420.  
  421. PROD_C = $(WEB)/prod.c $(P_TYPE_H) $(TYPEDEFS_H) $(MAP_H)
  422.  
  423. PRODS = prod.$(O) $(PROD2)
  424.  
  425. prods:  $(PRODS)
  426.  
  427. prod.$(O): $(PROD_C)
  428.     $(COMPILE) $(PART1) $(WEB)/prod.c        
  429.  
  430. prod2.$(O): $(PROD_C)
  431.     $(COMPILE) $(PART2) $(WEB)/prod.c        
  432.  
  433.  
  434. # --- FWEAVE (The fweave processor) ---
  435. W_TYPE_WEB = $(WEB)/w_type.web $(OS_HWEB)  
  436.  
  437. $(WEB)/w_type.h: $(W_TYPE_WEB)
  438.     ./ftangle $(WEB)/w_type $(OPTIONS)
  439.  
  440. FWEAVE = $(COMMON_HWEB) $(WEB)/xrefs.$(HWEB) $(WEB)/tokens.$(HWEB)\
  441.         $(WEB)/ccodes.$(HWEB) $(WEB)/output.$(HWEB)\
  442.         $(WEB)/scraps.$(HWEB)
  443.  
  444. FWEAVE_WEB = $(WEB)/fweave.web $(FWEAVE)  
  445.  
  446. $(WEB)/fweave.c: $(FWEAVE_WEB)
  447.     ./ftangle $(WEB)/fweave $(OPTIONS)
  448.  
  449. FWEAVE_C = $(WEB)/fweave.c $(W_TYPE_H) $(TYPEDEFS_H) $(MAP_H)
  450.  
  451. FWEAVES = fweave.$(O) $(FWEAVE2) $(FWEAVE3)
  452.  
  453. fweaves: $(FWEAVES)
  454.  
  455. fweave.$(O): $(FWEAVE_C)
  456.     $(COMPILE) $(PART1) $(WEB)/fweave.c        
  457.  
  458. fweave2.$(O): $(FWEAVE_C)
  459.     $(COMPILE) $(PART2) $(WEB)/fweave.c        
  460.  
  461. fweave3.$(O): $(FWEAVE_C)
  462.     $(COMPILE) $(PART3) $(WEB)/fweave.c
  463.  
  464. fweave fweave.exe: $(FWEAVES)\
  465.         $(COMMONS) $(PRODS) ratfor0.$(O) $(RESERVES) style.$(O)\
  466.         $(TERMCAP0)    
  467.     $(LINK) fweave$(OBJ) $(FWEAVE2) $(FWEAVE3)\
  468.         common$(OBJ) $(COMMON2)\
  469.         prod$(OBJ) $(PROD2)\
  470.         reserved$(OBJ) $(RESERVED2)\
  471.         style$(OBJ) ratfor0$(OBJ) $(TERMCAP0)\
  472.         $(LIBS)
  473.  
  474.  
  475. #------------------------------------------------------------------------------
  476.  
  477. # --- DOCUMENTATION ---
  478. FWEB_TEX = $(FWEB0)fweb.tex # This file is included for all documentation.
  479.  
  480. # --- We can handle all the dvi files with a generalized suffix rule. ---
  481.  
  482. # If your make (e.g., Borland) doesn't like the following line, try just
  483. # commenting it out. 
  484. .SUFFIXES: .tex .dvi 
  485.  
  486. .tex.dvi: 
  487.     tex $*            
  488.     $(PRINT_DVI) $(@)
  489.  
  490. # In the following, note the occasional use of the -i command-line option
  491. # to fweave. This prevents repeated printing of the header files that are
  492. # included via @I.
  493.  
  494. fwebmac.tex: $(MANUAL)/fwebmac.web
  495.     ./fweave $(MANUAL)/fwebmac
  496.  
  497. custom.tex: $(WEB)/custom.web $(WEB)/formats.$(HWEB)
  498.     ./fweave $(WEB)/custom
  499.  
  500. strmac.tex: $(WEB)/strmac.web $(OS_HWEB) $(WEB)/formats.$(HWEB)
  501.     ./fweave $(WEB)/strmac -i
  502.  
  503. y_type.tex: $(Y_TYPE_WEB) $(WEB)/formats.$(HWEB)
  504.     ./fweave $(WEB)/y_type -i
  505.  
  506. c_type.tex: $(C_TYPE_WEB) $(WEB)/formats.$(HWEB)
  507.     ./fweave $(WEB)/c_type -i    
  508.  
  509. common.tex: $(COMMON_WEB)
  510.     ./fweave $(WEB)/common
  511.  
  512. e_type.tex: $(E_TYPE_WEB) $(WEB)/formats.$(HWEB)
  513.     ./fweave $(WEB)/e_type -i    
  514.  
  515. eval.tex: $(EVAL_WEB)
  516.     ./fweave $(WEB)/eval -i        
  517.  
  518. m_type.tex: $(M_TYPE_WEB) $(WEB)/formats.$(HWEB)
  519.     ./fweave $(WEB)/m_type -i    
  520.  
  521. macs.tex: $(MACS_WEB)
  522.     ./fweave $(WEB)/macs -i        
  523.  
  524. p_type.tex: $(P_TYPE_WEB) $(WEB)/formats.$(HWEB)
  525.     ./fweave $(WEB)/p_type -i    
  526.  
  527. prod.tex: $(PROD_WEB)
  528.     ./fweave $(WEB)/prod -i        
  529.  
  530. r_type.tex: $(R_TYPE_WEB) $(WEB)/formats.$(HWEB)
  531.     ./fweave $(WEB)/r_type -i    
  532.  
  533. ratfor.tex: $(RATFOR_WEB)
  534.     ./fweave $(WEB)/ratfor -i    
  535.  
  536. ratfor0.tex: $(RATFOR0_WEB)
  537.     ./fweave $(WEB)/ratfor0 -i
  538.  
  539. d_type.tex: $(D_TYPE_WEB) $(WEB)/formats.$(HWEB)
  540.     ./fweave $(WEB)/d_type -i
  541.  
  542. reserved.tex: $(RESERVED_WEB)
  543.     ./fweave $(WEB)/reserved -i -ykw750
  544.  
  545. t_type.tex: $(T_TYPE_WEB) $(WEB)/formats.$(HWEB)
  546.     ./fweave $(WEB)/t_type -i    
  547.  
  548. ftangle.tex: $(FTANGLE_WEB)
  549.     ./fweave $(WEB)/ftangle -i
  550.  
  551. s_type.tex: $(S_TYPE_WEB) $(WEB)/formats.$(HWEB)
  552.     ./fweave $(WEB)/s_type -i    
  553.  
  554. style.tex: $(STYLE_WEB)
  555.     ./fweave $(WEB)/style -i        
  556.  
  557. a_type.tex: $(A_TYPE_WEB) $(WEB)/formats.$(HWEB)
  558.     ./fweave $(WEB)/a_type -i
  559.  
  560. termcap0.tex: $(TERMCAP0_WEB)
  561.     ./fweave $(WEB)/termcap0 -i
  562.  
  563. w_type.tex: $(W_TYPE_WEB) $(WEB)/formats.$(HWEB)
  564.     ./fweave $(WEB)/w_type -i    
  565.  
  566. fweave.tex: $(FWEAVE_WEB)
  567.     ./fweave $(WEB)/fweave -i
  568.  
  569. #------------------------------------------------------------------------------
  570.  
  571. # --- INSTALLATION of the processors ---
  572.  
  573. install: both $(MANUAL)/fweb.info
  574.     @echo ""
  575.     @echo "If any changes need to be made to the default directories,"
  576.     @echo "please use --prefix and/or --exec-prefix options to configure,"
  577.     @echo " or edit ./defaults.mk.in, then rerun ./configure."
  578.     @echo ""
  579.     $(INSTALL_PROGRAM) ftangle $(bindir)/ftangle
  580.     $(INSTALL_PROGRAM) fweave $(bindir)/fweave
  581.     test -d $(texdir) || mkdir $(texdir)
  582.     $(INSTALL_DATA) $(MANUAL)/fwebmac.sty $(texdir)/fwebmac.sty
  583.     $(INSTALL_DATA) $(MANUAL)/fweb.tex $(texdir)/fweb.tex
  584.     $(INSTALL_DATA) $(MANUAL)/fweb.1 $(mandir)/fweb.$(manext)
  585.     $(INSTALL_DATA) $(MANUAL)/fweb.info $(infodir)/fweb.info
  586.     $(INSTALL_DATA) $(MANUAL)/fweb.info-1 $(infodir)/fweb.info-1
  587.     $(INSTALL_DATA) $(MANUAL)/fweb.info-2 $(infodir)/fweb.info-2
  588.     $(INSTALL_DATA) $(MANUAL)/fweb.info-3 $(infodir)/fweb.info-3
  589.     $(INSTALL_DATA) $(MANUAL)/fweb.info-4 $(infodir)/fweb.info-4
  590.     $(INSTALL_DATA) $(MANUAL)/fweb.info-5 $(infodir)/fweb.info-5
  591.     $(INSTALL_DATA) $(MANUAL)/fweb.info-6 $(infodir)/fweb.info-6
  592.     $(INSTALL_DATA) $(MANUAL)/fweb.info-7 $(infodir)/fweb.info-7
  593.     $(INSTALL_DATA) $(MANUAL)/fweb.texi $(texinfodir)/fweb.texi
  594.     @echo ""
  595.     @echo "DON'T FORGET TO RECORD THE PRESENCE OF fweb.info BY EDITING $(infodir)/dir."
  596.  
  597. uninstall:
  598.     @echo "Sorry, uninstall is not implemented yet!"
  599.  
  600. $(MANUAL)/fweb.info: $(MANUAL)/fweb.texi
  601.     cd $(MANUAL) && makeinfo --fill-column=70 fweb.texi
  602.  
  603. # --- CLEANUP ---
  604. all_clean very_clean: clean clean_man clean_install
  605.  
  606. # --- Clean up the OBJECT FILES ---
  607. clean:
  608.     $(RM) -f ftangle fweave *.o core
  609.  
  610. mostlyclean: clean
  611.  
  612. distclean: clean
  613.     $(RM) -f defaults.mk config.cache config.log config.status
  614.  
  615. realclean: distclean
  616.  
  617.  
  618. # --- HELP ---
  619. help:
  620.     @echo "Important targets for this Makefile:"
  621.     @echo ""
  622.     @echo " all       --- Touch *.c and *.h, then compile and link"
  623.     @echo "              ftangle and fweave."
  624.     @echo " both      --- Tangle, compile, and link ftangle and"
  625.     @echo "              fweave from the FWEB sources."
  626.     @echo " clean     --- Removes the FWEB processors and object files."
  627.     @echo " distclean --- Like clean, but also deletes defaults.mk,"
  628.     @echo "               config.cache, config.log, and config.status."
  629.     @echo " ftangle   --- Tangle, compile, and link ftangle."
  630.     @echo " fweave    --- Tangle, compile, and link fweave."
  631.     @echo " help      --- Obtain help about this Makefile."
  632.     @echo " install   --- Install the processors (you must be root)."
  633.     @echo " *.tex     --- Woven documentation for FWEB source code."
  634.     @echo " *.dvi     --- Document AND PRINT FWEB source code."
  635.     @echo "               (To prevent a dvi file from being printed"
  636.     @echo "               automatically, uncomment the #ECHO = line in"
  637.     @echo "               defaults.mk.in.)"
  638.  
  639.  
  640.