File: Makefile

package info (click to toggle)
psutils 1.17.dfsg-2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 796 kB
  • ctags: 605
  • sloc: ansic: 6,567; sh: 756; perl: 705; makefile: 639; lisp: 74
file content (239 lines) | stat: -rw-r--r-- 6,357 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
# Makefile for PS utilities release 1 patchlevel 17
#
# Copyright (C) Angus J. C. Duggan 1991-1996
# See file LICENSE for details.
#
# updated AJCD 3/1/96
#
# Multiple makefiles for different OSes are generated from a single master
# now.
#
# There are so many incompatible makes around that putting all of the
# non-standard targets explicitly seems to be the only way of ensuring
# portability.

# epsffit fits an epsf file to a given bounding box
# psbook rearranges pages into signatures
# psselect selects page ranges
# pstops performs general page rearrangement and merging
# psnup puts multiple logical pages on one physical page
# psresize scales and moves pages to fit on different paper sizes

PAPER=a4

# Makefile for PSUtils under Unix

OS = UNIX
prefix=/usr

BINDIR = $(prefix)/bin
SCRIPTDIR = $(BINDIR)
INCLUDEDIR = $(prefix)/lib/psutils
PERL = $(prefix)/bin/perl

BINMODE = 0755
MANMODE = 0644
CHMOD = chmod
INSTALL = install -c -m $(BINMODE)
INSTALLMAN = install -c -m $(MANMODE)
MANEXT = 1
MANDIR = $(prefix)/man/man$(MANEXT)

CC = gcc
CCFLAGS = $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)

BIN = psbook psselect pstops epsffit psnup \
	psresize
SHELLSCRIPTS = getafm showchar
PERLSCRIPTS = fixfmps fixpsditps fixpspps \
	fixtpps fixwfwps fixwpps fixscribeps fixwwps \
	fixdlsrps extractres includeres psmerge
MANPAGES = psbook.$(MANEXT) psselect.$(MANEXT) pstops.$(MANEXT) epsffit.$(MANEXT) psnup.$(MANEXT) \
	psresize.$(MANEXT) psmerge.$(MANEXT) fixscribeps.$(MANEXT) getafm.$(MANEXT) \
	fixdlsrps.$(MANEXT) fixfmps.$(MANEXT) fixpsditps.$(MANEXT) \
	fixpspps.$(MANEXT) fixtpps.$(MANEXT) fixwfwps.$(MANEXT) fixwpps.$(MANEXT) \
	fixwwps.$(MANEXT) extractres.$(MANEXT) includeres.$(MANEXT) \
	showchar.$(MANEXT)

all: $(BIN) $(PERLSCRIPTS) $(MANPAGES) $(SHELLSCRIPTS)

psutil.o: psutil.h patchlev.h pserror.h psutil.c

psspec.o: psutil.h patchlev.h psspec.h pserror.h psspec.c

pserror.o: psutil.h patchlev.h pserror.h pserror.c

epsffit.o: epsffit.c pserror.h patchlev.h

epsffit: epsffit.o pserror.o
	$(CC) $(CCFLAGS) -o epsffit pserror.o epsffit.o

psnup: psnup.o psutil.o psspec.o pserror.o
	$(CC) $(CCFLAGS) -o psnup psutil.o psspec.o pserror.o psnup.o -lpaper

psnup.o: psutil.h patchlev.h psspec.h pserror.h psnup.c

psresize: psresize.o psutil.o pserror.o psspec.o
	$(CC) $(CCFLAGS) -o psresize psutil.o psspec.o pserror.o psresize.o \
          -lpaper

psresize.o: psutil.h patchlev.h psspec.h pserror.h psresize.c

psbook: psbook.o psutil.o pserror.o
	$(CC) $(CCFLAGS) -o psbook psutil.o pserror.o psbook.o

psbook.o: psutil.h patchlev.h pserror.h psbook.c

psselect: psselect.o psutil.o pserror.o
	$(CC) $(CCFLAGS) -o psselect psutil.o pserror.o psselect.o

psselect.o: psutil.h patchlev.h pserror.h psselect.c

pstops: pstops.o psutil.o psspec.o pserror.o
	$(CC) $(CCFLAGS) -o pstops psutil.o psspec.o pserror.o pstops.o -lpaper

pstops.o: psutil.h patchlev.h psspec.h pserror.h pstops.c

getafm:	getafm.sh
	cp $? $@

showchar:	showchar.sh
	cp $? $@

psmerge: psmerge.pl
	$(PERL) maketext OS=$(OS) PERL=$(PERL) $? > $@
	$(CHMOD) $(BINMODE) $@

fixfmps: fixfmps.pl
	$(PERL) maketext OS=$(OS) PERL=$(PERL) $? > $@
	$(CHMOD) $(BINMODE) $@

fixpsditps: fixpsditps.pl
	$(PERL) maketext OS=$(OS) PERL=$(PERL) $? > $@
	$(CHMOD) $(BINMODE) $@

fixpspps: fixpspps.pl
	$(PERL) maketext OS=$(OS) PERL=$(PERL) $? > $@
	$(CHMOD) $(BINMODE) $@

fixscribeps: fixscribeps.pl
	$(PERL) maketext OS=$(OS) PERL=$(PERL) $? > $@
	$(CHMOD) $(BINMODE) $@

fixtpps: fixtpps.pl
	$(PERL) maketext OS=$(OS) PERL=$(PERL) $? > $@
	$(CHMOD) $(BINMODE) $@

fixwfwps: fixwfwps.pl
	$(PERL) maketext OS=$(OS) PERL=$(PERL) $? > $@
	$(CHMOD) $(BINMODE) $@

fixwpps: fixwpps.pl
	$(PERL) maketext OS=$(OS) PERL=$(PERL) $? > $@
	$(CHMOD) $(BINMODE) $@

fixwwps: fixwwps.pl
	$(PERL) maketext OS=$(OS) PERL=$(PERL) $? > $@
	$(CHMOD) $(BINMODE) $@

fixdlsrps: fixdlsrps.pl
	$(PERL) maketext OS=$(OS) PERL=$(PERL) $? > $@
	$(CHMOD) $(BINMODE) $@

extractres: extractres.pl
	$(PERL) maketext OS=$(OS) PERL=$(PERL) $? > $@
	$(CHMOD) $(BINMODE) $@

includeres: includeres.pl
	$(PERL) maketext OS=$(OS) PERL=$(PERL) INCLUDE=$(INCLUDEDIR) $? > $@
	$(CHMOD) $(BINMODE) $@

epsffit.$(MANEXT): epsffit.man
	$(PERL) maketext MAN="$(MANPAGES)" $? > $@

psnup.$(MANEXT): psnup.man
	$(PERL) maketext MAN="$(MANPAGES)" PAPER=$(PAPER) $? > $@

psresize.$(MANEXT): psresize.man
	$(PERL) maketext MAN="$(MANPAGES)" PAPER=$(PAPER) $? > $@

psbook.$(MANEXT): psbook.man
	$(PERL) maketext "MAN=$(MANPAGES)" $? > $@

psselect.$(MANEXT): psselect.man
	$(PERL) maketext "MAN=$(MANPAGES)" $? > $@

pstops.$(MANEXT): pstops.man
	$(PERL) maketext "MAN=$(MANPAGES)" PAPER=$(PAPER) $? > $@

psmerge.$(MANEXT): psmerge.man
	$(PERL) maketext "MAN=$(MANPAGES)" $? > $@

fixfmps.$(MANEXT): fixfmps.man
	$(PERL) maketext "MAN=$(MANPAGES)" $? > $@

fixpsditps.$(MANEXT): fixpsditps.man
	$(PERL) maketext "MAN=$(MANPAGES)" $? > $@

fixpspps.$(MANEXT): fixpspps.man
	$(PERL) maketext "MAN=$(MANPAGES)" $? > $@

fixscribeps.$(MANEXT): fixscribeps.man
	$(PERL) maketext "MAN=$(MANPAGES)" $? > $@

fixtpps.$(MANEXT): fixtpps.man
	$(PERL) maketext "MAN=$(MANPAGES)" $? > $@

fixwfwps.$(MANEXT): fixwfwps.man
	$(PERL) maketext "MAN=$(MANPAGES)" $? > $@

fixwpps.$(MANEXT): fixwpps.man
	$(PERL) maketext "MAN=$(MANPAGES)" $? > $@

fixwwps.$(MANEXT): fixwwps.man
	$(PERL) maketext "MAN=$(MANPAGES)" $? > $@

fixdlsrps.$(MANEXT): fixdlsrps.man
	$(PERL) maketext "MAN=$(MANPAGES)" $? > $@

extractres.$(MANEXT): extractres.man
	$(PERL) maketext "MAN=$(MANPAGES)" $? > $@

includeres.$(MANEXT): includeres.man
	$(PERL) maketext "MAN=$(MANPAGES)" INCLUDE=$(INCLUDEDIR) $? > $@

getafm.$(MANEXT): getafm.man
	$(PERL) maketext "MAN=$(MANPAGES)" $? > $@

showchar.$(MANEXT): showchar.man
	$(PERL) maketext "MAN=$(MANPAGES)" $? > $@

clean:
	rm -f *.o

veryclean realclean: clean
	rm -f $(BIN) $(PERLSCRIPTS) $(MANPAGES)

install: install.bin install.script install.man

install.bin: $(BIN)
	-mkdir $(BINDIR)
	@for i in $(BIN); do \
		echo Installing $$i; \
		$(INSTALL) $$i $(BINDIR); \
	done

install.script: $(PERLSCRIPTS) $(SHELLSCRIPTS)
	-mkdir $(SCRIPTDIR)
	@for i in $(PERLSCRIPTS) $(SHELLSCRIPTS); do \
		echo Installing $$i; \
		$(INSTALL) $$i $(SCRIPTDIR); \
	done

install.man: $(MANPAGES)
	-mkdir $(MANDIR)
	@for i in $(MANPAGES); do \
		echo Installing manual page for $$i; \
		$(INSTALLMAN) $$i $(MANDIR)/$$i; \
	done