Targets containing % wildcard is a GNU automake custom feature.
DOC= release-$(SQUID_RELEASE)
-%.sgml: %.sgml.in
+SUFFIXES= .sgml.in .sgml
+
+.sgml.in.sgml:
sed \
-e "s%[@]SQUID_VERSION[@]%$(VERSION)%g" \
-e "s%[@]SQUID_RELEASE[@]%$(SQUID_RELEASE)%g" \
< $< >$@
test `grep -c "@SQUID" $@` -eq 0
-%.txt: %.sgml
+.sgml.txt:
linuxdoc -B txt --filter $<
-%.html: %.sgml
+.sgml.html:
linuxdoc -B html -T 2 --split=0 $<
perl -i -p -e "s%$@%%" $@
cp -p $@ $(top_builddir)/RELEASENOTES.html
-%.man: %.sgml
+.sgml.man:
linuxdoc -B txt --manpage $<
-%.info: %.sgml
+.sgml.info:
linuxdoc -B info $<
dist-hook: $(DOC).html