File: Makefile.in

package info (click to toggle)
qprint 1.1.dfsg.2-2.1
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 592 kB
  • sloc: ansic: 715; sh: 152; makefile: 151
file content (238 lines) | stat: -rw-r--r-- 6,749 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

#   Development tree name for this version
PRODUCT = @PRODUCT@
VERSION = @VERSION@
TREE = $(PRODUCT)-$(VERSION)

#   Utilities used in building the program
SHELL = /bin/sh
CC = @CC@
CTANGLE = ctangle
CWEAVE = cweave
DVIPS = dvips
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
PDFTEX = pdftex
TEX = tex
XDVI = xdvi

#   Utility options
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@

#   Targets
PROGS = $(PRODUCT)
DOCUMENTS = $(PRODUCT).tex

#   Installation destinations

## The 'DESTDIR' variable allows you to install the program into a different
## location, e.g., for packaging, without affecting the compiled-in pathnames.
DESTDIR =

prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
mandir = @mandir@
man1dir = $(mandir)/man1
man1ext = .1
BINDIR = $(DESTDIR)$(bindir)
MAN1DIR = $(DESTDIR)$(man1dir)

prog:	$(PROGS)

doc:	$(DOCUMENTS)

all:	$(PROGS) $(DOCUMENTS)

#   Build executable program

$(PRODUCT): $(PRODUCT).o getopt.o
	$(CC) $(PRODUCT).o getopt.o -o $(PRODUCT) $(CFLAGS) $(LDFLAGS)

#   Create C source from web

.w.c:
	$(CTANGLE) $*.w

#   Build TeX documentation file from web

.w.tex:
	$(CWEAVE) $*.w

#   Create TeX .dvi file of documentation

.tex.dvi:
	$(TEX) $*.tex

#   View TeX documentation

viewdoc: $(PRODUCT).dvi
	$(XDVI) $(PRODUCT)

#   Build PostScript file to print program

.dvi.ps:
	$(DVIPS) -f @*.dvi >$*.ps

#   Build PDF file of program and documentation
$(PRODUCT).pdf: $(PRODUCT).tex
	$(PDFTEX) $(PRODUCT).tex

#   Test programs and support for same

wretch: wretch.o
	$(CC) wretch.o -o wretch $(CFLAGS) $(LDFLAGS)

wretch.bin:  wretch
	./wretch

#   Build auto-configuration scripts

configurator:
	rm -f config.cache
	autoconf

#   Installation

install-bin: $(BINDIR) $(PRODUCT)
	$(INSTALL_PROGRAM) $(PRODUCT) $(BINDIR)/$(PRODUCT)

install-man: $(PRODUCT).1
	$(INSTALL_DATA) $(PRODUCT).1 $(MAN1DIR)/$(PRODUCT)$(man1ext)

install: install-bin install-man

#   Uninstallation

uninstall:
	rm -f $(BINDIR)/$(PRODUCT) $(MAN1DIR)/$(PRODUCT)$(man1ext)

#   There are a variety of levels of cleanliness
#
#	clean:	Remove object code, but leave C and TeX extracts from web
#		and generated documentation.  The current build configuration
#		is preserved.
clean:
	rm -f $(PROGS) *.o *.bak *.shar *.zip *.tar.gz *.dvi core *.out \
	      *.log
#
#	distclean:  Remove everything not present in the distribution.
#		    This wipes out the build configuration; you must
#		    re-run ./configure before rebuilding.
distclean:  clean
	rm -f config.cache config.h Makefile config.log config.status
	rm -f $(PRODUCT).tex $(PRODUCT).idx $(PRODUCT).scn $(PRODUCT).toc
#
#	maintainer-clean:  Remove everything derivative from the
#			   master web.	We don't delete $(PRODUCT).c
#			   because that causes configure to fail.
maintainer-clean: distclean
	@echo 'This command is intended for maintainers to use; it'
	@echo 'deletes files that may need special tools to rebuild.'
	rm -f *.ps *.pdf
	rm -f wretch.c wretch.bin

#   Create distribution archives

ARCH_SOURCE = Makefile.in $(PRODUCT).c $(PRODUCT).w config.h.in getopt.c getopt.h
ARCH_DOC = $(PRODUCT).1 index.html logo.gif \
	   rfc1521.html rfc1521.txt $(PRODUCT).pdf \
	   COPYING INSTALL README
ARCH_BIN = $(PRODUCT).exe
ARCH_CONF = configure configure.in install-sh
ARCH_WRETCH = wretch.w wretch.c wretch.bin

ARCH_FILES = $(ARCH_SOURCE) $(ARCH_DOC) $(ARCH_BIN) $(ARCH_CONF) $(ARCH_WRETCH)

dist:
	#   Make zipped archive of Win32 executable
	rm -f $(PRODUCT).zip
	zip $(PRODUCT).zip $(ARCH_BIN)
	#   Make gzipped tar archive of complete distribution
	rm -f $(TREE).tar.gz
	rm -rf $(TREE)
	mkdir $(TREE)
	chmod 777 $(TREE)
	@echo "Copying distribution files"
	@for file in $(ARCH_FILES); do \
	    cp -p $$file $(TREE); \
	done
	tar cfv $(TREE).tar $(TREE)
	gzip $(TREE).tar
	rm -rf $(TREE)

#   Check for lint

lint:	$(PRODUCT).c
	lint $(PRODUCT).c

#   View manual page

manpage:
	nroff -man $(PRODUCT).1 | more

#   Print manual page

printman:
	ptroff -man $(PRODUCT).1

# Test it

check:	$(PRODUCT) wretch.bin
	./$(PRODUCT) --encode --binary <wretch.bin >/tmp/$(PRODUCT)1.bak
	./$(PRODUCT) --decode </tmp/$(PRODUCT)1.bak >/tmp/$(PRODUCT)2.bak
	-cmp -s wretch.bin /tmp/$(PRODUCT)2.bak ; if test $$? -ne 0  ; then \
	    echo '** $(PRODUCT):  Redirection test failed. **' ; else \
	./$(PRODUCT) -eb wretch.bin /tmp/$(PRODUCT)1.bak ;\
	./$(PRODUCT) -d /tmp/$(PRODUCT)1.bak /tmp/$(PRODUCT)2.bak ;\
	cmp -s wretch.bin /tmp/$(PRODUCT)2.bak ; if test $$? -ne 0  ; then \
	    echo '** $(PRODUCT):  Command line file argument test failed. **' ; else \
	    echo 'All tests passed.' ; fi ; fi
	@rm /tmp/$(PRODUCT)1.bak /tmp/$(PRODUCT)2.bak

# Beat it over the head with an aluminium baseball bat

wringer: $(PRODUCT) wretch.bin
	@echo 'This test performs 13 nested encodes and decodes using'
	@echo 'various options and compares the result to the'
	@echo 'original file.'
	./$(PRODUCT) -e --binary wretch.bin /tmp/$(PRODUCT)1.bak    # E  1
	./$(PRODUCT) -e /tmp/$(PRODUCT)1.bak /tmp/$(PRODUCT)2.bak   # E  2
	./$(PRODUCT) -e /tmp/$(PRODUCT)2.bak /tmp/$(PRODUCT)3.bak   # E  3
	./$(PRODUCT) -e /tmp/$(PRODUCT)3.bak /tmp/$(PRODUCT)4.bak   # E  4
	./$(PRODUCT) -e /tmp/$(PRODUCT)4.bak /tmp/$(PRODUCT)5.bak   # E  5
	./$(PRODUCT) -e --paranoid /tmp/$(PRODUCT)5.bak /tmp/$(PRODUCT)6.bak   # E  6
	./$(PRODUCT) -e </tmp/$(PRODUCT)6.bak | ./$(PRODUCT) -e >/tmp/$(PRODUCT)8.bak	# E  7, 8
	./$(PRODUCT) -e /tmp/$(PRODUCT)8.bak /tmp/$(PRODUCT)9.bak   # E  9
	./$(PRODUCT) -e --paranoid /tmp/$(PRODUCT)9.bak /tmp/$(PRODUCT)a.bak   # E 10
	./$(PRODUCT) -e /tmp/$(PRODUCT)a.bak /tmp/$(PRODUCT)b.bak   # E 11
	./$(PRODUCT) -e /tmp/$(PRODUCT)b.bak /tmp/$(PRODUCT)c.bak   # E 12
	./$(PRODUCT) -e /tmp/$(PRODUCT)c.bak /tmp/$(PRODUCT)d.bak   # E 13
	#
	./$(PRODUCT) -d /tmp/$(PRODUCT)d.bak /tmp/qpdc.bak   # D  1
	./$(PRODUCT) -d /tmp/qpdc.bak /tmp/qpdb.bak   # D  2
	./$(PRODUCT) -d /tmp/qpdb.bak /tmp/qpda.bak   # D  3
	./$(PRODUCT) -d /tmp/qpda.bak /tmp/qpd9.bak   # D  4
	./$(PRODUCT) -d /tmp/qpd9.bak /tmp/qpd8.bak   # D  5
	./$(PRODUCT) -d /tmp/qpd8.bak /tmp/qpd7.bak   # D  6
	./$(PRODUCT) -d /tmp/qpd7.bak /tmp/qpd6.bak   # D  7
	./$(PRODUCT) -d </tmp/qpd6.bak | ./$(PRODUCT) -d >/tmp/qpd4.bak   # D  8, 9
	./$(PRODUCT) -d /tmp/qpd4.bak /tmp/qpd3.bak   # D 10
	./$(PRODUCT) -d /tmp/qpd3.bak /tmp/qpd2.bak   # D 11
	./$(PRODUCT) -d /tmp/qpd2.bak /tmp/qpd1.bak   # D 13
	./$(PRODUCT) -d /tmp/qpd1.bak /tmp/qpd0.bak   # D 13
	#
	-cmp -s /tmp/qpd0.bak wretch.bin ; if test $$? -ne 0  ; then \
	    echo '** $(PRODUCT) Wringer test failed. **' ; else \
	    echo 'Wringer test passed.' ; fi
	@rm /tmp/$(PRODUCT)?.bak /tmp/qpd?.bak

#   Default rules

.c.o:
	$(CC) -c $*.c $(CFLAGS)

.SUFFIXES:
.SUFFIXES: .c .o .ch .dvi .tex .w .1 .bin