postscript.mk 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. #
  2. # Top level makefile. Instructions are included here and in the README file.
  3. #
  4. # First save a copy of this file. Then adjust the following definitions (all
  5. # come immediatedly after the initial block of comments):
  6. #
  7. # MAKE where make lives
  8. #
  9. # MAKEFILE name of this file - for recursive make calls. Must change
  10. # if you rename this file.
  11. #
  12. # SYSTEM best match for your version of Unix. Current choices for
  13. # SYSTEM are:
  14. #
  15. # SYSV - System V
  16. # V9 - Ninth Edition
  17. # BSD4_2 - Berkeley (eg. Sun)
  18. #
  19. # Controls conditional compilation in a few places.
  20. #
  21. # VERSION refers to the Version of the DWB package
  22. #
  23. # GROUP group assigned to all installed files
  24. #
  25. # OWNER owner of everything that's installed
  26. #
  27. # HOSTDIR hostresident font directory for PostScript printers. Only
  28. # used in the font download program.
  29. #
  30. # FONTDIR width table directory - for troff and dpost
  31. #
  32. # MAN1DIR command manpages. A command and its manpage are installed
  33. # together - there's no easy way to avoid it. Setting MAN1DIR
  34. # to an existing temporary directory (e.g. /tmp) means an
  35. # install will work but manpages won't go anywhere permanent.
  36. # MAN1DIR must already exist - it will not be created during
  37. # an install.
  38. #
  39. # POSTBIN where most PostScript support programs go. dpost and picpack
  40. # are the exceptions.
  41. #
  42. # POSTLIB prologues and miscellaneous PostScript files. Primarily for
  43. # the programs that live in POSTBIN.
  44. #
  45. # CFLGS common compiler options - used to build CFLAGS in the low
  46. # level makefiles. CFLGS and LDFLGS are best set on the make
  47. # command line.
  48. #
  49. # LDFLGS common link editor options - used to build LDFLAGS in the
  50. # low level makefiles. LDFLGS and CFLGS are best set on the
  51. # make command line.
  52. #
  53. # DKHOST set it to TRUE to compile the DKHOST Datakit support code
  54. # in postio. Temporarily resets SYSTEM to SYSV if DKHOST is
  55. # TRUE and SYSTEM is BSD4_2. Ignored if SYSTEM is not SYSV
  56. # or BSD4_2.
  57. #
  58. # DKSTREAMS enables streams based DKHOST support in postio when DKHOST
  59. # is TRUE and SYSTEM is SYSV or BSD4_2. Choices are TRUE,
  60. # FALSE, or a stream module name (e.g. dknetty or dkty). TRUE
  61. # selects dknetty. Newer systems may expect dkty.
  62. #
  63. # ROUNDPAGE must only be set to TRUE or FALSE. TRUE means translators
  64. # include code that maps clipping path dimensions into known
  65. # paper sizes.
  66. #
  67. # TARGETS the default list of what's built by make. Each target must
  68. # be the name of a source directory. A target that names a
  69. # non-existent source directory is ignored. Setting TARGETS
  70. # on the make command line overrides the default list.
  71. #
  72. # Source files must be updated whenever this file changes. If you change any
  73. # definitions type,
  74. #
  75. # make -f postscript.mk changes
  76. #
  77. # to update the source files, man pages, and low level makefiles.
  78. #
  79. # To build (but not install) the default package (i.e. everything named by
  80. # TARGETS) type,
  81. #
  82. # make -f postscript.mk all
  83. #
  84. # The recommended way to build and install the package is,
  85. #
  86. # make -f postscript.mk all install
  87. #
  88. # Although you'll likely have to be root for the install to work.
  89. #
  90. # After the package is installed use,
  91. #
  92. # make -f postscript.mk clobber
  93. #
  94. # to delete binary files and compiled programs from the source directories.
  95. #
  96. # Set TARGETS on the command line to select part of the package. For example,
  97. #
  98. # make -f postscript.mk TARGETS="dpost devpost" all install
  99. #
  100. # builds and installs dpsot and the PostScript font tables. Quotes hide white
  101. # space from the shell.
  102. #
  103. MAKE=/bin/make
  104. MAKEFILE=postscript.mk
  105. SYSTEM=V9
  106. VERSION=3.3.2
  107. GROUP=bin
  108. OWNER=bin
  109. ROOT=
  110. FONTDIR=$(ROOT)/usr/lib/font
  111. HOSTDIR=$(ROOT)/usr/lib/font/postscript
  112. MAN1DIR=$(ROOT)/tmp
  113. POSTBIN=$(ROOT)/usr/bin/postscript
  114. POSTLIB=$(ROOT)/usr/lib/postscript
  115. TMACDIR=$(ROOT)/usr/lib/tmac
  116. COMMONDIR=common
  117. CURRENTDIR=.
  118. CFLGS=-O
  119. LDFLGS=-s
  120. DKHOST=FALSE
  121. DKSTREAMS=FALSE
  122. ROUNDPAGE=TRUE
  123. #
  124. # $(TARGETS) is the default list of things built by make. Pick dpost or
  125. # dpost.utf but not both!
  126. #
  127. TARGETS=buildtables\
  128. common\
  129. cropmarks\
  130. devLatin1\
  131. devpost\
  132. download\
  133. dpost.utf\
  134. grabit\
  135. hardcopy\
  136. mpictures\
  137. picpack\
  138. postbgi\
  139. postdaisy\
  140. postdmd\
  141. postgif\
  142. postio\
  143. postmd\
  144. postprint\
  145. postreverse\
  146. posttek\
  147. printfont\
  148. psencoding\
  149. psfiles\
  150. trofftable
  151. ACTION=all
  152. all : $(TARGETS)
  153. clean clobber :
  154. @$(MAKE) -e -f $(MAKEFILE) MAKE=$(MAKE) ACTION=$@ $(TARGETS)
  155. install changes :
  156. @SYSTEM='$(SYSTEM)'; export SYSTEM; \
  157. VERSION='$(VERSION)'; export VERSION; \
  158. GROUP='$(GROUP)'; export GROUP; \
  159. OWNER='$(OWNER)'; export OWNER; \
  160. FONTDIR='$(FONTDIR)'; export FONTDIR; \
  161. HOSTDIR='$(HOSTDIR)'; export HOSTDIR; \
  162. MAN1DIR='$(MAN1DIR)'; export MAN1DIR; \
  163. POSTBIN='$(POSTBIN)'; export POSTBIN; \
  164. POSTLIB='$(POSTLIB)'; export POSTLIB; \
  165. TMACDIR='$(TMACDIR)'; export TMACDIR; \
  166. ROUNDPAGE='$(ROUNDPAGE)'; export ROUNDPAGE; \
  167. $(MAKE) -e -f $(MAKEFILE) MAKE=$(MAKE) ACTION=$@ $(TARGETS)
  168. $(TARGETS) ::
  169. @TARGETS=; unset TARGETS; \
  170. HFILES=; unset HFILES; \
  171. OFILES=; unset OFILES; \
  172. CFLAGS=; unset CFLAGS; \
  173. LDFLAGS=; unset LDFLAGS; \
  174. YFLAGS=; unset YFLAGS; \
  175. SYSTEM='$(SYSTEM)'; export SYSTEM; \
  176. VERSION='$(VERSION)'; export VERSION; \
  177. CFLGS='$(CFLGS)'; export CFLGS; \
  178. LDFLGS='$(LDFLGS)'; export LDFLGS; \
  179. COMMONDIR='../$(COMMONDIR)'; export COMMONDIR; \
  180. DKHOST='$(DKHOST)'; export DKHOST; \
  181. DKSTREAMS='$(DKSTREAMS)'; export DKSTREAMS; \
  182. if [ -d $@ -a -f $@/$@.mk ]; then \
  183. cd $@; \
  184. echo "---- Making $(ACTION) in directory $(CURRENTDIR)/$@ ----"; \
  185. $(MAKE) -e -f $@.mk MAKE=$(MAKE) $(ACTION); \
  186. echo; \
  187. fi