diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2013-10-26 19:31:49 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2013-10-26 19:31:49 +0200 |
commit | 91052dfc0d9e23b2baf499f6c5aab21b1544a236 (patch) | |
tree | 7906e76ef0cde2f27c0b3a6003ee751529df7f91 /docs/Makefile | |
parent | 0a48ad9f4a9382627f270065c6f756351474b7a8 (diff) | |
download | app.sh-91052dfc0d9e23b2baf499f6c5aab21b1544a236.tar.gz app.sh-91052dfc0d9e23b2baf499f6c5aab21b1544a236.tar.bz2 app.sh-91052dfc0d9e23b2baf499f6c5aab21b1544a236.tar.xz app.sh-91052dfc0d9e23b2baf499f6c5aab21b1544a236.zip |
o Adding a man page on internals.
Diffstat (limited to 'docs/Makefile')
-rw-r--r-- | docs/Makefile | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/docs/Makefile b/docs/Makefile index 2a62f18..f340323 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1,6 +1,8 @@ TXT=$(wildcard *.txt) +# Expand target section from heading of each page +MAN=$(shell ls *.txt|xargs -n 1 head -n 1|sed "s,\(.*\)(\([0-9]\)),\1.\2,") HTML=$(patsubst %.txt,%.html,$(TXT)) -MAN=$(patsubst %.txt,%.1,$(TXT)) + all: $(HTML) $(MAN) %.html: %.txt @@ -8,8 +10,15 @@ all: $(HTML) $(MAN) @asciidoc -f asciidoc.conf --backend=html5 $< %.1: %.txt - @echo a2x $< - @a2x --format manpage $< + $(call man,$<) + +%.7: %.txt + $(call man,$<) + +define man + @echo a2x $(1) + @a2x --format manpage $(1) +endef clean: - rm -rf $(wildcard *.html) $(wildcard *.1) + rm -rf $(wildcard *.html) $(wildcard *.1) $(wildcard *.7) |