2 # Top level makefile. Instructions are included here and in the README file.
4 # First save a copy of this file. Then adjust the following definitions (all
5 # come immediatedly after the initial block of comments):
7 # MAKE where make lives
9 # MAKEFILE name of this file - for recursive make calls. Must change
10 # if you rename this file.
12 # SYSTEM best match for your version of Unix. Current choices for
17 # BSD4_2 - Berkeley (eg. Sun)
19 # Controls conditional compilation in a few places.
21 # VERSION refers to the Version of the DWB package
23 # GROUP group assigned to all installed files
25 # OWNER owner of everything that's installed
27 # HOSTDIR hostresident font directory for PostScript printers. Only
28 # used in the font download program.
30 # FONTDIR width table directory - for troff and dpost
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
39 # POSTBIN where most PostScript support programs go. dpost and picpack
42 # POSTLIB prologues and miscellaneous PostScript files. Primarily for
43 # the programs that live in POSTBIN.
45 # CFLGS common compiler options - used to build CFLAGS in the low
46 # level makefiles. CFLGS and LDFLGS are best set on the make
49 # LDFLGS common link editor options - used to build LDFLAGS in the
50 # low level makefiles. LDFLGS and CFLGS are best set on the
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
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.
63 # ROUNDPAGE must only be set to TRUE or FALSE. TRUE means translators
64 # include code that maps clipping path dimensions into known
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.
72 # Source files must be updated whenever this file changes. If you change any
75 # make -f postscript.mk changes
77 # to update the source files, man pages, and low level makefiles.
79 # To build (but not install) the default package (i.e. everything named by
82 # make -f postscript.mk all
84 # The recommended way to build and install the package is,
86 # make -f postscript.mk all install
88 # Although you'll likely have to be root for the install to work.
90 # After the package is installed use,
92 # make -f postscript.mk clobber
94 # to delete binary files and compiled programs from the source directories.
96 # Set TARGETS on the command line to select part of the package. For example,
98 # make -f postscript.mk TARGETS="dpost devpost" all install
100 # builds and installs dpsot and the PostScript font tables. Quotes hide white
101 # space from the shell.
105 MAKEFILE=postscript.mk
114 FONTDIR=$(ROOT)/usr/lib/font
115 HOSTDIR=$(ROOT)/usr/lib/font/postscript
117 POSTBIN=$(ROOT)/usr/bin/postscript
118 POSTLIB=$(ROOT)/usr/lib/postscript
119 TMACDIR=$(ROOT)/usr/lib/tmac
132 # $(TARGETS) is the default list of things built by make. Pick dpost or
133 # dpost.utf but not both!
166 @$(MAKE) -e -f $(MAKEFILE) MAKE=$(MAKE) ACTION=$@ $(TARGETS)
169 @SYSTEM='$(SYSTEM)'; export SYSTEM; \
170 VERSION='$(VERSION)'; export VERSION; \
171 GROUP='$(GROUP)'; export GROUP; \
172 OWNER='$(OWNER)'; export OWNER; \
173 FONTDIR='$(FONTDIR)'; export FONTDIR; \
174 HOSTDIR='$(HOSTDIR)'; export HOSTDIR; \
175 MAN1DIR='$(MAN1DIR)'; export MAN1DIR; \
176 POSTBIN='$(POSTBIN)'; export POSTBIN; \
177 POSTLIB='$(POSTLIB)'; export POSTLIB; \
178 TMACDIR='$(TMACDIR)'; export TMACDIR; \
179 ROUNDPAGE='$(ROUNDPAGE)'; export ROUNDPAGE; \
180 $(MAKE) -e -f $(MAKEFILE) MAKE=$(MAKE) ACTION=$@ $(TARGETS)
183 @TARGETS=; unset TARGETS; \
184 HFILES=; unset HFILES; \
185 OFILES=; unset OFILES; \
186 CFLAGS=; unset CFLAGS; \
187 LDFLAGS=; unset LDFLAGS; \
188 YFLAGS=; unset YFLAGS; \
189 SYSTEM='$(SYSTEM)'; export SYSTEM; \
190 VERSION='$(VERSION)'; export VERSION; \
191 CFLGS='$(CFLGS)'; export CFLGS; \
192 LDFLGS='$(LDFLGS)'; export LDFLGS; \
193 COMMONDIR='../$(COMMONDIR)'; export COMMONDIR; \
194 DKHOST='$(DKHOST)'; export DKHOST; \
195 DKSTREAMS='$(DKSTREAMS)'; export DKSTREAMS; \
196 if [ -d $@ -a -f $@/$@.mk ]; then \
198 echo "---- Making $(ACTION) in directory $(CURRENTDIR)/$@ ----"; \
199 $(MAKE) -e -f $@.mk MAKE=$(MAKE) $(ACTION); \