[339] | 1 | #
|
---|
[401] | 2 | # Makefile for mondorescue man pages
|
---|
[339] | 3 | #
|
---|
| 4 | # $Id$
|
---|
| 5 | #
|
---|
[401] | 6 | MANPAGES=$(shell ls *.8)
|
---|
| 7 | HTMLSET=$(shell echo ${MANPAGES} | sed 's~.8~.8.html~g')
|
---|
| 8 | PDFSET=$(shell echo ${MANPAGES} | sed 's~.8~.8.pdf~g')
|
---|
| 9 | PSSET=$(shell echo ${MANPAGES} | sed 's~.8~.8.ps~g')
|
---|
| 10 | TXTSET=$(shell echo ${MANPAGES} | sed 's~.8~.8.txt~g')
|
---|
[326] | 11 |
|
---|
[401] | 12 | .all-html: $(HTMLSET)
|
---|
[399] | 13 | @echo ""
|
---|
| 14 | @echo "Generating Man pages in HTML format"
|
---|
| 15 | @echo "-----------------------------------"
|
---|
[401] | 16 | @touch .all-html
|
---|
[399] | 17 |
|
---|
[401] | 18 | .all-pdf: $(PDFSET)
|
---|
[399] | 19 | @echo ""
|
---|
[401] | 20 | @echo "Generating Man pages in PDF format"
|
---|
[399] | 21 | @echo "-----------------------------------------"
|
---|
[401] | 22 | @touch .all-pdf
|
---|
[399] | 23 |
|
---|
[401] | 24 | .all-ps: $(PSSET)
|
---|
[399] | 25 | @echo ""
|
---|
[401] | 26 | @echo "Generating Man pages in PS format"
|
---|
| 27 | @echo "-----------------------------------------"
|
---|
| 28 | @touch .all-ps
|
---|
| 29 |
|
---|
| 30 | .all-txt: $(TXTSET)
|
---|
| 31 | @echo ""
|
---|
[399] | 32 | @echo "Generating Man pages in TXT format"
|
---|
| 33 | @echo "----------------------------------"
|
---|
[401] | 34 | @touch .all-txt
|
---|
[399] | 35 |
|
---|
[401] | 36 | %.8.html: %.8
|
---|
[399] | 37 | @man2html -r $< > $@
|
---|
[3791] | 38 | @echo "$< ==> $@"
|
---|
[399] | 39 |
|
---|
[401] | 40 | %.8.ps: %.8
|
---|
[919] | 41 | @groff -Tps -mandoc ./$< > $@
|
---|
[3791] | 42 | @echo "$< ==> $@"
|
---|
[399] | 43 |
|
---|
[401] | 44 | %.8.pdf: %.8.ps
|
---|
[399] | 45 | @ps2pdf $<
|
---|
[3791] | 46 | @echo "$< ==> $@"
|
---|
[399] | 47 |
|
---|
[401] | 48 | %.8.txt: %.8
|
---|
[399] | 49 | @nroff -man $< > $@
|
---|
[3791] | 50 | @echo "$< ==> $@"
|
---|
[399] | 51 |
|
---|
[401] | 52 | all: .all-html .all-pdf .all-ps .all-txt
|
---|
[399] | 53 |
|
---|
[401] | 54 | clean:
|
---|
[331] | 55 | @echo ""
|
---|
[401] | 56 | @echo "Cleaning up the documentation directory for man pages"
|
---|
[331] | 57 | @echo ""
|
---|
[3640] | 58 | @bash -c "rm -f *.8.{dvi,pdf,ps,txt,html}"
|
---|
[326] | 59 |
|
---|
[568] | 60 | install: install-mindi install-mondo
|
---|
| 61 |
|
---|
[401] | 62 | install-mindi: all
|
---|
[331] | 63 | @echo ""
|
---|
[401] | 64 | @echo "Delivering mindi man page"
|
---|
[331] | 65 | @echo ""
|
---|
[3640] | 66 | @if [ "${INSTALLDIR}" != "" ]; then mkdir -p ${INSTALLDIR} ; bash -c "cp -a mindi.8.{html,pdf,ps,txt} mindi.8 ${INSTALLDIR}" ; else echo "No INSTALLDIR specified aborting install"; fi
|
---|
[326] | 67 |
|
---|
[401] | 68 | install-mondo: all
|
---|
[331] | 69 | @echo ""
|
---|
[401] | 70 | @echo "Delivering mondo man pages"
|
---|
[331] | 71 | @echo ""
|
---|
[3640] | 72 | @if [ "${INSTALLDIR}" != "" ]; then mkdir -p ${INSTALLDIR} ; bash -c "cp -a mondo*.8.{html,pdf,ps,txt} mondo*.8 ${INSTALLDIR}" ; else echo "No INSTALLDIR specified aborting install"; fi
|
---|