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 < prev    next >
Makefile  |  1994-02-26  |  15KB  |  277 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. CC = gcc -Fcc1s200p0
  144.  
  145. BINDIR  = /h0/cmds
  146. #LIBDIR = /usr/local/lib/lout
  147. LIBDIR  = /h0/LOUT2/LIB
  148. DOCDIR  = /h0/lout/lib/lout.doc
  149. MANDIR  = /usr/local/man/man1
  150.  
  151. CHARIN  = 1
  152. CHAROUT = 0
  153. CHARFT  = 1
  154.  
  155. CFLAGS  = -DFONT_DIR="$(LIBDIR)/font"\
  156.       -DEVEC_DIR="$(LIBDIR)/evec" \
  157.       -DINCL_DIR="$(LIBDIR)/include"\
  158.       -DDATA_DIR="$(LIBDIR)/data"\
  159.       -DCHAR_IN=$(CHARIN)\
  160.       -DCHAR_OUT=$(CHAROUT)\
  161.       -DDEBUG_ON=0\
  162.       -DASSERT_ON=1\
  163.       -m68020 -mnobitfield -cio  -mlong-calls  -mremote -v -fdelayed-branch
  164.  
  165. TMPFILES = -T/r0
  166.  
  167. OBJS    = z01.r z02.r z03.r z04.r z05.r z06.r z07.r z08.r   \
  168.       z09.r z10.r z11.r z12.r z13.r z14.r z15.r z16.r   \
  169.       z17.r z18.r z19.r z20.r z21.r z22.r z23.r z24.r   \
  170.       z25.r z26.r z27.r z28.r z29.r z30.r z31.r z32.r   \
  171.       z33.r z34.r z35.r z36.r z37.r z38.r z39.r
  172.  
  173. lout:   $(OBJS)
  174.     $(CC) -o lout $(OBJS) -s 50
  175.  
  176. .c.r:
  177.     $(CC) $(CFLAGS) $(TMPFILES) $(FLAGS) -c -o $*.r $<
  178.  
  179. $(OBJS): externs
  180.  
  181. externs:
  182.  
  183. install: lout
  184.     @echo ""
  185.     @echo "(a) Installing Lout binary into BINDIR $(BINDIR)"
  186.     cp lout $(BINDIR)/lout
  187.     chmod a+x-w $(BINDIR)/lout
  188.     @echo ""
  189.     @echo "(b) Installing library files into LIBDIR $(LIBDIR)"
  190.     mkdir $(LIBDIR)
  191.     chmod 775 $(LIBDIR)
  192.     @echo ""
  193.     mkdir $(LIBDIR)/include
  194.     chmod 775 $(LIBDIR)/include
  195.     cp include/* $(LIBDIR)/include
  196.     chmod a+r-wx $(LIBDIR)/include/*
  197.     @echo ""
  198.     mkdir $(LIBDIR)/data
  199.     chmod 775 $(LIBDIR)/data
  200.     cp data/* $(LIBDIR)/data
  201.     chmod a+r-wx $(LIBDIR)/data/*
  202.     @echo ""
  203.     mkdir $(LIBDIR)/font
  204.     chmod 775 $(LIBDIR)/font
  205.     cp font/* $(LIBDIR)/font
  206.     chmod a+r-wx $(LIBDIR)/font/*
  207.     @echo ""
  208.     mkdir $(LIBDIR)/evec
  209.     chmod 775 $(LIBDIR)/evec
  210.     cp evec/* $(LIBDIR)/evec
  211.     chmod a+r-wx $(LIBDIR)/evec/*
  212.     @echo ""
  213.     @echo "(c) Copying a font definitions file to ft"
  214.     cp $(LIBDIR)/include/fontdefs$(CHARFT) $(LIBDIR)/include/ft
  215.     @echo ""
  216.     @echo "(d) Compulsory test on doc/tr.eq (expect many warning messages)"
  217.     ./lout ./doc/tr.eq/setup ./doc/tr.eq/s? > ./doc/tr.eq/op
  218.     rm ./doc/tr.eq/op ./doc/tr.eq/s?.ld lout.li
  219.  
  220. installman:
  221.     @echo ""
  222.     @echo "Installing manual entry into MANDIR $(MANDIR)"
  223.     sed -e "s@<BINDIR>@$(BINDIR)@" -e "s@<LIBDIR>@$(LIBDIR)@"   \
  224.         -e "s@<DOCDIR>@$(DOCDIR)@" -e "s@<MANDIR>@$(MANDIR)@"   \
  225.     man/lout.1 > $(MANDIR)/lout.1
  226.     chmod a+r $(MANDIR)/lout.1
  227.  
  228. installdoc:
  229.     @echo ""
  230.     @echo "Creating DOCDIR $(DOCDIR) and installing documentation into it"
  231.     mkdir $(DOCDIR)
  232.     chmod 775 $(DOCDIR)
  233.     mkdir $(DOCDIR)/tr.lout
  234.     chmod 775 $(DOCDIR)/tr.lout
  235.     cp doc/tr.lout/* $(DOCDIR)/tr.lout
  236.     chmod a+r-wx $(DOCDIR)/tr.lout/*
  237.     mkdir $(DOCDIR)/tr.impl
  238.     chmod 775 $(DOCDIR)/tr.impl
  239.     cp doc/tr.impl/* $(DOCDIR)/tr.impl
  240.     chmod a+r-wx $(DOCDIR)/tr.impl/*
  241.     mkdir $(DOCDIR)/tr.over
  242.     chmod 775 $(DOCDIR)/tr.over
  243.     cp doc/tr.over/* $(DOCDIR)/tr.over
  244.     chmod a+r-wx $(DOCDIR)/tr.over/*
  245.     mkdir $(DOCDIR)/tr.begin
  246.     chmod 775 $(DOCDIR)/tr.begin
  247.     cp doc/tr.begin/* $(DOCDIR)/tr.begin
  248.     chmod a+r-wx $(DOCDIR)/tr.begin/*
  249.     mkdir $(DOCDIR)/tr.eq
  250.     chmod 775 $(DOCDIR)/tr.eq
  251.     cp doc/tr.eq/*   $(DOCDIR)/tr.eq
  252.     chmod a+r-wx $(DOCDIR)/tr.eq/*
  253.     mkdir $(DOCDIR)/tr.fig
  254.     chmod 775 $(DOCDIR)/tr.fig
  255.     cp doc/tr.fig/*  $(DOCDIR)/tr.fig
  256.     chmod a+r-wx $(DOCDIR)/tr.fig/*
  257.     mkdir $(DOCDIR)/tr.tab
  258.     chmod 775 $(DOCDIR)/tr.tab
  259.     cp doc/tr.tab/*  $(DOCDIR)/tr.tab
  260.     chmod a+r-wx $(DOCDIR)/tr.tab/*
  261.  
  262. uninstall:
  263.     -rm -f  $(BINDIR)/lout
  264.     -rm -fr $(LIBDIR)
  265.     -rm -fr $(DOCDIR)
  266.     -rm -f  $(MANDIR)/lout.1
  267.  
  268. clean:  
  269.     -rm -f lout *.r
  270.  
  271. restart:
  272.     -rm -f lout *.r
  273.     -rm -f  $(BINDIR)/lout
  274.     -rm -fr $(LIBDIR)
  275.     -rm -fr $(DOCDIR)
  276.     -rm -f  $(MANDIR)/lout.1
  277.