SRC= perlcgi \ voip \ newprinter \ dell700m \ hylafax \ uts-wireless \ postgresql-cluster TXT=$(addsuffix .txt,$(SRC)) HTML=$(subst .txt,.html,$(TXT)) PDF=$(subst .txt,.pdf,$(TXT)) all: html pdf clean: rm -f $(HTML) $(PDF) *~ html: $(HTML) pdf: $(PDF) %.html : %.txt if [ -f $<_badges.conf ]; then \ asciidoc -b css-embedded -f $<_badges.conf -o $@ $<; \ else \ asciidoc -b css-embedded -o $@ $<; \ fi %.db : %.txt asciidoc -b docbook -o $@ $< %.pdf : %.db jw -b pdf $<