source: MondoRescue/branches/stable/documentation/Makefile@ 399

Last change on this file since 399 was 399, checked in by bcornec, 18 years ago
  • man pages reviewed
  • pdf, ps, txt and html generated from man pages and published on the Web
  • Bob is in the thanks page for 2nd DNS server
File size: 3.5 KB
Line 
1#
2# Makefile for mondorescue documentation build
3#
4# $Id$
5#
6TARGET=mondorescue-howto
7SRC=$(shell ls *.sgml)
8DSL=$(TARGET).dsl
9IMAGESDIR=images
10IMAGES=$(shell ls ${IMAGESDIR}/*.png | sed 's/\.png/.eps/g')
11
12#
13# Man pages handling
14#
15MRMPDIR=../mondo/mondo/mondorestore
16MRMPNAM=mondorestore.8
17MAMPDIR=../mondo/mondo/mondoarchive
18MAMPNAM=mondoarchive.8
19MIMPDIR=../mindi
20MIMPNAM=mindi.8
21
22all: all-howto all-man
23
24all-howto: $(TARGET).ps $(TARGET).pdf $(TARGET)/index.html $(TARGET).txt $(TARGET).html $(TARGET).rtf
25
26all-man: .all-man-html .all-man-pdf .all-man-txt
27
28.all-man-html: $(MRMPNAM).html $(MAMPNAM).html $(MIMPNAM).html
29 @echo ""
30 @echo "Generating Man pages in HTML format"
31 @echo "-----------------------------------"
32 @touch .all-man-html
33
34.all-man-pdf: $(MRMPNAM).pdf $(MAMPNAM).pdf $(MIMPNAM).pdf
35 @echo ""
36 @echo "Generating Man pages in PDF and PS format"
37 @echo "-----------------------------------------"
38 @touch .all-man-pdf
39
40.all-man-txt: $(MRMPNAM).txt $(MAMPNAM).txt $(MIMPNAM).txt
41 @echo ""
42 @echo "Generating Man pages in TXT format"
43 @echo "----------------------------------"
44 @touch .all-man-txt
45
46$(MRMPNAM).html: $(MRMPDIR)/$(MRMPNAM)
47 @man2html -r $< > $@
48
49$(MAMPNAM).html: $(MAMPDIR)/$(MAMPNAM)
50 @man2html -r $< > $@
51
52$(MIMPNAM).html: $(MIMPDIR)/$(MIMPNAM)
53 @man2html -r $< > $@
54
55$(MRMPNAM).ps: $(MRMPDIR)/$(MRMPNAM)
56 @man2dvi $< > $(MRMPNAM).dvi
57 @dvips $(MRMPNAM).dvi -o $@
58 @rm -f $(MRMPNAM).dvi
59
60$(MAMPNAM).ps: $(MAMPDIR)/$(MAMPNAM)
61 @man2dvi $< > $(MAMPNAM).dvi
62 @dvips $(MAMPNAM).dvi -o $@
63 @rm -f $(MAMPNAM).dvi
64
65$(MIMPNAM).ps: $(MIMPDIR)/$(MIMPNAM)
66 @man2dvi $< > $(MIMPNAM).dvi
67 @dvips $(MIMPNAM).dvi -o $@
68 @rm -f $(MIMPNAM).dvi
69
70$(MRMPNAM).pdf: $(MRMPNAM).ps
71 @ps2pdf $<
72
73$(MAMPNAM).pdf: $(MAMPNAM).ps
74 @ps2pdf $<
75
76$(MIMPNAM).pdf: $(MIMPNAM).ps
77 @ps2pdf $<
78
79$(MRMPNAM).txt: $(MRMPDIR)/$(MRMPNAM)
80 @nroff -man $< > $@
81
82$(MAMPNAM).txt: $(MAMPDIR)/$(MAMPNAM)
83 @nroff -man $< > $@
84
85$(MIMPNAM).txt: $(MIMPDIR)/$(MIMPNAM)
86 @nroff -man $< > $@
87
88${IMAGESDIR}/%.eps: ${IMAGESDIR}/%.png
89 @echo "Converting $< to $@"
90 @convert $< $@
91
92$(TARGET).txt: $(SRC)
93 @echo ""
94 @echo "Generating doc in TXT format"
95 @echo "----------------------------"
96 @docbook2txt $(TARGET).sgml
97
98$(TARGET).ps: $(SRC) $(DSL) $(IMAGES)
99 @echo ""
100 @echo "Generating doc in PostScript format"
101 @echo "-----------------------------------"
102 @docbook2ps -d $(TARGET).dsl'#print' $(TARGET).sgml
103
104$(TARGET)/index.html: $(SRC) $(DSL) $(IMAGES)
105 @echo ""
106 @echo "Generating all HTML pages"
107 @echo "-------------------------"
108 @rm -fr $(TARGET)
109 @docbook2html -d $(TARGET).dsl'#html' -o $(TARGET) $(TARGET).sgml
110
111$(TARGET).html: $(SRC) $(DSL) $(IMAGES)
112 @echo ""
113 @echo "Generating doc in HTML format"
114 @echo "-----------------------------"
115 @docbook2html -u -d $(TARGET).dsl'#txt' $(TARGET).sgml
116
117$(TARGET).pdf: $(SRC) $(DSL) $(IMAGES)
118 @echo ""
119 @echo "Generating doc in PDF format"
120 @echo "----------------------------"
121 @docbook2pdf -d $(TARGET).dsl'#pdf' $(TARGET).sgml
122
123$(TARGET).rtf: $(SRC) $(DSL) $(IMAGES)
124 @echo ""
125 @echo "Generating doc in RTF format"
126 @echo "----------------------------"
127 @docbook2rtf -d $(TARGET).dsl'#print' $(TARGET).sgml
128
129clean:
130 @echo ""
131 @echo "Cleaning up the documentation directory"
132 @echo ""
133 @rm -fr $(TARGET).{aux,log,out,tex,dvi,pdf,ps,txt,rtf,html} $(TARGET)
134
135install: all
136 @echo ""
137 @echo "Delivering mondorescue documentation"
138 @echo ""
139 @if [ "${INSTALLDIR}" != "" ]; then cp -a $(TARGET).{html,pdf,ps,txt,rtf} $(TARGET) ${INSTALLDIR} ; cp -a ${IMAGESDIR} ${INSTALLDIR}/$(TARGET) ; else echo "No INSTALLDIR specified aborting install"; fi
Note: See TracBrowser for help on using the repository browser.