forked from ungleich-public/cdist
begin the manpage integration with man.text
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
d88f4afc87
commit
1c45e4fe17
4 changed files with 36 additions and 14 deletions
33
Makefile
33
Makefile
|
@ -27,7 +27,6 @@ MANSRC=$(MANDIR)/cdist.text \
|
||||||
$(MANDIR)/cdist-stages.text \
|
$(MANDIR)/cdist-stages.text \
|
||||||
$(MANDIR)/cdist-type.text \
|
$(MANDIR)/cdist-type.text \
|
||||||
$(MANDIR)/cdist-type-template.text \
|
$(MANDIR)/cdist-type-template.text \
|
||||||
$(MANDIR)/cdist-type__file.text \
|
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
@ -47,16 +46,34 @@ all:
|
||||||
|
|
||||||
man: doc/man/.marker
|
man: doc/man/.marker
|
||||||
|
|
||||||
doc/man/.marker: $(MANSRC) $(MANGENERATED)
|
doc/man/.marker:
|
||||||
for mansrc in $^; do $(A2X) $$mansrc; done
|
|
||||||
for manpage in $(MANDIR)/*.[1-9]; do cat=$${manpage##*.}; mandir=$(MANDIR)/man$$cat; mkdir -p $$mandir; mv $$manpage $$mandir; done
|
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
# Only depends on cdist-type__*.text in reality
|
# Manual from core
|
||||||
$(MANDIR)/cdist-reference.text: $(MANSRC) $(MANDIR)/cdist-reference.text.sh
|
mancore: $(MANSRC)
|
||||||
$(MANDIR)/cdist-reference.text.sh
|
for mansrc in $^; do $(A2X) $$mansrc; done
|
||||||
|
|
||||||
|
|
||||||
|
# Manuals from types
|
||||||
|
mantype:
|
||||||
|
for man in conf/type/*/man.text; do $(A2X) $$man; done
|
||||||
|
|
||||||
|
# Move into manpath directories
|
||||||
|
manmove: mantype mancore
|
||||||
|
for manpage in $(MANDIR)/*.[1-9] conf/type/*/*.7; do \
|
||||||
|
cat=$${manpage##*.}; \
|
||||||
|
echo $$cat; \
|
||||||
|
mandir=$(MANDIR)/man$$cat; \
|
||||||
|
mkdir -p $$mandir; \
|
||||||
|
mv $$manpage $$mandir; \
|
||||||
|
done
|
||||||
|
|
||||||
|
# Reference
|
||||||
|
$(MANDIR)/cdist-reference.text: manmove $(MANDIR)/cdist-reference.text.sh
|
||||||
|
$(MANDIR)/cdist-reference.text.sh
|
||||||
|
$(A2X) $(MANDIR)/cdist-reference.text
|
||||||
|
# Move us to the destination as well
|
||||||
|
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)
|
||||||
|
|
||||||
|
|
|
@ -83,6 +83,9 @@ conf/type/<name>/::
|
||||||
|
|
||||||
This directory is referenced by the variable __type (see below).
|
This directory is referenced by the variable __type (see below).
|
||||||
|
|
||||||
|
conf/type/<name>/man.text::
|
||||||
|
Manpage in Asciidoc format (nequired for inclusion into upstream)
|
||||||
|
|
||||||
conf/type/<name>/manifest::
|
conf/type/<name>/manifest::
|
||||||
Used to generate additional objects from a type.
|
Used to generate additional objects from a type.
|
||||||
|
|
||||||
|
@ -132,9 +135,9 @@ TYPES
|
||||||
The following types are available:
|
The following types are available:
|
||||||
|
|
||||||
eof
|
eof
|
||||||
for type in cdist-type__*.text; do
|
for type in man7/cdist-type__*; do
|
||||||
name_1="${type#cdist-type}"
|
name_1="${type#man7/cdist-type}"
|
||||||
name_2="${name_1%.text}"
|
name_2="${name_1%.7}"
|
||||||
|
|
||||||
name="$name_2"
|
name="$name_2"
|
||||||
echo "- $name"
|
echo "- $name"
|
||||||
|
@ -175,8 +178,9 @@ SEE ALSO
|
||||||
--------
|
--------
|
||||||
- cdist(7)
|
- cdist(7)
|
||||||
eof
|
eof
|
||||||
for type in cdist-type__*.text; do
|
for type in man7/cdist-type__*; do
|
||||||
name_2="${type%.text}"
|
name_1="${type#man7/}"
|
||||||
|
name_2="${name_1%.7}"
|
||||||
|
|
||||||
name="$name_2"
|
name="$name_2"
|
||||||
echo "- ${name}(7)"
|
echo "- ${name}(7)"
|
||||||
|
|
|
@ -153,7 +153,8 @@ If you think your type may be useful for others, ensure it works with the
|
||||||
current master branch of cdist and submit the git url containing the type for
|
current master branch of cdist and submit the git url containing the type for
|
||||||
inclusion to the mailinglist **cdist at cdist -- at -- l.schottelius.org**.
|
inclusion to the mailinglist **cdist at cdist -- at -- l.schottelius.org**.
|
||||||
|
|
||||||
Ensure a corresponding manpage named cdist-type__NAME is included.
|
Ensure a corresponding manpage named man.text in asciidoc format with
|
||||||
|
the manpage-name "cdist-type__NAME" is included in the type directory.
|
||||||
|
|
||||||
|
|
||||||
SEE ALSO
|
SEE ALSO
|
||||||
|
|
Loading…
Reference in a new issue