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