cleanup manual Makefile
authorCraig Dowell <craigdo@ee.washington.edu>
Sat, 06 Dec 2008 13:56:51 -0800
changeset 399136052c1dd7ab
parent 3990 bace6dec0337
child 3992 cb912b415b7d
child 4033 6abf5a0f12d7
cleanup manual Makefile
doc/manual/Makefile
     1.1 --- a/doc/manual/Makefile	Sat Dec 06 12:25:10 2008 -0800
     1.2 +++ b/doc/manual/Makefile	Sat Dec 06 13:56:51 2008 -0800
     1.3 @@ -6,38 +6,59 @@
     1.4  CSS = --css-include=manual.css
     1.5  SPLIT = --split section
     1.6  
     1.7 -DIA_SOURCES = \
     1.8 -	internet-node-send.dia \
     1.9 -	internet-node-recv.dia \
    1.10 -	packet.dia \
    1.11 -	node.dia \
    1.12 -	buffer.dia \
    1.13 -	sockets-overview.dia \
    1.14 -	testbed.dia \
    1.15 -	emulated-channel.dia
    1.16 +FIGURES = figures
    1.17 +VPATH = $(FIGURES)
    1.18  
    1.19 -DIA_EPS = ${DIA_SOURCES:.dia=.eps}
    1.20 -DIA_PNG = ${DIA_SOURCES:.dia=.png}
    1.21 -DIA_PDF = ${DIA_SOURCES:.dia=.pdf}
    1.22 +IMAGES_EPS = \
    1.23 +	$(FIGURES)/internet-node-send.eps \
    1.24 +	$(FIGURES)/internet-node-recv.eps \
    1.25 +	$(FIGURES)/packet.eps \
    1.26 +	$(FIGURES)/node.eps \
    1.27 +	$(FIGURES)/buffer.eps \
    1.28 +	$(FIGURES)/sockets-overview.eps \
    1.29 +	$(FIGURES)/testbed.eps \
    1.30 +	$(FIGURES)/emulated-channel.eps
    1.31  
    1.32 -all:  images html split-html pdf
    1.33 +IMAGES_PNG = ${IMAGES_EPS:.eps=.png}
    1.34 +IMAGES_PDF = ${IMAGES_EPS:.eps=.pdf}
    1.35  
    1.36 -images:
    1.37 -	cd figures/; $(DIA) -t png $(DIA_SOURCES) 
    1.38 -	cd figures/; $(DIA) -t eps $(DIA_SOURCES) 
    1.39 -	cd figures/; $(foreach FILE,$(DIA_EPS),$(EPSTOPDF) $(FILE);)
    1.40 +IMAGES = $(IMAGES_EPS) $(IMAGES_PNG) $(IMAGES_PDF)
    1.41  
    1.42 -html: images
    1.43 +CHAPTERS = \
    1.44 +	manual.texi \
    1.45 +	attributes.texi \
    1.46 +	callbacks.texi \
    1.47 +	emulation.texi \
    1.48 +	node.texi \
    1.49 +	objects.texi \
    1.50 +	other.texi \
    1.51 +	output.texi \
    1.52 +	packets.texi \
    1.53 +	random.texi \
    1.54 +	realtime.texi \
    1.55 +	routing.texi \
    1.56 +	sockets.texi \
    1.57 +	statistics.texi \
    1.58 +	troubleshoot.texi
    1.59 +
    1.60 +%.eps : %.dia; $(DIA) -t eps $< -e $@
    1.61 +%.png : %.dia; $(DIA) -t png $< -e $@
    1.62 +%.pdf : %.eps; $(EPSTOPDF) $< -o=$@
    1.63 +
    1.64 +all:  $(IMAGES) manual.pdf manual.html manual/manual.html
    1.65 +
    1.66 +manual.pdf: $(IMAGES) $(CHAPTERS)
    1.67 +	$(TEXI2PDF) manual.texi
    1.68 +
    1.69 +manual.html: $(IMAGES) $(CHAPTERS)
    1.70  	$(TEXI2HTML) ${CSS} manual.texi
    1.71  
    1.72 -split-html: images
    1.73 +manual/manual.html: $(IMAGES) $(CHAPTERS)
    1.74  	$(TEXI2HTML) ${CSS} ${SPLIT} manual.texi
    1.75  
    1.76 -pdf: images
    1.77 -	$(TEXI2PDF) manual.texi
    1.78 +figures-clean:
    1.79 +	rm -rf $(IMAGES)
    1.80  
    1.81 -figures-clean:
    1.82 -	cd figures/; rm -rf $(DIA_EPS); rm -rf $(DIA_PNG); rm -rf $(DIA_PDF)
    1.83 -
    1.84 -clean: figures-clean
    1.85 -	rm -rf manual.aux manual.cp manual.cps manual.fn manual.ky manual.pg manual.tp manual.vr manual.toc manual.log manual.pdf manual.html manual/ 
    1.86 +clean: 	figures-clean
    1.87 +	rm -rf manual.aux manual.cp manual.cps manual.fn manual.ky manual.pg 
    1.88 +	rm -rf manual.tp manual.vr manual.toc manual.log manual.pdf manual.html manual/