From b7a9fc71c6cf6546277207dda22c67e650fb0c43 Mon Sep 17 00:00:00 2001 From: Carl-Daniel Hailfinger Date: Sat, 19 May 2012 04:39:12 +0200 Subject: [PATCH] Clean up and fix Makefiles --- Makefile | 85 +++++++++++++++++++++++++++++-------------------------- manpages/Makefile | 67 ++++++++++++++++++++----------------------- 2 files changed, 76 insertions(+), 76 deletions(-) rewrite Makefile (64%) rewrite manpages/Makefile (77%) diff --git a/Makefile b/Makefile dissimilarity index 64% index ce371f4..d4d0f9f 100755 --- a/Makefile +++ b/Makefile @@ -1,40 +1,45 @@ -# $Id$ - -all: lartc.txt lartc.pdf html/index.html html.tar.gz lartc.dvi lartc.pdf.gz lartc.ps lartc.ps lartc.ps.gz lartc.html contriblist - -contriblist: lartc.txt - ./makecontriblist > contriblist - -clean: - rm -rf *.dvi *.pdf *.tex *.toc *.aux *.txt *.ps *.bak *.tmp *~ *.log html *.pdf.gz *.ps.gz html.tar.gz lartc.html contriblist - -%.pdf.gz: %.pdf - gzip < $< > $@ - -%.ps.gz: %.ps - gzip < $< > $@ - - -html/index.html: lartc.db - db2html -o html lartc.db - -html.tar.gz: html/index.html - tar czf html.tar.gz html/ - -%.txt: %.db - docbook2txt $< - -%.pdf: %.db - docbook2pdf -p /usr/bin/openjade $< - -%.ps: %.db - docbook2ps $< - -%.dvi: %.db - docbook2dvi $< - -lartc.html: lartc.db - docbook2html lartc.db --nochunks - -publish: - rsync --copy-links --delete -avrze ssh ./html lartc.txt lartc.pdf html.tar.gz lartc.dvi lartc.pdf.gz lartc.ps lartc.ps lartc.ps.gz lartc.html ds9a.nl:./lartc/ +# $Id$ + +HOWTODOCS := howto/ html.tar.gz lartc.txt lartc.dvi lartc.pdf lartc.pdf.gz lartc.ps lartc.ps.gz lartc.html + +all: $(HOWTODOCS) contriblist + +contriblist: lartc.txt + ./makecontriblist > contriblist + +clean: + rm -rf $(HOWTODOCS) contriblist lartc.aux lartc.log lartc.out + +%.pdf.gz: %.pdf + gzip < $< > $@ + +%.ps.gz: %.ps + gzip < $< > $@ + + +howto/: lartc.db + docbook2html -V "%use-id-as-filename%" -o howto/ lartc.db + +html.tar.gz: howto/ + tar czf html.tar.gz howto/ + +%.txt: %.db + docbook2txt $< + +%.pdf: %.db + docbook2pdf -p /usr/bin/openjade $< + +%.ps: %.db + docbook2ps $< + +%.dvi: %.db + docbook2dvi $< + +lartc.html: lartc.db + docbook2html --nochunks lartc.db + +publish: + # Print a list of files which should be synced. + # Note that autoloadbalance.php3, index.php3 and manpages/index.php3 + # are not in this list because they are not rebuilt by this Makefile. + echo $(HOWTODOCS) contriblist LARTC-zh_CN.GB2312.pdf wondershaper/ autoloadbalance.php3 index.php3 manpages/ diff --git a/manpages/Makefile b/manpages/Makefile dissimilarity index 77% index 55a582d..6e5c6ea 100644 --- a/manpages/Makefile +++ b/manpages/Makefile @@ -1,36 +1,31 @@ -all: tc.txt tc.dvi tc.pdf tc.ps tc.ps.gz tc.html \ - ip.txt ip.dvi ip.pdf ip.ps ip.ps.gz \ - tc-sfq.txt tc-sfq.dvi tc-sfq.pdf tc-sfq.ps tc-sfq.ps.gz tc-sfq.html \ - tc-tbf.txt tc-tbf.dvi tc-tbf.pdf tc-tbf.ps tc-tbf.ps.gz tc-tbf.html \ - tc-prio.txt tc-prio.dvi tc-prio.pdf tc-prio.ps tc-prio.ps.gz tc-prio.html \ - tc-red.txt tc-red.dvi tc-red.pdf tc-red.ps tc-red.ps.gz tc-red.html \ - tc-pbfifo.txt tc-pbfifo.dvi tc-pbfifo.pdf tc-pbfifo.ps tc-pbfifo.ps.gz tc-pbfifo.html \ - tc-pfifo_fast.txt tc-pfifo_fast.dvi tc-pfifo_fast.pdf tc-pfifo_fast.ps tc-pfifo_fast.ps.gz tc-pfifo_fast.html \ - tc-cbq.txt tc-cbq.dvi tc-cbq.pdf tc-cbq.ps tc-cbq.ps.gz tc-cbq.html \ - tc-htb.txt tc-htb.dvi tc-htb.pdf tc-htb.ps tc-htb.ps.gz tc-htb.html \ - tc-cbq-details.txt tc-cbq-details.dvi tc-cbq-details.pdf tc-cbq-details.ps tc-cbq-details.ps.gz tc-cbq-details.html - -clean: - rm *.txt *.dvi *.pdf *.ps *.ps.gz *~ - -%.txt: %.8 - groff -man -Tascii -P-u -P-b ./$< > $@ - -%.dvi: %.8 - man -l -Tdvi $< > $@ - -%.html: %.8 - groff -man -mhtml - -Thtml < ./$< > $@ - - -%.pdf: %.dvi - dvipdfm $< - -%.pdf.gz: %.pdf - gzip < $< > $@ - -%.ps.gz: %.ps - gzip < $< > $@ - -%.ps: %.dvi - dvips -o $@ $< +MANPAGES_FULL := ip.8 tc.8 tc-cbq.8 tc-cbq-details.8 tc-htb.8 tc-pbfifo.8 tc-pfifo_fast.8 tc-prio.8 tc-red.8 tc-sfq.8 tc-tbf.8 +MANPAGES := $(MANPAGES_FULL) tc-bfifo.8 tc-pfifo.8 + +ALLOUTPUTS := $(MANPAGES_FULL:.8=.txt) $(MANPAGES_FULL:.8=.dvi) $(MANPAGES_FULL:.8=.pdf) $(MANPAGES_FULL:.8=.ps) $(MANPAGES_FULL:.8=.ps.gz) $(MANPAGES_FULL:.8=.html) + +all: $(ALLOUTPUTS) + +clean: + rm -f $(ALLOUTPUTS) + +%.txt: %.8 + groff -man -Tascii -P-u -P-b ./$< > $@ + +%.dvi: %.8 + man -l -Tdvi $< > $@ + +%.html: %.8 + groff -man -mhtml - -Thtml < ./$< > $@ + + +%.pdf: %.dvi + dvipdfm $< + +%.pdf.gz: %.pdf + gzip < $< > $@ + +%.ps.gz: %.ps + gzip < $< > $@ + +%.ps: %.dvi + dvips -o $@ $< -- 2.11.4.GIT