File: Makefile.in

package info (click to toggle)
psptools 1.2.2-7
  • links: PTS
  • area: main
  • in suites: woody
  • size: 316 kB
  • ctags: 11
  • sloc: perl: 1,528; sh: 1,406; makefile: 302
file content (228 lines) | stat: -rw-r--r-- 7,099 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
# Makefile for psptools.
# Copyright (C) 1995 Yves Arrouye <Yves.Arrouye@imag.fr>

#### Start of system configuration section. ####

srcdir = @srcdir@
VPATH = @srcdir@

INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(INSTALL_GROUP) $(INSTALL_USER)
INSTALL_DATA = @INSTALL_DATA@
PERL = @PERL@
GZIP = @GZIP@
COMPRESS = @COMPRESS@

SHAR = @SHAR@
SED = @SED@
RM = rm -f

transform = @program_transform_name@
mancompress = 

prefix = @prefix@
exec_prefix = @exec_prefix@

# Directory in which to install scripts.
bindir = $(exec_prefix)/bin

# Directory in which to install library files.
perldir = @PERLLIB@

# Directory in which to install manual pages.
manprefix = $(prefix)/man
catprefix = $(manprefix)

#

dirbin = $(bindir)
prefixman = $(manprefix)

#### End of system configuration section. ####

SHELL = /bin/sh

PROGRAMS = psplpr npslpr mkppddir
MANPAGES = man/man1/psplpr.1 man/man1/npslpr.1 man/man1/mkppddir.1
PERLLIBS = lib/perl/ppd.pl lib/perl/printcap.pl lib/perl/printer.pl \
    lib/perl/psptools.pl

M4FILES = aclocal.m4
# Files that can be generated, but should be up to date for a distribution.
DISTDEP = Makefile configure.in
# Files to distribute.
DISTFILES = COPYRIGHT README INSTALL INSTALL.QUICK TODO ChangeLog \
        Makefile.in aclocal.m4 configure.in \
	src/psplpr.pl.in src/npslpr.pl.in src/mkppddir.pl.in \
	man/man1/psplpr.1.in man/man1/npslpr.1.in man/man1/mkppddir.1.in \
	lib/perl/ppd.pl.in lib/perl/printcap.pl.in lib/perl/printer.pl.in \
	    lib/perl/psptools.pl.in \
	configure install-sh mkinstalldirs

TARGETFILES = $(PROGRAMS) $(MANPAGES) $(PERLLIBS)
REMOVABLEFILES = $(TARGETFILES) src/psplpr.pl src/npslpr.pl src/mkppddir.pl \
	debian/postinst debian/prerm sedscript

all: psptools
debian: all debian/postinst debian/prerm

psptools: $(TARGETFILES)

src/psplpr.pl: src/psplpr.pl.in sedscript
	$(SED) -f sedscript src/psplpr.pl.in >$@
src/npslpr.pl: src/npslpr.pl.in sedscript
	$(SED) -f sedscript src/npslpr.pl.in >$@
src/mkppddir.pl: src/mkppddir.pl.in sedscript
	$(SED) -f sedscript src/mkppddir.pl.in >$@

man/man1/psplpr.1: man/man1/psplpr.1.in sedscript
	$(SED) -f sedscript man/man1/psplpr.1.in >$@
man/man1/npslpr.1: man/man1/npslpr.1.in sedscript
	$(SED) -f sedscript man/man1/npslpr.1.in >$@
man/man1/mkppddir.1: man/man1/mkppddir.1.in sedscript
	$(SED) -f sedscript man/man1/mkppddir.1.in >$@

lib/perl/printcap.pl: lib/perl/printcap.pl.in sedscript
	$(SED) -f sedscript lib/perl/printcap.pl.in >$@
lib/perl/printer.pl: lib/perl/printer.pl.in sedscript
	$(SED) -f sedscript lib/perl/printer.pl.in >$@
lib/perl/ppd.pl: lib/perl/ppd.pl.in sedscript
	$(SED) -f sedscript lib/perl/ppd.pl.in >$@
lib/perl/psptools.pl: lib/perl/psptools.pl.in sedscript
	$(SED) -f sedscript lib/perl/psptools.pl.in >$@

psplpr: src/psplpr.pl
	cp $? $@
	chmod +x $@

npslpr: src/npslpr.pl
	cp $? $@
	chmod +x $@

mkppddir: src/mkppddir.pl
	cp $? $@
	chmod +x $@

installdirs:
	$(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(perldir) \
	    $(manprefix)/man1

install: all install-psptools
debian-install: debian install-psptools

install-psptools: installdirs install-man
	$(INSTALL_PROGRAM) psplpr $(bindir)/`echo psplpr|$(SED) '$(transform)'`; \
	$(INSTALL_PROGRAM) npslpr $(bindir)/`echo npslpr|$(SED) '$(transform)'`; \
	$(INSTALL_PROGRAM) mkppddir $(bindir)/`echo mkppddir|$(SED) '$(transform)'`; \
	for i in $(PERLLIBS); do \
	  $(INSTALL_DATA) $(srcdir)/$$i $(perldir); \
	done;

# Install manual pages. Try to see if there are already compres$(SED)
# manual pages in the destination directory. If this is the case, then
# compress the new manual pages too.

install-man:
	manpages="`ls $(manprefix)/man1`"; \
	for m in $(MANPAGES); do \
	  i=`basename $$m`; \
	  sect=`echo $$i | $(SED) 's/.*\.//'`; \
	  $(RM) $(manprefix)/man$$sect/$$i $(manprefix)/$$i.gz \
	      $(manprefix)/man$$sect/$$i.Z; \
	  $(INSTALL_DATA) $$m $(manprefix)/man$$sect; \
	  if test "$(mancompress)" = gzip -o "`echo \"$$manpages\"|$(SED) '/\.gz[ \t]*/!d'`" != "" \
	    -a "$(GZIP)" != ""; then \
	    $(RM) $(manprefix)/man$$sect/$$i.gz; \
	    $(GZIP) --best $(manprefix)/man$$sect/$$i; \
	  else \
	    if test "$(mancompress)" = compress -o "`echo \"$$manpages\"|$(SED) '/\.Z[ \t]*/!d'`" != "" \
	      -a "$(COMPRESS)" != ""; then \
	      $(RM) $(manprefix)/man$$sect/$$i.Z; \
	      $(COMPRESS) $(manprefix)/man$$sect/$$i; \
	    fi; \
	  fi; \
	done

uninstall: uninstall-man
	for p in $(PROGRAMS); do \
	  rm -f $(bindir)/`echo $$p|$(SED) '$(transform)'`; \
	done; \
	for i in ppd.pl printcap.pl printer.pl psptools.pl; do \
	  rm -f $(perldir)/$$i; \
	done; \
	if test "`ls $(perldir)`" = ""; then rm -rf $(perldir); fi \

uninstall-man:
	for m in $(MANPAGES); do \
	  f=`basename $$m`; \
	  for i in $f $f.gz $f.Z; do \
	    sect=`echo $$i | $(SED) 's/[^0-9]//g'`; \
	    if test -f $(manprefix)/man$$sect/$$i; then \
	        rm -f $(manprefix)/man$$sect/$$i; fi; \
	    if test -f $(catdir)/man$$sect/$$i; then \
	        rm -f $(catdir)/man$$sect/$$i; fi; \
	  done; \
	done

${srcdir}/configure: configure.in $(M4FILES)
	cd $(srcdir) && \
	rm -f configure && autoconf && chmod +x configure
Makefile: Makefile.in config.status
	./config.status
sedscript: sedscript.in config.status
	./config.status
config.status: configure
	./config.status --recheck

debian/postinst: debian/postinst.in Makefile
	$(SED) -e 's,%bindir%,$(dirbin),g' \
	    -e 's,%manprefix%,$(prefixman),g' debian/postinst.in >$@
debian/prerm: debian/prerm.in Makefile
	$(SED) -e 's,%bindir%,$(dirbin),g' debian/prerm.in >$@

maintainer-clean::
	@echo "This command is intended for maintainers to use;"
	@echo "rebuilding the deleted files requires autoconf"
	@echo "and copies of install-sh and mkinstalldirs."
	rm -f TAGS *.info* *~
	rm -f configure install-sh mkinstalldirs

clean mostlyclean distclean maintainer-clean::
	rm -f $(REMOVABLEFILES)

distclean maintainer-clean::
	rm -f Makefile config.status config.cache config.log
	rm -f configure.tmp

clean mostlyclean distclean maintainer-clean::
dist: $(DISTDEP)
	distname=`$(SED) -e '/^psptools_version=[^0-9]*/!d' \
	-e 's/[^0-9.]*\([0-9a-z.]*\).*/psptools-\1/' configure.in`; \
	rm -fr $$distname; \
	mkdir $$distname; \
	for file in $(DISTFILES); do \
	  2>/dev/null $(SHELL) ${srcdir}/mkinstalldirs \
	    `echo $$distname/$$file | $(SED) 's,/[^/]*$$,,'`; \
	  ln $$file $$distname/$$file \
	  || { echo copying $$file instead; cp -p $$file $$distname/$$file;}; \
	done; \
	chmod -R a+rX $$distname; \
	tar -chz -f $$distname.tar.gz $$distname; \
	rm -fr $$distname

shar: $(DISTDEP)
	distname=`$(SED) -e '/^psptools_version=[^0-9]*/!d' \
	-e 's/[^0-9.]*\([0-9a-z.]*\).*/psptools-\1/' configure.in`; \
	rm -fr $$distname; \
	mkdir $$distname; \
	for file in $(DISTFILES); do \
	  2>/dev/null $(SHELL) ${srcdir}/mkinstalldirs \
	    `echo $$distname/$$file | $(SED) 's,/[^/]*$$,,'`; \
	  ln $$file $$distname/$$file \
	  || { echo copying $$file instead; cp -p $$file $$distname/$$file;}; \
	done; \
	chmod -R a+rX $$distname; \
	$(SHAR) $(SHARFLAGS) -c -l 50 -a -n $$distname -o $$distname.shar \
	    $$distname; \
	rm -fr $$distname