diff options
author | osdl.org!shemminger <osdl.org!shemminger> | 2004-04-15 20:56:59 +0000 |
---|---|---|
committer | osdl.org!shemminger <osdl.org!shemminger> | 2004-04-15 20:56:59 +0000 |
commit | aba5acdfdb347d2c21fc67d613d83d4430ca3937 (patch) | |
tree | 20a89d844444d062bac7e2a945251068f8e39d18 /doc/Makefile | |
parent | 86fdf0e47be697587efcf9602cd1f952a1d73170 (diff) |
(Logical change 1.3)
Diffstat (limited to 'doc/Makefile')
-rw-r--r-- | doc/Makefile | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/doc/Makefile b/doc/Makefile index e69de29b..636b3288 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -0,0 +1,57 @@ +PSFILES=ip-cref.ps ip-tunnels.ps api-ip6-flowlabels.ps ss.ps nstat.ps arpd.ps rtstat.ps +# tc-cref.ps +# api-rtnl.tex api-pmtudisc.tex api-news.tex +# iki-netdev.ps iki-neighdst.ps + + +LATEX=latex +DVIPS=dvips +SGML2DVI=sgml2latex --output=dvi +SGML2HTML=sgml2html -s 0 +LPR=lpr -Zsduplex +SHELL=bash +PAGESIZE=a4 +PAGESPERPAGE=2 + +HTMLFILES=$(subst .sgml,.html,$(shell echo *.sgml)) +DVIFILES=$(subst .ps,.dvi,$(PSFILES)) + + +all: pstwocol + +pstwocol: $(PSFILES) + +html: $(HTMLFILES) + +dvi: $(DVIFILES) + +print: $(PSFILES) + $(LPR) $(PSFILES) + +%.dvi: %.sgml + $(SGML2DVI) $< + +%.dvi: %.tex + @set -e; pass=2; echo "Running LaTeX $<"; \ + while [ `$(LATEX) $< </dev/null 2>&1 | \ + grep -c '^\(LaTeX Warning: Label(s) may\|No file \|! Emergency stop\)'` -ge 1 ]; do \ + if [ $$pass -gt 3 ]; then \ + echo "Seems, something is wrong. Try by hands." ; exit 1 ; \ + fi; \ + echo "Re-running LaTeX $<, $${pass}d pass"; pass=$$[$$pass + 1]; \ + done + +%.ps: %.dvi + $(DVIPS) $< -o $@.tmp + ./do-psnup $@.tmp $@ $(PAGESIZE) $(PAGESPERPAGE) + rm -f $@.tmp + +%.html: %.sgml + $(SGML2HTML) $< + +install: + install -m 0644 $(shell echo *.tex) $(DESTDIR)$(DOCDIR) + install -m 0644 $(shell echo *.sgml) $(DESTDIR)$(DOCDIR) + +clean: + rm -f *.aux *.log *.toc $(PSFILES) $(DVIFILES) *.html |