forked from ungleich-public/cdist
manpage generation cleaup
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
3dc37c17a3
commit
0370412757
2 changed files with 25 additions and 19 deletions
37
Makefile
37
Makefile
|
@ -16,6 +16,7 @@ WEBPAGE=$(WEBBASE).mdwn
|
||||||
|
|
||||||
# Documentation
|
# Documentation
|
||||||
MANDIR=doc/man
|
MANDIR=doc/man
|
||||||
|
HTMLDIR=$(MANDIR)/html
|
||||||
|
|
||||||
MAN1SRC= \
|
MAN1SRC= \
|
||||||
$(MANDIR)/cdist-code-run.text \
|
$(MANDIR)/cdist-code-run.text \
|
||||||
|
@ -46,9 +47,11 @@ MAN7SRC=$(MANDIR)/cdist.text \
|
||||||
$(MANDIR)/cdist-reference.text \
|
$(MANDIR)/cdist-reference.text \
|
||||||
$(MANDIR)/cdist-stages.text \
|
$(MANDIR)/cdist-stages.text \
|
||||||
$(MANDIR)/cdist-type.text \
|
$(MANDIR)/cdist-type.text \
|
||||||
|
$(shell ls conf/type/*/man.text)
|
||||||
|
|
||||||
MAN1DST=$(MAN1SRC:.text=.1)
|
MAN1DST=$(MAN1SRC:.text=.1)
|
||||||
MAN7DST=$(MAN1SRC:.text=.7)
|
MAN7DST=$(MAN7SRC:.text=.7)
|
||||||
|
MANHTML=$(MAN1SRC:.text=.html) $(MAN7SRC:.text=.html)
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# User targets
|
# User targets
|
||||||
|
@ -65,31 +68,31 @@ all:
|
||||||
@echo ''
|
@echo ''
|
||||||
@echo ''
|
@echo ''
|
||||||
|
|
||||||
man: doc/man/.marker
|
|
||||||
|
|
||||||
# FIXME: also depends on conf/type/*/man.text!
|
%.1 %.7: %.text
|
||||||
doc/man/.marker: manmove
|
$(A2XM) $*.text
|
||||||
touch $@
|
|
||||||
|
|
||||||
# Manual from core
|
%.html: %.text
|
||||||
mancore: $(MANSRC)
|
$(A2XH) $*.text
|
||||||
for mansrc in $^; do $(A2XM) $$mansrc; $(A2XH) $$mansrc; done
|
|
||||||
|
|
||||||
# Manuals from types
|
man: $(MAN1DST) $(MAN7DST)
|
||||||
mantype:
|
|
||||||
for man in conf/type/*/man.text; do $(A2XM) $$man; $(A2XH) $$man; done
|
html: $(MANHTML)
|
||||||
|
|
||||||
|
# man: doc/man/.marker
|
||||||
|
|
||||||
# Move into manpath directories
|
# Move into manpath directories
|
||||||
manmove: mantype mancore $(MANGENERATED)
|
manmove: $(MAN1DST) $(MAN7DST) $(MANHTML)
|
||||||
for manpage in $(MANDIR)/*.[1-9] conf/type/*/*.7; do \
|
for manpage in $(MANDIR)/*.[1-9] conf/type/*/*.7; do \
|
||||||
cat=$${manpage##*.}; \
|
cat=$${manpage##*.}; \
|
||||||
mandir=$(MANDIR)/man$$cat; \
|
mandir=$(MANDIR)/man$$cat; \
|
||||||
mkdir -p $$mandir; \
|
mkdir -p $$mandir; \
|
||||||
mv $$manpage $$mandir; \
|
mv $$manpage $$mandir; \
|
||||||
done
|
done
|
||||||
mkdir -p doc/html
|
|
||||||
mv doc/man/*.html doc/html
|
|
||||||
|
|
||||||
|
# HTML
|
||||||
|
mkdir -p $(HTMLDIR)
|
||||||
|
mv doc/man/*.html $(HTMLDIR)
|
||||||
for mantype in conf/type/*/man.html; do \
|
for mantype in conf/type/*/man.html; do \
|
||||||
mannew=$$(echo $$mantype | sed -e 's;conf/;cdist-;' -e 's;/;;' -e 's;/man;;');\
|
mannew=$$(echo $$mantype | sed -e 's;conf/;cdist-;' -e 's;/;;' -e 's;/man;;');\
|
||||||
mv $$mantype doc/html/$$mannew; \
|
mv $$mantype doc/html/$$mannew; \
|
||||||
|
@ -102,9 +105,9 @@ $(MANDIR)/cdist-reference.text: $(MANDIR)/cdist-reference.text.sh
|
||||||
$(A2XH) $(MANDIR)/cdist-reference.text
|
$(A2XH) $(MANDIR)/cdist-reference.text
|
||||||
|
|
||||||
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]
|
||||||
rm -f conf/type/*/man.html
|
rm -f conf/type/*/man.html $(MANDIR)/cdist-reference.text
|
||||||
rm -rf doc/html
|
rm -rf $(HTMLDIR)
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Developer targets
|
# Developer targets
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
1.4.1:
|
||||||
|
* Manpage generation cleanup
|
||||||
|
|
||||||
1.4.0: 2011-03-24
|
1.4.0: 2011-03-24
|
||||||
* Add --recursive to __directory
|
* Add --recursive to __directory
|
||||||
* Move cdist generated stuff to .cdist of an object
|
* Move cdist generated stuff to .cdist of an object
|
||||||
|
|
Loading…
Reference in a new issue