diff options
-rw-r--r-- | Documentation/.gitignore | 1 | ||||
-rw-r--r-- | Documentation/Makefile | 29 | ||||
-rw-r--r-- | Makefile | 6 |
3 files changed, 36 insertions, 0 deletions
diff --git a/Documentation/.gitignore b/Documentation/.gitignore new file mode 100644 index 0000000..f7e585b --- /dev/null +++ b/Documentation/.gitignore | |||
@@ -0,0 +1 @@ | |||
*.1 | |||
diff --git a/Documentation/Makefile b/Documentation/Makefile new file mode 100644 index 0000000..87c38ae --- /dev/null +++ b/Documentation/Makefile | |||
@@ -0,0 +1,29 @@ | |||
1 | |||
2 | # | ||
3 | # Most likely a docbook.xsl is already installed on the users system | ||
4 | # instead of creating a new wheel, lets reuse what's already there. | ||
5 | # | ||
6 | MANPAGE_DOCBOOK_XSL = $(shell locate manpages/docbook.xsl | head -1) | ||
7 | |||
8 | %.xml: %.txt | ||
9 | asciidoc -d manpage -b docbook $< | ||
10 | |||
11 | %.1: %.xml manpage.xsl | ||
12 | xsltproc --nonet ${MANPAGE_DOCBOOK_XSL} $< > $@ | ||
13 | |||
14 | TEXT = $(wildcard *.txt) | ||
15 | XML = $(patsubst %.txt,%.xsl, ${TEXT}) | ||
16 | MAN = $(patsubst %.txt,%.1, ${TEXT}) | ||
17 | |||
18 | all: ${MAN} | ||
19 | |||
20 | manpage.xsl: | ||
21 | @if [ ! -f ${MANPAGE_DOCBOOK_XSL} ]; then \ | ||
22 | echo "*********************************"; \ | ||
23 | echo "** No docbook.xsl is installed **"; \ | ||
24 | echo "** Can't make man pages **"; \ | ||
25 | echo "*********************************"; \ | ||
26 | fi | ||
27 | |||
28 | clean: | ||
29 | $(RM) *.xml *.1 | ||
@@ -302,6 +302,12 @@ force: | |||
302 | TAGS: force | 302 | TAGS: force |
303 | find . -name '*.[ch]' | xargs etags | 303 | find . -name '*.[ch]' | xargs etags |
304 | 304 | ||
305 | doc: | ||
306 | $(MAKE) -C Documentation all | ||
307 | |||
308 | doc_clean: | ||
309 | $(MAKE) -C Documentation clean | ||
310 | |||
305 | clean: | 311 | clean: |
306 | $(RM) *.o *~ $(TARGETS) *.a *.so ctracecmd_wrap.c .*.d | 312 | $(RM) *.o *~ $(TARGETS) *.a *.so ctracecmd_wrap.c .*.d |
307 | 313 | ||