home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / APPS / lout2.lzh / LOUT2 / makefile.org < prev    next >
Makefile  |  1994-01-23  |  15KB  |  271 lines

  1. ###############################################################################
  2. #                                                                             #
  3. #  Make file for installing Basser Lout Version 2.05                          #
  4. #                                                                             #
  5. #  Jeffrey H. Kingston                                                        #
  6. #  21 June 1993                                                               #
  7. #                                                                             #
  8. #     make lout         Compile the Lout source                               #
  9. #     make install      Install the Lout binary and libraries                 #
  10. #     make installman   Install the Lout manual entry                         #
  11. #     make installdoc   Install the Lout documentation                        #
  12. #     make clean        Remove compilation temporaries                        #
  13. #     make uninstall    Undo the effect of make install, make installman,     #
  14. #                       and make installdoc                                   #
  15. #     make restart      Undo everything except changes to this makefile,      #
  16. #                       ready for a fresh start.                              #
  17. #                                                                             #
  18. #  Most installations of Lout should require only the following steps.  If    #
  19. #  something goes wrong, you can start again with "make restart".             #
  20. #                                                                             #
  21. #  (1) Set the following four macros defined below to appropriate values:     #
  22. #                                                                             #
  23. #      BINDIR  Directory where Lout's binary goes (this directory is assumed  #
  24. #              to exist).                                                     #
  25. #                                                                             #
  26. #      LIBDIR  Directory where Lout's libraries go (this directory will be    #
  27. #              created).                                                      #
  28. #                                                                             #
  29. #      DOCDIR  Directory where Lout's documents go; they are reports written  #
  30. #              in Lout about the system (this directory will be created).     #
  31. #                                                                             #
  32. #      MANDIR  Directory where Lout's online manual entry goes; the entry is  #
  33. #              in nroff -man format (this directory is assumed to exist).     #
  34. #                                                                             #
  35. #  (2) Set the following three macros defined below to appropriate values.    #
  36. #      I now strongly recommend CHARIN=1, CHAROUT=0, and CHARFT=1 for all     #
  37. #      sites (English and non-English language).  This way we get a truly     #
  38. #      international standard in which everyone has access to accented        #
  39. #      characters (even English sites need them occasionally for foreign      #
  40. #      words and names), yet Lout's output is in the strict 7-bit ASCII that  #
  41. #      is strongly recommended (I don't know why) in the PostScript manual.   #
  42. #                                                                             #
  43. #      CHARIN  This macro determines the assignment of characters in Lout     #
  44. #              source files to character classes in Lout's lexical analyser.  #
  45. #              That is, it determines which characters are letters, which is  #
  46. #              the comment character, etc.  Currently supported values are:   #
  47. #                                                                             #
  48. #                0  For English language ASCII installations                  #
  49. #                                                                             #
  50. #                1  For installations using the ISO-LATIN-1 character set     #
  51. #                   (adds accented letters to the LETTER character class)     #
  52. #                                                                             #
  53. #              Please note that Lout will accept any 8-bit character except   #
  54. #              '\0'; CHARIN does not determine the acceptability of any       #
  55. #              character, just its class.                                     #
  56. #                                                                             #
  57. #      CHAROUT This macro determines the format of strings of literal         #
  58. #              characters in the PostScript output.  Currently supported      #
  59. #              values are:                                                    #
  60. #                                                                             #
  61. #                0  Every output character will be printable ASCII            #
  62. #                                                                             #
  63. #                1  Every output character will be printable ISO-LATIN-1      #
  64. #                                                                             #
  65. #              The output will be valid PostScript irrespective of the value  #
  66. #              given to CHAROUT, which may be set entirely independently of   #
  67. #              CHARIN and CHARFT.  It just determines which characters will   #
  68. #              be printed as \ddd escape sequences and which will be printed  #
  69. #              as one-byte literal characters.                                #
  70. #                                                                             #
  71. #      CHARFT  This macro determines which font/encoding vector combinations  #
  72. #              will be loaded by the standard setup files.  Currently         #
  73. #              supported values are                                           #
  74. #                                                                             #
  75. #                0  For English language ASCII installations                  #
  76. #                                                                             #
  77. #                1  For ISO-LATIN-1 installations (ISO-LATIN-1 encoding       #
  78. #                   augmented with extra codes, e.g. for ligatures)           #
  79. #                                                                             #
  80. #              This macro does not affect the Lout binary in any way; it      #
  81. #              operates by copying file fontdefs$(CHARFT) to the standard     #
  82. #              fontdefs file "ft" during "make install".                      #
  83. #                                                                             #
  84. #  (3) Execute "make lout".  This will compile the Lout source, leaving the   #
  85. #      binary in this directory.  No changes are made in other directories.   #
  86. #                                                                             #
  87. #  (4) Execute "make install".  This will do the following things:            #
  88. #                                                                             #
  89. #      (a)     Copy the binary into BINDIR;                                   #
  90. #                                                                             #
  91. #      (b)     Create LIBDIR and copy all the library files into it;          #
  92. #                                                                             #
  93. #      (c)     Within directory $(LIBDIR)/include, copy fontdefs$(CHARFT)     #
  94. #              to file ft.  See above under CHARFT for explanation.           #
  95. #                                                                             #
  96. #      (d)     Perform a test run on the document kept in ./doc/tr.eq.  This  #
  97. #              is compulsory because it has side effects: the database index  #
  98. #              files loutrefs.li, refstyles.li, and standard.li are created   #
  99. #              in directory $(LIBDIR)/data, and the packed hyphenation        #
  100. #              pattern file lout.hyph.packed is created in directory          #
  101. #              $(LIBDIR)/include.  The test run will produce quite a few      #
  102. #              warning messages about unresolved cross references, but there  #
  103. #              should be no fatal ones.  (These warning messages gradually    #
  104. #              go away on subsequent runs.)                                   #
  105. #                                                                             #
  106. #  (5) Execute "make installman".  This installs the manual entry in MANDIR.  #
  107. #                                                                             #
  108. #  (6) Execute "make installdoc".  This creates $(DOCDIR) and copies the      #
  109. #      technical reports into it.                                             #
  110. #                                                                             #
  111. #  (7) Execute "make clean".  This cleans up this directory.                  #
  112. #                                                                             #
  113. #  (8) If the usual size of a piece of paper at your site is not A4, change   #
  114. #      the default values of the @PageWidth and @PageHeight parameters of     #
  115. #      the DocumentLayout package to the physical width and height of your    #
  116. #      paper.  Find them on lines 160-1 of file $(LIBDIR)/include/dl.  For    #
  117. #      example, 29.70c is 29.7 centimetres, the A4 height.                    #
  118. #                                                                             #
  119. #  (9) If you intend the installation to produce output in a language other   #
  120. #      than English, you need to change all the places where Lout's standard  #
  121. #      packages and databases insert English words automatically (such as     #
  122. #      "Chapter" in a chapter heading, or "July" in a date).  This is how:    #
  123. #                                                                             #
  124. #      (a)     Change the words between braces on lines 214-223 of file       #
  125. #              $(LIBDIR)/include/dl to their equivalents in your language;    #
  126. #                                                                             #
  127. #      (b)     Change the month names and weekday names on lines 276-316 of   #
  128. #              file $(LIBDIR)/data/standard.ld to their equivalents in your   #
  129. #              language, then delete the file $(LIBDIR)/data/standard.li      #
  130. #              that was created by step (4d) above.  This .li file will be    #
  131. #              re-created automatically on the next run, so you must ensure   #
  132. #              that the next run can write into directory $(LIBDIR)/data.     #
  133. #                                                                             #
  134. #      (c)     There are a few English words in $(LIBDIR)/data/refstyles.ld   #
  135. #              also.  Again, delete refstyles.li if you change refstyles.ld.  #
  136. #                                                                             #
  137. #      There are no English literals in the binary.                           #
  138. #                                                                             #
  139. #                                                                             #
  140. #  Mail jeff@cs.su.oz.au if you have any problems.                            #
  141. #                                                                             #
  142. ###############################################################################
  143.  
  144. BINDIR    = /u1/kotanski/BIN
  145. #LIBDIR    = /usr/local/lib/lout
  146. LIBDIR    = /u1/kotanski/LOUT/LIB
  147. DOCDIR    = /usr/local/lib/lout.doc
  148. MANDIR    = /usr/local/man/man1
  149.  
  150. CHARIN    = 1
  151. CHAROUT    = 0
  152. CHARFT    = 1
  153.  
  154. CFLAGS    = -DFONT_DIR=\"$(LIBDIR)/font\"                \
  155.       -DEVEC_DIR=\"$(LIBDIR)/evec\"                \
  156.       -DINCL_DIR=\"$(LIBDIR)/include\"            \
  157.       -DDATA_DIR=\"$(LIBDIR)/data\"                \
  158.       -DCHAR_IN=$(CHARIN)                    \
  159.       -DCHAR_OUT=$(CHAROUT)                    \
  160.       -DDEBUG_ON=0                        \
  161.       -DASSERT_ON=1
  162.  
  163. OBJS    = z01.o z02.o z03.o z04.o z05.o z06.o z07.o z08.o    \
  164.       z09.o z10.o z11.o z12.o z13.o z14.o z15.o z16.o    \
  165.       z17.o z18.o z19.o z20.o z21.o z22.o z23.o z24.o    \
  166.       z25.o z26.o z27.o z28.o z29.o z30.o z31.o z32.o    \
  167.       z33.o z34.o z35.o z36.o z37.o z38.o z39.o
  168.  
  169. lout:    $(OBJS)
  170.     $(CC) -o lout $(OBJS) -lm
  171.     chmod a+x lout
  172.  
  173. $(OBJS): externs
  174.  
  175. externs:
  176.  
  177. install: lout
  178.     @echo ""
  179.     @echo "(a) Installing Lout binary into BINDIR $(BINDIR)"
  180.     cp lout $(BINDIR)/lout
  181.     chmod a+x-w $(BINDIR)/lout
  182.     @echo ""
  183.     @echo "(b) Installing library files into LIBDIR $(LIBDIR)"
  184.     mkdir $(LIBDIR)
  185.     chmod 775 $(LIBDIR)
  186.     @echo ""
  187.     mkdir $(LIBDIR)/include
  188.     chmod 775 $(LIBDIR)/include
  189.     cp include/* $(LIBDIR)/include
  190.     chmod a+r-wx $(LIBDIR)/include/*
  191.     @echo ""
  192.     mkdir $(LIBDIR)/data
  193.     chmod 775 $(LIBDIR)/data
  194.     cp data/* $(LIBDIR)/data
  195.     chmod a+r-wx $(LIBDIR)/data/*
  196.     @echo ""
  197.     mkdir $(LIBDIR)/font
  198.     chmod 775 $(LIBDIR)/font
  199.     cp font/* $(LIBDIR)/font
  200.     chmod a+r-wx $(LIBDIR)/font/*
  201.     @echo ""
  202.     mkdir $(LIBDIR)/evec
  203.     chmod 775 $(LIBDIR)/evec
  204.     cp evec/* $(LIBDIR)/evec
  205.     chmod a+r-wx $(LIBDIR)/evec/*
  206.     @echo ""
  207.     @echo "(c) Copying a font definitions file to ft"
  208.     cp $(LIBDIR)/include/fontdefs$(CHARFT) $(LIBDIR)/include/ft
  209.     @echo ""
  210.     @echo "(d) Compulsory test on doc/tr.eq (expect many warning messages)"
  211.     ./lout ./doc/tr.eq/setup ./doc/tr.eq/s? > ./doc/tr.eq/op
  212.     rm ./doc/tr.eq/op ./doc/tr.eq/s?.ld lout.li
  213.  
  214. installman:
  215.     @echo ""
  216.     @echo "Installing manual entry into MANDIR $(MANDIR)"
  217.     sed -e "s@<BINDIR>@$(BINDIR)@" -e "s@<LIBDIR>@$(LIBDIR)@"    \
  218.         -e "s@<DOCDIR>@$(DOCDIR)@" -e "s@<MANDIR>@$(MANDIR)@"    \
  219.     man/lout.1 > $(MANDIR)/lout.1
  220.     chmod a+r $(MANDIR)/lout.1
  221.  
  222. installdoc:
  223.     @echo ""
  224.     @echo "Creating DOCDIR $(DOCDIR) and installing documentation into it"
  225.     mkdir $(DOCDIR)
  226.     chmod 775 $(DOCDIR)
  227.     mkdir $(DOCDIR)/tr.lout
  228.     chmod 775 $(DOCDIR)/tr.lout
  229.     cp doc/tr.lout/* $(DOCDIR)/tr.lout
  230.     chmod a+r-wx $(DOCDIR)/tr.lout/*
  231.     mkdir $(DOCDIR)/tr.impl
  232.     chmod 775 $(DOCDIR)/tr.impl
  233.     cp doc/tr.impl/* $(DOCDIR)/tr.impl
  234.     chmod a+r-wx $(DOCDIR)/tr.impl/*
  235.     mkdir $(DOCDIR)/tr.over
  236.     chmod 775 $(DOCDIR)/tr.over
  237.     cp doc/tr.over/* $(DOCDIR)/tr.over
  238.     chmod a+r-wx $(DOCDIR)/tr.over/*
  239.     mkdir $(DOCDIR)/tr.begin
  240.     chmod 775 $(DOCDIR)/tr.begin
  241.     cp doc/tr.begin/* $(DOCDIR)/tr.begin
  242.     chmod a+r-wx $(DOCDIR)/tr.begin/*
  243.     mkdir $(DOCDIR)/tr.eq
  244.     chmod 775 $(DOCDIR)/tr.eq
  245.     cp doc/tr.eq/*   $(DOCDIR)/tr.eq
  246.     chmod a+r-wx $(DOCDIR)/tr.eq/*
  247.     mkdir $(DOCDIR)/tr.fig
  248.     chmod 775 $(DOCDIR)/tr.fig
  249.     cp doc/tr.fig/*  $(DOCDIR)/tr.fig
  250.     chmod a+r-wx $(DOCDIR)/tr.fig/*
  251.     mkdir $(DOCDIR)/tr.tab
  252.     chmod 775 $(DOCDIR)/tr.tab
  253.     cp doc/tr.tab/*  $(DOCDIR)/tr.tab
  254.     chmod a+r-wx $(DOCDIR)/tr.tab/*
  255.  
  256. uninstall:
  257.     -rm -f  $(BINDIR)/lout
  258.     -rm -fr $(LIBDIR)
  259.     -rm -fr $(DOCDIR)
  260.     -rm -f  $(MANDIR)/lout.1
  261.  
  262. clean:    
  263.     -rm -f lout *.o
  264.  
  265. restart:
  266.     -rm -f lout *.o
  267.     -rm -f  $(BINDIR)/lout
  268.     -rm -fr $(LIBDIR)
  269.     -rm -fr $(DOCDIR)
  270.     -rm -f  $(MANDIR)/lout.1
  271.