
### $Id: Makefile,v 1.5 1996/07/07 23:51:22 morgan Exp $

TXTER=sgml2txt
HTMLER=sgml2html

FILES=pam pam_appl pam_modules
FSRCS=pam.sgml pam_appl.sgml pam_modules.sgml
HTMLS=html/pam.html html/pam_appl.html html/pam_modules.html

#######################################################

dummy:

	@echo "*** This is not a top-level Makefile!"

all: texts htmls

texts: txts/*.txt

txts/*.txt : pam.sgml pam_appl.sgml pam_modules.sgml
	mkdir -p ./txts
	for i in $(FILES) ; do \
		if [ ! -f "txts/$$i.txt" ] \
				|| [ "$$i.sgml" -nt "txts/$$i.txt" ]; then \
			cd txts ; $(TXTER) ../$$i ; cd .. ; \
		fi ; \
	done

htmls: $(HTMLS)

$(HTMLS) : pam.sgml pam_appl.sgml pam_modules.sgml
	for i in $(FILES) ; do \
		if [ ! -f "html/$$i.html" ] || [ "$$i.sgml" -nt "html/$$i.html" ]; then \
			cd html ; $(HTMLER) ../$$i ; cd .. ; \
		fi ; \
	done

extraclean: clean

clean:
	rm -f *~ *.bak
	rm -f txts/*.txt
	rm -f html/pam*.html
