# Generated automatically from Makefile.in by configure.
###########################################################################
# LPRng - An Extended Print Spooler System
#
# Copyright 1988-1997 Patrick Powell, San Diego, California
#     papowell@sdsu.edu
# See LICENSE for conditions of use.
#
###########################################################################
# MODULE: FAQ/Makefile
# PURPOSE: generate utilities
# Makefile.in,v 1.7 1998/03/30 02:37:07 papowell Exp
########################################################################## 

# FAQ Makefile
#
SRC = .

prefix = /usr
MAN =		$(prefix)/man
SHELL =		/bin/sh

DOC=LPRng-HOWTO

CATALOGS= \
	  -c /usr/local/share/sgml/catalog \
	  -c /usr/local/share/sgml/docbook/dsssl/docbook-1.54/catalog

all: license.enc license.txt y2k.txt $(DOC).html purge

LICENSE= $(SRC)/../LICENSE

license.txt: $(LICENSE)
	cp $(LICENSE) $@

license.enc: $(LICENSE) Makefile
	echo "<![ CDATA [" >$@
	cat $(LICENSE) >>$@
	echo "]]>" >>$@

y2k.txt: $(SRC)/../Y2KCompliance
	cp $^ $@

$(DOC).html: $(DOC).sgml $(DOC).dsl Makefile license.enc
	jade -i output.html -V nochunks -t sgml \
		$(CATALOGS) -d $(DOC).dsl $(DOC).sgml >$(DOC).html
	-tidy -i -m -f /dev/null ${TIDYFLAGS} $@

index.htm HTML.manifest: $(DOC).sgml $(DOC).dsl Makefile license.enc
	jade -i output.html -V html-manifest -t sgml \
		$(CATALOGS) -d $(DOC).dsl $(DOC).sgml
	-tidy -i -m -f /dev/null ${TIDYFLAGS} `xargs < HTML.manifest`
	perl -spi -e 's/index.htm/start.htm/g;' *.htm
	cp index.htm start.htm

check: license.enc
	#nsgmls -s -f handbook.errs handbook.sgml
	nsgmls -s $(CATALOGS) $(DOC).sgml

$(DOC).dvi: $(DOC).sgml $(DOC).dsl Makefile license.enc
	jade -Vtex-backend -ioutput.print -t tex -o $(DOC).tex \
		$(CATALOGS) -d $(DOC).dsl $(DOC).sgml
	echo "==> TeX pass 1/3"
	tex "&jadetex" $(DOC).tex >/dev/null 2>&1
	echo "==> TeX pass 2/3"
	tex "&jadetex" $(DOC).tex >/dev/null 2>&1
	echo "==> TeX pass 3/3"
	tex "&jadetex" $(DOC).tex

$(DOC).ps: $(DOC).dvi
	dvips -q -t letter -o $(DOC).ps $(DOC).dvi

purge:
	rm -f *.aux *.log *.toc *.fot


.PHONY: all clean install ci install.zman update purge

update:
	updateversion *.sgml LPRng.html
	cp ../CHANGES .
	perl collateindex.pl -t "Index" -N -o genindex.sgml
	jade -V html-index -V nochunks -t sgml \
		$(CATALOGS) -d /usr/local/share/sgml/docbook/dsssl/docbook-1.54/html/docbook.dsl $(DOC).sgml >/dev/null
	perl collateindex.pl -t "Index" -o genindex.sgml HTML.index

# 
#
install:
	
clean:
	-rm -f *.errs HTML.* *.tex *.log *.aux *.toc
	-rm -f *.ps *.dvi

mostlyclean distclean:: clean

realclean: clean purge
	-rm -f CHANGES HTML.* genindex.sgml *.htm LPRng-HOWTO.html
	-rm -f *.ps *.dvi
	

#CI=
#CO=-kv
CO=-l
cifast ci: clean
	checkin() { \
		rcs -l $$1; \
		ci $(CI) -mUpdate -t-Initial $$1; \
		yes |co $(CO) $$1; \
	}; \
	for i in  *.sgml Makefile.in Makefile; do \
		checkin $$i; \
	done;

correct:
	correct -d dict *.sgml
