1# Generated automatically from Makefile.in by configure.
2###########################################################################
3# LPRng - An Extended Print Spooler System
4#
5# Copyright 1988-1997 Patrick Powell, San Diego, California
6#     papowell@sdsu.edu
7# See LICENSE for conditions of use.
8#
9###########################################################################
10# MODULE: FAQ/Makefile
11# PURPOSE: generate utilities
12# Makefile.in,v 1.7 1998/03/30 02:37:07 papowell Exp
13########################################################################## 
14
15# FAQ Makefile
16#
17
18DSSSL=docbook-1.54
19DSSSL=modular
20
21SRC=.
22
23CATALOGS= \
24      -c /usr/local/share/sgml/catalog \
25      -c /usr/local/share/sgml/docbook/dsssl/${DSSSL}/catalog
26
27DOC=Cookbook
28DSL=-d $(DOC).dsl
29
30FIGS= \
31chooser.png clients.png configfiles.png filter.png network.png parallel.png pooling.png printserver.png samba.png serial.png spooler.png \
32chooser.eps clients.eps configfiles.eps filter.eps network.eps parallel.eps pooling.eps printserver.eps samba.eps serial.eps spooler.eps \
33
34
35
36all: figs $(DOC).html $(DOC).pdf purge # ${DOC}-Multipart/index.htm
37
38#all: figs $(DOC).ps # ${DOC}-Multipart/index.htm purge
39
40x_advanced.png:
41	cd images; ${MAKE}
42figs: $(FIGS) x_advanced.png
43	touch figs
44
45$(DOC).html: $(DOC).sgml $(DOC).dsl Makefile license.enc
46	fix_html ${DOC}.sgml >${DOC}.htmp
47	jade -i output.html -V nochunks -t sgml \
48		$(CATALOGS) ${DSL} $(DOC).htmp >$(DOC).html
49	-tidy -i -m -f /dev/null ${TIDYFLAGS} $@
50	./updateheader $@
51
52$(DOC).tex: $(DOC).sgml $(DOC).dsl Makefile
53	fix_ps ${DOC}.sgml >${DOC}.htmp
54	jade -Vtex-backend -ioutput.print -t tex -o $(DOC).tex \
55		$(CATALOGS) ${DSL} $(DOC).htmp
56
57$(DOC).dvi: $(DOC).tex $(DOC).dsl Makefile
58	echo "==> TeX pass 1/3"
59	-tex "&jadetex" $(DOC).tex  2>&1 >/dev/null
60	echo "==> TeX pass 2/3"
61	-tex "&jadetex" $(DOC).tex  2>&1 >/dev/null
62	echo "==> TeX pass 3/3"
63	tex "&jadetex" $(DOC).tex
64
65$(DOC).ps: $(DOC).dvi
66	dvips -q -t letter -o $(DOC).ps $(DOC).dvi
67$(DOC).pdf: $(DOC).ps
68	ps2pdf $(DOC).ps $(DOC).pdf
69
70${DOC}-Multipart/index.htm: $(DOC).sgml $(DOC).dsl Makefile license.enc
71	rm -rf ${DOC}-Multipart;
72	if [ ! -d ${DOC}-Multipart ] ; then mkdir ${DOC}-Multipart; fi
73	cp LPRng.jpg LPRngT-L.jpg ${DOC}-Multipart
74	fix_html ${DOC}.sgml >${DOC}.htmp
75	jade -i output.html -V html-manifest -t sgml \
76		$(CATALOGS) ${DSL} $(DOC).htmp
77	-tidy -i -m -f /dev/null ${TIDYFLAGS} `xargs < HTML.manifest`
78	updateheader index.htm
79	mv *.htm ${DOC}-Multipart
80	cp *.png *.jpg ${DOC}-Multipart
81
82purge:
83	rm -f *.aux *.log *.toc *.fot *.dvi *.tex figs *.htmp *.fig
84
85
86.PHONY: all clean install ci install.zman update purge
87
88update:
89	./updateversion *.sgml
90	perl collateindex.pl -t "Index" -N -o genindex.sgml
91	jade -V html-index -V nochunks -t sgml \
92		$(CATALOGS) -d \
93		/usr/local/share/sgml/docbook/dsssl/modular/html/docbook.dsl \
94		$(DOC).sgml >/dev/null
95	perl collateindex.pl -t "Index" -o genindex.sgml HTML.index
96
97install:
98	for i in HTML Multipart PDF ; do \
99		rm -rf ../$$i; mkdir ../$$i; done;
100	cp *.png *.jpg ../HTML/
101	cp ${DOC}.html ../HTML/index.html
102#	cp ${DOC}.ps ../PDF/
103	cp ${DOC}.pdf ../PDF/
104#	cp ${DOC}-Multipart/* ../Multipart
105
106clean:
107	-rm -f *.errs HTML.* *.tex *.log *.aux *.toc *.dvi *.ps *.tex *.fig
108	-rm -f ${DOC}.html index.html *.htm */*.htm *.pdf *.ps *.bak
109	-rm -rf ${DOC}-Multipart
110	-rm -f x_* */x_*
111	for i in *.pic; do s=`echo $$i | sed 's/\.pic/\.png/'`; rm -f $$s; done
112	for i in *.pic; do s=`echo $$i | sed 's/\.pic/\.eps/'`; rm -f $$s; done
113
114mostlyclean distclean:: clean purge
115	-rm -f genindex.sgml
116	-rm -f *.ps *.dvi *.htm *.html *.pdf *.eps
117	
118
119#CI=
120#CO=-kv
121CO=-l
122cifast ci: clean
123	checkin() { \
124		(set +e; rcs -l $$1; exit 0); \
125		ci $(CI) -l -u -f -mUpdate -t-Initial $$1; \
126	}; \
127	for i in  *.sgml Makefile.in Makefile; do \
128		checkin $$i; \
129	done;
130
131correct:
132	correct -d dict *.sgml
133
134# convert PIC figures to eps and png
135# Example:
136# FIGS=existing.eps existing.png
137# figs: ${FIGS}
138
139.SUFFIXES: .pic .fig .eps .png
140
141.pic.fig:
142	pic2fig $<
143	perl -spi.bak -e 'if( /\\\\/ ) { \
144		s/\\\\fP//; \
145		if( s/\\\\fB// ) { s/ 16 / 18 /; } \
146		if( s/\\\\fI// ) { s/ 16 / 17 /; } \
147		} ' $@
148.fig.eps:
149	fig2dev -Leps $< $@
150.fig.png:
151	fig2dev -Lpng $< $@
152