begin html generation of manpages

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-03-20 03:23:13 +01:00
parent 4c5b6077a7
commit 14d6fccd05
2 changed files with 19 additions and 4 deletions

6
.gitignore vendored
View file

@ -5,4 +5,10 @@
doc/man/*.[1-9] doc/man/*.[1-9]
doc/man/.marker doc/man/.marker
doc/man/man*/ doc/man/man*/
doc/html
conf/type/*/*.7 conf/type/*/*.7
conf/type/*/man.html

View file

@ -2,7 +2,11 @@
PREFIX=/usr PREFIX=/usr
BINDIR=$(PREFIX)/bin BINDIR=$(PREFIX)/bin
MANDIR=$(PREFIX)/share/man MANDIR=$(PREFIX)/share/man
A2X=a2x -f manpage --no-xmllint
# Manpage and HTML
A2XM=a2x -f manpage --no-xmllint
# A2XH=a2x -f xhtml --no-xmllint
A2XH=asciidoc -b xhtml11
# Developer only # Developer only
WEBDIR=$$HOME/niconetz WEBDIR=$$HOME/niconetz
@ -60,11 +64,11 @@ doc/man/.marker: $(MANDIR)/cdist-reference.text
# Manual from core # Manual from core
mancore: $(MANSRC) mancore: $(MANSRC)
for mansrc in $^; do $(A2X) $$mansrc; done for mansrc in $^; do $(A2XM) $$mansrc; $(A2XH) $$mansrc; done
# Manuals from types # Manuals from types
mantype: mantype:
for man in conf/type/*/man.text; do $(A2X) $$man; done for man in conf/type/*/man.text; do $(A2XM) $$man; $(A2XH) $$man; done
# Move into manpath directories # Move into manpath directories
manmove: mantype mancore manmove: mantype mancore
@ -74,16 +78,21 @@ manmove: mantype mancore
mkdir -p $$mandir; \ mkdir -p $$mandir; \
mv $$manpage $$mandir; \ mv $$manpage $$mandir; \
done done
mkdir -p doc/html
mv doc/man/*.html doc/html
mv conf/type/*/man
# Reference depends on conf/type/*/man.text - HOWTO with posix make? # Reference depends on conf/type/*/man.text - HOWTO with posix make?
$(MANDIR)/cdist-reference.text: manmove $(MANDIR)/cdist-reference.text.sh $(MANDIR)/cdist-reference.text: manmove $(MANDIR)/cdist-reference.text.sh
$(MANDIR)/cdist-reference.text.sh $(MANDIR)/cdist-reference.text.sh
$(A2X) $(MANDIR)/cdist-reference.text $(A2XM) $(MANDIR)/cdist-reference.text
$(A2XH) $(MANDIR)/cdist-reference.text
# Move us to the destination as well # Move us to the destination as well
make manmove make manmove
clean: clean:
rm -rf doc/man/*.html doc/man/*.[1-9] doc/man/man[1-9] $(MANGENERATED) rm -rf doc/man/*.html doc/man/*.[1-9] doc/man/man[1-9] $(MANGENERATED)
rm -f conf/type/*/man.html conf/type/*/docbook-xsl.css
################################################################################ ################################################################################
# Developer targets # Developer targets