2000-05-31 19:35:47 +08:00
|
|
|
# Force rebuilds
|
2016-04-12 17:14:54 +08:00
|
|
|
.PHONY: progspell docs progdocs userdocs
|
|
|
|
|
|
|
|
doc-srcdir := $(shell cd $(s) && pwd)
|
|
|
|
sgml2 := $(doc-srcdir)/sgml2
|
2000-05-31 19:35:47 +08:00
|
|
|
|
|
|
|
docs: progdocs userdocs
|
|
|
|
|
2016-04-12 17:14:54 +08:00
|
|
|
doc-fmt = $(1): $(o)prog.$(1) $(o)bird.$(1)
|
|
|
|
$(call doc-fmt,html)
|
|
|
|
$(call doc-fmt,dvi)
|
|
|
|
$(call doc-fmt,ps)
|
|
|
|
$(call doc-fmt,pdf)
|
|
|
|
|
|
|
|
progdocs: $(o)prog.html $(o)prog.pdf
|
|
|
|
userdocs: $(o)bird.html $(o)bird.pdf
|
|
|
|
progspell: $(o)prog.spell
|
|
|
|
|
|
|
|
$(o)prog.sgml: $(srcdir)/tools/progdoc $(objdir)/.dir-stamp
|
|
|
|
$(srcdir)/tools/progdoc $(srcdir) $@
|
|
|
|
|
|
|
|
$(o)%.sgml: $(s)%.sgml $(objdir)/.dir-stamp
|
|
|
|
cp $< $@
|
2000-04-18 00:51:28 +08:00
|
|
|
|
2016-04-12 17:14:54 +08:00
|
|
|
$(o)%.html: $(o)%.sgml
|
|
|
|
cd $(dir $@) && $(sgml2)html $(notdir $<)
|
2000-04-18 00:51:28 +08:00
|
|
|
|
2016-11-09 02:27:58 +08:00
|
|
|
$(o)%.tex: $(o)%.sgml
|
|
|
|
cd $(dir $@) && $(sgml2)latex --output=tex $(notdir $<)
|
|
|
|
|
2016-04-12 17:14:54 +08:00
|
|
|
$(o)%.dvi: $(o)%.tex
|
|
|
|
cd $(dir $@) && TEXINPUTS=$(TEXINPUTS):$(doc-srcdir)/tex latex $(notdir $<)
|
|
|
|
cd $(dir $@) && TEXINPUTS=$(TEXINPUTS):$(doc-srcdir)/tex latex $(notdir $<)
|
2000-04-18 00:51:28 +08:00
|
|
|
|
2016-04-12 17:14:54 +08:00
|
|
|
$(o)%.ps: $(o)%.dvi
|
2000-06-09 14:31:43 +08:00
|
|
|
dvips -D600 -ta4 -o $@ $<
|
2000-04-18 00:51:28 +08:00
|
|
|
|
2016-11-09 02:27:58 +08:00
|
|
|
$(o)%.pdf: $(o)%.tex
|
|
|
|
pdflatex -output-directory=$(dir $@) $<
|
|
|
|
pdflatex -output-directory=$(dir $@) $<
|
2000-05-31 19:35:47 +08:00
|
|
|
|
2016-04-12 17:14:54 +08:00
|
|
|
$(o)%.txt: $(o)%.sgml
|
|
|
|
cd $(dir $@) && $(sgml2)txt $(notdir $<)
|
2000-06-07 20:27:18 +08:00
|
|
|
|
2016-04-12 17:14:54 +08:00
|
|
|
$(o)prog.spell: $(o)prog.sgml $(s)prog-spell.sed
|
|
|
|
sed -f $(lastword $^) <$< >$@
|
|
|
|
ispell $@
|
2000-06-09 14:31:43 +08:00
|
|
|
|
2016-04-12 17:14:54 +08:00
|
|
|
$(call clean,prog.spell $(addprefix *.,html dvi ps pdf sgml tex txt aux log toc))
|