home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fonts 1 / freshfonts1.bin / programs / amiga / pastex / archives / makeindex2_11.lha / makeindex2.11 / doc / Makefile < prev    next >
Makefile  |  1991-08-16  |  4KB  |  119 lines

  1. #=======================================================================
  2. # Make auxiliary documentation using nroff and LaTeX.  makeindex.l is
  3. # the nroff/troff input file for the UNIX manual pages.  From it, we
  4. # produce:
  5. #    makeindex.hlp (printable ASCII help file),
  6. #    makeindex.info (GNU Emacs INFO node file),
  7. #    makeindex.ps (PostScript version of typeset manual pages), and
  8. #    makeindex.vms (VAX VMS hierarchical help file),
  9. #    manpages.dvi (.dvi file of manual pages)
  10. #
  11. # Targets:
  12. #    all
  13. #    clean
  14. #    clobber
  15. #    install
  16. #    makeindex.dvi
  17. #    makeindex.hlp
  18. #    makeindex.ps
  19. #    makeindex.info
  20. #    makeindex.vms
  21. #    manpages.dvi
  22. #    uninstall
  23. #
  24. # [15-Aug-1991]
  25. #=======================================================================
  26.  
  27. CATDIR    =    $(MANTOP)/cat1
  28. LATEX    =    latex
  29. MANTOP    =    /usr/local/man
  30. MANDIR    =    $(MANTOP)/man1
  31. RM    =    /bin/rm -f
  32.  
  33. all:    makeindex.dvi makeindex.hlp makeindex.info makeindex.ps \
  34.     makeindex.vms manpages.dvi
  35.  
  36. clean:
  37.     $(RM) *~
  38.     $(RM) \#*
  39.     $(RM) core
  40.     $(RM) makeindex.aux
  41.     $(RM) makeindex.dvi
  42.     $(RM) makeindex.log
  43.  
  44. clobber:    clean
  45.     $(RM) makeindex.hlp
  46.     $(RM) makeindex.info
  47.     $(RM) makeindex.ps
  48.     $(RM) makeindex.vms
  49.     $(RM) manpages.dvi
  50.  
  51. install:    uninstall
  52.     cp makeindex.l $(MANDIR)/makeindex.1
  53.     chmod 774 $(MANDIR)/makeindex.1
  54.  
  55. makeindex.dvi:    makeindex.tex
  56.     $(LATEX) makeindex.tex
  57.     $(LATEX) makeindex.tex
  58.  
  59. makeindex.hlp:    makeindex.l
  60.     nroff -man makeindex.l | col -b >makeindex.hlp
  61.  
  62. # ======================================================================
  63. # NB: The vmshelp* and uhelp* convertors are available for anonymous ftp
  64. # on math.utah.edu from ~ftp/pub/tex/pub/info or via e-mail from the
  65. # tuglib server with requests "help" and "send index from
  66. # ftp/pub/tex/pub/info"
  67. # ======================================================================
  68. makeindex.info:    makeindex.vms
  69.     vmshelp2 makeindex.vms >makeindex.info
  70.  
  71. makeindex.ps:    makeindex.l
  72. # To convert a manual page to PostScript:
  73. #    on BSD: tbl | eqn | ditroff -man | psdit | psrev
  74. #    on AIX: tbl | eqn | psroff -t -man | psrev
  75. # Omit psrev if your printer stacks pages face down.
  76. # tbl and eqn are not required for makeindex.l.
  77. # This pipeline is hidden in a private script:
  78.     man2ps <makeindex.l >makeindex.ps
  79.  
  80. # Reduce makeindex.hlp to makeindex.vms with the help of sed and awk.
  81. # Alas, the output of nroff recorded in makeindex.hlp is somewhat
  82. # system dependent.  The sed patterns here suffice for SunOS 4.1.1
  83. # and IBM RS/6000 AIX 3.1, but may require modifications on other
  84. # UNIX systems.
  85.  
  86. makeindex.vms:    makeindex.hlp
  87.     echo '1 MAKEINDEX' >makeindex.vms
  88.     expand < makeindex.hlp | \
  89.     sed    -e '/^ *MAKEINDEX(1L).*MAKEINDEX(1L)/d' \
  90.         -e '/^ *Page.*(printed.*)/d' \
  91.         -e '/^Sun Release [0-9]/d' \
  92.         -e 's/^ *INPUT STYLE SPECIFIERS/3 INPUT STYLE SPECIFIERS/' \
  93.         -e 's/^ *OUTPUT STYLE SPECIFIERS/3 OUTPUT STYLE SPECIFIERS/' \
  94.         -e 's/^ *TeX EXAMPLE/3 TeX EXAMPLE/' \
  95.         -e 's/^ *TROFF EXAMPLE/3 TROFF EXAMPLE/' \
  96.         -e 's/^ *CREATING THE INDEX FILE/3 CREATING THE INDEX FILE/' \
  97.         -e 's/^ *COMPLETING THE INDEX/3 COMPLETING THE INDEX/' \
  98.         -e 's/^     / /' \
  99.         -e 's/^ \([A-Z]\)/2 \1/' \
  100.         -e 's/^\([A-Z]\)/2 \1/' |\
  101.     awk -f deblank.awk >> makeindex.vms
  102.  
  103. # We create a .dvi file for the manual pages under a different name to
  104. # avoid a collision with makeindex.dvi.  GNU groff works quite nicely,
  105. # and gives us a .dvi file that anyone can process, even if they do not
  106. # have a PostScript printer.  groff's font selection is a bit unusual;
  107. # it wants a few Computer Modern fonts in magnifications 0.8 and 0.9.
  108. # For manpages.dvi, it needs these additional font files: cmbx10.240pk
  109. # cmbx10.270pk cmcsc10.240pk cmcsc10.270pk cmr10.240pk cmr10.270pk
  110. # cmti10.240pk cmti10.270pk.  If your DVI driver can substitute a nearby
  111. # size, you should be able to manage without them.
  112. manpages.dvi:    makeindex.l
  113.     groff -Tdvi -man makeindex.l >manpages.dvi
  114.  
  115. uninstall:
  116.     if [ -f $(CATDIR)/makeindex.1 ] ; then $(RM) $(CATDIR)/makeindex.1 ; fi
  117.     if [ -f $(MANDIR)/makeindex.1 ] ; then $(RM) $(MANDIR)/makeindex.1 ; fi
  118.  
  119.