doc: add manpage infrastructure
This commit is contained in:
parent
8652c5a724
commit
aeab95dbab
11
Makefile
11
Makefile
@ -9,7 +9,8 @@ BINPROGS = \
|
||||
|
||||
BASH = bash
|
||||
|
||||
all: $(BINPROGS)
|
||||
all: $(BINPROGS) man
|
||||
man: $(MANS)
|
||||
|
||||
V_GEN = $(_v_GEN_$(V))
|
||||
_v_GEN_ = $(_v_GEN_0)
|
||||
@ -20,8 +21,11 @@ edit = $(V_GEN) m4 -P $@.in >$@ && chmod go-w,+x $@
|
||||
%: %.in common
|
||||
$(edit)
|
||||
|
||||
doc/%: doc/%.asciidoc doc/asciidoc.conf doc/footer.asciidoc
|
||||
$(V_GEN) a2x --no-xmllint --asciidoc-opts="-f doc/asciidoc.conf" -d manpage -f manpage -D doc $<
|
||||
|
||||
clean:
|
||||
$(RM) $(BINPROGS)
|
||||
$(RM) $(BINPROGS) $(MANS)
|
||||
|
||||
check: all
|
||||
@for f in $(BINPROGS); do bash -O extglob -n $$f; done
|
||||
@ -31,5 +35,8 @@ install: all
|
||||
install -dm755 $(DESTDIR)$(PREFIX)/bin
|
||||
install -m755 $(BINPROGS) $(DESTDIR)$(PREFIX)/bin
|
||||
install -Dm644 zsh-completion $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_archinstallscripts
|
||||
for manfile in $(MANS); do \
|
||||
install -Dm644 $$manfile -t $(DESTDIR)$(PREFIX)/share/man/man$${manfile##*.}; \
|
||||
done;
|
||||
|
||||
.PHONY: all clean install uninstall
|
||||
|
37
doc/asciidoc.conf
Normal file
37
doc/asciidoc.conf
Normal file
@ -0,0 +1,37 @@
|
||||
## linkman: macro
|
||||
# Inspired by/borrowed from the GIT source tree at Documentation/asciidoc.conf
|
||||
#
|
||||
# Usage: linkman:command[manpage-section]
|
||||
#
|
||||
# Note, {0} is the manpage section, while {target} is the command.
|
||||
#
|
||||
# Show man link as: <command>(<section>); if section is defined, else just show
|
||||
# the command.
|
||||
|
||||
[macros]
|
||||
(?su)[\\]?(?P<name>linkman):(?P<target>\S*?)\[(?P<attrlist>.*?)\]=
|
||||
|
||||
[attributes]
|
||||
asterisk=*
|
||||
plus=+
|
||||
caret=^
|
||||
startsb=[
|
||||
endsb=]
|
||||
backslash=\
|
||||
tilde=~
|
||||
apostrophe='
|
||||
backtick=`
|
||||
litdd=--
|
||||
|
||||
ifdef::backend-docbook[]
|
||||
[linkman-inlinemacro]
|
||||
{0%{target}}
|
||||
{0#<citerefentry>}
|
||||
{0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
|
||||
{0#</citerefentry>}
|
||||
endif::backend-docbook[]
|
||||
|
||||
ifdef::backend-xhtml11[]
|
||||
[linkman-inlinemacro]
|
||||
<a href="{target}.{0}.html">{target}{0?({0})}</a>
|
||||
endif::backend-xhtml11[]
|
18
doc/footer.asciidoc
Normal file
18
doc/footer.asciidoc
Normal file
@ -0,0 +1,18 @@
|
||||
|
||||
Bugs
|
||||
----
|
||||
Bugs can be reported on the bug tracker 'https://bugs.archlinux.org' in the Arch
|
||||
Linux category and title prefixed with [arch-install-scripts] or via
|
||||
mailto:arch-projects@archlinux.org[].
|
||||
|
||||
|
||||
Authors
|
||||
-------
|
||||
|
||||
Maintainers:
|
||||
|
||||
* Dave Reisner <dreisner@archlinux.org>
|
||||
* Eli Schwartz <eschwartz@archlinux.org>
|
||||
|
||||
For additional contributors, use `git shortlog -s` on the arch-install-scripts.git
|
||||
repository.
|
Loading…
Reference in New Issue
Block a user