Makers: Improve markup and formatting
[ccbib.git] / psutils / Makefile
blob9f5abc42fc0a34451fb24c3400003f55b383ad3e
1 # Makefile for PS utilities release 1 patchlevel 17
3 # Copyright (C) Angus J. C. Duggan 1991-1996
4 # See file LICENSE for details.
6 # updated AJCD 3/1/96
8 # Multiple makefiles for different OSes are generated from a single master
9 # now.
11 # There are so many incompatible makes around that putting all of the
12 # non-standard targets explicitly seems to be the only way of ensuring
13 # portability.
15 # epsffit fits an epsf file to a given bounding box
16 # psbook rearranges pages into signatures
17 # psselect selects page ranges
18 # pstops performs general page rearrangement and merging
19 # psnup puts multiple logical pages on one physical page
20 # psresize scales and moves pages to fit on different paper sizes
22 PAPER=a4
24 # Makefile for PSUtils under Unix
26 OS = UNIX
28 BINDIR = /usr/local/bin
29 SCRIPTDIR = $(BINDIR)
30 INCLUDEDIR = /usr/local/share/psutils
31 PERL = /usr/bin/perl
33 BINMODE = 0755
34 MANMODE = 0644
35 CHMOD = chmod
36 INSTALL = install -c -m $(BINMODE)
37 INSTALLMAN = install -c -m $(MANMODE)
38 MANEXT = 1
39 MANDIR = /usr/local/share/man/man$(MANEXT)
41 CC = gcc
42 CFLAGS = -DPAPER=\"$(PAPER)\" -DUNIX -O -Wall
44 BIN = psbook psselect pstops epsffit psnup \
45 psresize
46 SHELLSCRIPTS = getafm showchar
47 PERLSCRIPTS = fixfmps fixmacps fixpsditps fixpspps \
48 fixtpps fixwfwps fixwpps fixscribeps fixwwps \
49 fixdlsrps extractres includeres psmerge
50 MANPAGES = psbook.$(MANEXT) psselect.$(MANEXT) pstops.$(MANEXT) epsffit.$(MANEXT) psnup.$(MANEXT) \
51 psresize.$(MANEXT) psmerge.$(MANEXT) fixscribeps.$(MANEXT) getafm.$(MANEXT) \
52 fixdlsrps.$(MANEXT) fixfmps.$(MANEXT) fixmacps.$(MANEXT) fixpsditps.$(MANEXT) \
53 fixpspps.$(MANEXT) fixtpps.$(MANEXT) fixwfwps.$(MANEXT) fixwpps.$(MANEXT) \
54 fixwwps.$(MANEXT) extractres.$(MANEXT) includeres.$(MANEXT)
55 INCLUDES = md68_0.ps md71_0.ps
57 all: $(BIN) $(PERLSCRIPTS) $(MANPAGES) $(SHELLSCRIPTS)
59 psutil.o: psutil.h patchlev.h pserror.h psutil.c
61 psspec.o: psutil.h patchlev.h psspec.h pserror.h psspec.c
63 pserror.o: psutil.h patchlev.h pserror.h pserror.c
65 epsffit.o: epsffit.c pserror.h patchlev.h
67 epsffit: epsffit.o pserror.o
68 $(CC) $(CCFLAGS) -o epsffit pserror.o epsffit.o
70 psnup: psnup.o psutil.o psspec.o pserror.o
71 $(CC) $(CCFLAGS) -o psnup psutil.o psspec.o pserror.o psnup.o
73 psnup.o: psutil.h patchlev.h psspec.h pserror.h psnup.c
75 psresize: psresize.o psutil.o pserror.o psspec.o
76 $(CC) $(CCFLAGS) -o psresize psutil.o psspec.o pserror.o psresize.o
78 psresize.o: psutil.h patchlev.h psspec.h pserror.h psresize.c
80 psbook: psbook.o psutil.o pserror.o
81 $(CC) $(CCFLAGS) -o psbook psutil.o pserror.o psbook.o
83 psbook.o: psutil.h patchlev.h pserror.h psbook.c
85 psselect: psselect.o psutil.o pserror.o
86 $(CC) $(CCFLAGS) -o psselect psutil.o pserror.o psselect.o
88 psselect.o: psutil.h patchlev.h pserror.h psselect.c
90 pstops: pstops.o psutil.o psspec.o pserror.o
91 $(CC) $(CCFLAGS) -o pstops psutil.o psspec.o pserror.o pstops.o
93 pstops.o: psutil.h patchlev.h psspec.h pserror.h pstops.c
95 getafm: getafm.sh
96 cp $? $@
98 showchar: showchar.sh
99 cp $? $@
101 psmerge: psmerge.pl
102 $(PERL) maketext OS=$(OS) PERL=$(PERL) $? > $@
103 $(CHMOD) $(BINMODE) $@
105 fixfmps: fixfmps.pl
106 $(PERL) maketext OS=$(OS) PERL=$(PERL) $? > $@
107 $(CHMOD) $(BINMODE) $@
109 fixmacps: fixmacps.pl
110 $(PERL) maketext OS=$(OS) PERL=$(PERL) INCLUDE=$(INCLUDEDIR) $? > $@
111 $(CHMOD) $(BINMODE) $@
113 fixpsditps: fixpsditps.pl
114 $(PERL) maketext OS=$(OS) PERL=$(PERL) $? > $@
115 $(CHMOD) $(BINMODE) $@
117 fixpspps: fixpspps.pl
118 $(PERL) maketext OS=$(OS) PERL=$(PERL) $? > $@
119 $(CHMOD) $(BINMODE) $@
121 fixscribeps: fixscribeps.pl
122 $(PERL) maketext OS=$(OS) PERL=$(PERL) $? > $@
123 $(CHMOD) $(BINMODE) $@
125 fixtpps: fixtpps.pl
126 $(PERL) maketext OS=$(OS) PERL=$(PERL) $? > $@
127 $(CHMOD) $(BINMODE) $@
129 fixwfwps: fixwfwps.pl
130 $(PERL) maketext OS=$(OS) PERL=$(PERL) $? > $@
131 $(CHMOD) $(BINMODE) $@
133 fixwpps: fixwpps.pl
134 $(PERL) maketext OS=$(OS) PERL=$(PERL) $? > $@
135 $(CHMOD) $(BINMODE) $@
137 fixwwps: fixwwps.pl
138 $(PERL) maketext OS=$(OS) PERL=$(PERL) $? > $@
139 $(CHMOD) $(BINMODE) $@
141 fixdlsrps: fixdlsrps.pl
142 $(PERL) maketext OS=$(OS) PERL=$(PERL) $? > $@
143 $(CHMOD) $(BINMODE) $@
145 extractres: extractres.pl
146 $(PERL) maketext OS=$(OS) PERL=$(PERL) $? > $@
147 $(CHMOD) $(BINMODE) $@
149 includeres: includeres.pl
150 $(PERL) maketext OS=$(OS) PERL=$(PERL) INCLUDE=$(INCLUDEDIR) $? > $@
151 $(CHMOD) $(BINMODE) $@
153 epsffit.$(MANEXT): epsffit.man
154 $(PERL) maketext MAN="$(MANPAGES)" $? > $@
156 psnup.$(MANEXT): psnup.man
157 $(PERL) maketext MAN="$(MANPAGES)" PAPER=$(PAPER) $? > $@
159 psresize.$(MANEXT): psresize.man
160 $(PERL) maketext MAN="$(MANPAGES)" PAPER=$(PAPER) $? > $@
162 psbook.$(MANEXT): psbook.man
163 $(PERL) maketext "MAN=$(MANPAGES)" $? > $@
165 psselect.$(MANEXT): psselect.man
166 $(PERL) maketext "MAN=$(MANPAGES)" $? > $@
168 pstops.$(MANEXT): pstops.man
169 $(PERL) maketext "MAN=$(MANPAGES)" PAPER=$(PAPER) $? > $@
171 psmerge.$(MANEXT): psmerge.man
172 $(PERL) maketext "MAN=$(MANPAGES)" $? > $@
174 fixfmps.$(MANEXT): fixfmps.man
175 $(PERL) maketext "MAN=$(MANPAGES)" $? > $@
177 fixmacps.$(MANEXT): fixmacps.man
178 $(PERL) maketext "MAN=$(MANPAGES)" INCLUDE=$(INCLUDEDIR) $? > $@
180 fixpsditps.$(MANEXT): fixpsditps.man
181 $(PERL) maketext "MAN=$(MANPAGES)" $? > $@
183 fixpspps.$(MANEXT): fixpspps.man
184 $(PERL) maketext "MAN=$(MANPAGES)" $? > $@
186 fixscribeps.$(MANEXT): fixscribeps.man
187 $(PERL) maketext "MAN=$(MANPAGES)" $? > $@
189 fixtpps.$(MANEXT): fixtpps.man
190 $(PERL) maketext "MAN=$(MANPAGES)" $? > $@
192 fixwfwps.$(MANEXT): fixwfwps.man
193 $(PERL) maketext "MAN=$(MANPAGES)" $? > $@
195 fixwpps.$(MANEXT): fixwpps.man
196 $(PERL) maketext "MAN=$(MANPAGES)" $? > $@
198 fixwwps.$(MANEXT): fixwwps.man
199 $(PERL) maketext "MAN=$(MANPAGES)" $? > $@
201 fixdlsrps.$(MANEXT): fixdlsrps.man
202 $(PERL) maketext "MAN=$(MANPAGES)" $? > $@
204 extractres.$(MANEXT): extractres.man
205 $(PERL) maketext "MAN=$(MANPAGES)" $? > $@
207 includeres.$(MANEXT): includeres.man
208 $(PERL) maketext "MAN=$(MANPAGES)" INCLUDE=$(INCLUDEDIR) $? > $@
210 getafm.$(MANEXT): getafm.man
211 $(PERL) maketext "MAN=$(MANPAGES)" $? > $@
213 clean:
214 rm -f *.o
216 veryclean realclean: clean
217 rm -f $(BIN) $(PERLSCRIPTS) $(MANPAGES)
219 install: install.bin install.script install.man install.include
221 install.bin: $(BIN)
222 -mkdir $(BINDIR)
223 @for i in $(BIN); do \
224 echo Installing $$i; \
225 $(INSTALL) $$i $(BINDIR); \
226 done
228 install.script: $(PERLSCRIPTS) $(SHELLSCRIPTS)
229 -mkdir $(SCRIPTDIR)
230 @for i in $(PERLSCRIPTS) $(SHELLSCRIPTS); do \
231 echo Installing $$i; \
232 $(INSTALL) $$i $(SCRIPTDIR); \
233 done
235 install.include: $(INCLUDES)
236 -mkdir $(INCLUDEDIR)
237 @for i in $(INCLUDES); do \
238 echo Installing $$i; \
239 $(INSTALLMAN) $$i $(INCLUDEDIR); \
240 done
242 install.man: $(MANPAGES)
243 -mkdir $(MANDIR)
244 @for i in $(MANPAGES); do \
245 echo Installing manual page for $$i; \
246 $(INSTALLMAN) $$i $(MANDIR)/$$i; \
247 done