home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / unixtex-6.1b-src.tgz / tar.out / contrib / unixtex / web2c / man / Makefile.in < prev    next >
Makefile  |  1996-09-28  |  6KB  |  227 lines

  1. # Makefile for web2c manual pages.
  2. # You need to change the variables and the pathnames only if this
  3. # Makefile is invoked on its own, instead of from `../Makefile'.
  4.  
  5. SHELL = /bin/sh
  6. srcdir = @srcdir@
  7. VPATH = @srcdir@
  8.  
  9. # This is so kpathsea will get remade automatically if you change
  10. # something in it and recompile from the package directory.
  11. kpathsea_parent = ../..
  12. kpathsea_dir = $(kpathsea_parent)/kpathsea
  13. kpathsea = $(kpathsea_dir)/kpathsea.a
  14.  
  15. INSTALL = @INSTALL@
  16. INSTALL_DATA = @INSTALL_DATA@
  17.  
  18. DITROFF = ditroff
  19. DITROFF = groff
  20.  
  21. # These pathnames are used to customize the manual pages with local
  22. # directory names.  They should match the system directories so the
  23. # documentation and the programs will be consistent. They are overridden
  24. # by make from web2c/Makefile.
  25. # The following make definitions (down to `end of installation
  26. # directories') are repeated in several Makefiles, because different
  27. # installations like to change them at different levels. If you edit the
  28. # top-level Makefile, the changes should propagate, however.
  29. # The following define installation directories. The default paths are
  30. # defined in kpathsea/paths.h, which is built from kpathsea/paths.h.in.
  31. # See kpathsea/INSTALL for a description of how the various path-related
  32. # files are used and created.
  33.  
  34. # Generic installation directories.
  35. prefix = /usr/local
  36. exec_prefix = $(prefix)
  37. bindir = $(exec_prefix)/bin
  38. scriptdir = $(bindir)
  39. libdir = $(exec_prefix)/lib
  40. datadir = $(prefix)/lib
  41. infodir = $(prefix)/info
  42. includedir = $(prefix)/include
  43. manext = 1
  44. mandir = $(prefix)/man/man$(manext)
  45.  
  46. # TeX & MF-specific directories. Not all of the following are relevant
  47. # for all programs, but it seems cleaner to collect everything in one place.
  48.  
  49. # The default paths are now in kpathsea/Makefile.in. Passing all the
  50. # paths to sub-makes can make the arg list too long on system V.
  51.  
  52. # The root of the tree.
  53. texmf_prefix = $(datadir)/texmf
  54.  
  55. # TeX and MF source files.
  56. texinputdir = $(texmf_prefix)/tex
  57. mfinputdir = $(texmf_prefix)/mf
  58.  
  59. # The top-level font directory.
  60. fontdir = $(texmf_prefix)/fonts
  61.  
  62. # Where memory dumps are installed.
  63. fmtdir = $(texmf_prefix)/ini
  64. basedir = $(fmtdir)
  65.  
  66. # Pool files.
  67. texpooldir = $(texmf_prefix)/ini
  68. mfpooldir = $(texpooldir)
  69.  
  70. # The PostScript TFM and VF files get installed in subdirectories of
  71. # this directory, named for the typeface families of these directories.
  72. psfontdir = $(fontdir)/adobe
  73.  
  74. # Where the configuration files get installed.
  75. dvips_prefix = $(texmf_prefix)/dvips
  76. configdir = $(dvips_prefix)
  77.  
  78. # Where the PostScript prologues go.
  79. headerdir = $(configdir)
  80.  
  81. # Where dvips' TeX macro files get installed.
  82. psmacrodir = $(texinputdir)/dvips
  83.  
  84. # If a font can't be found close enough to its stated size, we look for
  85. # each of these sizes in the order given.  This colon-separated list is
  86. # overridden by the envvar TEXSIZES, and by a program-specific variable
  87. # (e.g., XDVISIZES), and perhaps by a config file (e.g., in dvips).
  88. default_texsizes = 300:600
  89.  
  90. # End of installation directory definitions.
  91.  
  92. localmodes = modes
  93.  
  94. # If you like, delete the man pages for programs you aren't installing.
  95. # The programs are listed in alphabetical order.
  96. manfiles=        \
  97.     amslatex.1    \
  98.     amstex.1    \
  99.     bibtex.1    \
  100.     dvitype.1    \
  101.     etex.1        \
  102.     gftodvi.1    \
  103.     gftopk.1    \
  104.     gftype.1    \
  105.     initex.1    \
  106.     lamstex.1    \
  107.     latex.1        \
  108.     mf.1        \
  109.     mft.1        \
  110.     patgen.1    \
  111.     pktogf.1    \
  112.     pktype.1    \
  113.     pltotf.1    \
  114.     pooltype.1    \
  115.     slitex.1    \
  116.     tangle.1    \
  117.     tex.1         \
  118.     tftopl.1    \
  119.     vftovp.1    \
  120.     virtex.1    \
  121.     vptovf.1    \
  122.     weave.1
  123.  
  124. # The edited file always has extension .1; we change it when we install.
  125. .SUFFIXES: .man .1 .txt .ps .dvi
  126. .man.1:
  127.     sed -f sedscript $(srcdir)/$*.man >$@
  128. .1.dvi:
  129.     $(DITROFF) -Tdvi -man $(srcdir)/$*.1 >$@
  130. .1.ps:
  131.     $(DITROFF) -Tps -man $(srcdir)/$*.1 >$@
  132. .1.txt:
  133.     $(DITROFF) -Tascii -man $(srcdir)/$*.1 | col -b | expand >$@
  134.  
  135. all: $(manfiles)
  136. .PHONY: dw
  137.  
  138. $(manfiles): sedscript
  139.  
  140. manfiles: $(manfiles)
  141. dvi: $(manfiles:.1=.dvi)
  142. ps: $(manfiles:.1=.ps)
  143. txt: $(manfiles:.1=.txt)
  144.  
  145. # We do not depend on the top-level Makefile since the top-level
  146. # Makefile can change for reasons that do not affect the man pages.
  147. sedscript: $(kpathsea_dir)/paths.h ../lib/c-auto.h
  148.     cp /dev/null sedscript
  149.     for f in $(kpathsea_dir)/paths.h ../lib/c-auto.h; do \
  150.       sed -n -e '/^#define/s/#define[     ][     ]*\([A-Z_a-z][A-Z_a-z]*\)[     ][     ]*\(.*\)/s!@\1@!\2!/p' \
  151.         $$f \
  152.       | sed -e 's/"//g' -e 's/[     ]*\/\*[^*]*\*\///g' >>sedscript;\
  153.     done
  154.     echo 's!@BINDIR@!$(bindir)!'        >>sedscript
  155.     echo 's!@INFODIR@!$(infodir)!'        >>sedscript
  156.     echo 's!@TEXINPUTDIR@!$(texinputdir)!'    >>sedscript
  157.     echo 's!@MFINPUTDIR@!$(mfinputdir)!'    >>sedscript
  158.     echo 's!@FONTDIR@!$(fontdir)!'        >>sedscript
  159.     echo 's!@FMTDIR@!$(fmtdir)!'        >>sedscript
  160.     echo 's!@BASEDIR@!$(basedir)!'        >>sedscript
  161.     echo "s!@TEXPOOLDIR@!$(texpooldir)!"    >>sedscript
  162.     echo 's!@MFPOOLDIR@!$(mfpooldir)!'    >>sedscript
  163.     echo 's!@LOCALMODES@!$(localmodes)!'    >>sedscript
  164.  
  165.  
  166. Makefile: Makefile.in ../config.status
  167.     (cd ..; $(SHELL) config.status)
  168.  
  169. # Prevent GNU make 3 from overflowing arg limit on system V.
  170. .NOEXPORT:
  171.  
  172.  
  173. check: $(manfiles)
  174.     for f in $(manfiles); do \
  175.         echo =============== $$f =============== ; \
  176.         checknr -c.BI.BR.IR.IB.RB.RI $$f ; \
  177.     done
  178. .PHONY: check
  179.  
  180. # Doubled word check.  You can find the dw utility on ftp.math.utah.edu in
  181. # pub/tex/errata/dw.shar (an email message "send dw.shar from tex/errata"
  182. # to tuglib@math.utah.edu will return a copy).
  183. dw: $(manfiles:.1=.txt)
  184.     for f in $(manfiles:.1=.txt); do \
  185.         echo =============== $$f =============== ; \
  186.         dw <$$f ; \
  187.     done
  188. .PHONY: dw
  189.  
  190. # manpages.sok is an additional custom spelling dictionary for these
  191. # manual pages.  UNIX variants in the Berkeley tradition support the
  192. # command-line syntax +dictfile to provide additional dictionaries.
  193. # AT&T spell derivatives are not so friendly.
  194. spell: $(manfiles) manpages.sok
  195.     for f in $(manfiles) ; \
  196.     do \
  197.         echo =============== $$f =============== ; \
  198.         deroff $$f | spell +manpages.sok ; \
  199.     done
  200. .PHONY: spell
  201.  
  202.  
  203. install install-data: all
  204.     $(srcdir)/../../mkdirchain $(mandir)
  205.     for nameone in $(manfiles); do                    \
  206.           name=`basename $${nameone} .1`;                \
  207.           $(INSTALL_DATA) $${name}.1 $(mandir)/$${name}.$(manext);    \
  208.         done
  209. install-exec:
  210.  
  211. mostlyclean:
  212.  
  213. clean: mostlyclean
  214.     rm -f sedscript *.1
  215.  
  216. distclean: clean
  217.     rm -f Makefile
  218.  
  219. realclean: distclean
  220.  
  221. extraclean:
  222.     rm -f *~ *\#* patch* *.orig *.rej *.bak *.ckp *.i *.s
  223.     rm -f *.dvi *.log *.aux *gf *pk *.tfm core a.out
  224.