aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/.gitignore1
-rw-r--r--Documentation/Makefile29
-rw-r--r--Makefile6
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#
6MANPAGE_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
14TEXT = $(wildcard *.txt)
15XML = $(patsubst %.txt,%.xsl, ${TEXT})
16MAN = $(patsubst %.txt,%.1, ${TEXT})
17
18all: ${MAN}
19
20manpage.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
28clean:
29 $(RM) *.xml *.1
diff --git a/Makefile b/Makefile
index 481b1a7..721cdec 100644
--- a/Makefile
+++ b/Makefile
@@ -302,6 +302,12 @@ force:
302TAGS: force 302TAGS: force
303 find . -name '*.[ch]' | xargs etags 303 find . -name '*.[ch]' | xargs etags
304 304
305doc:
306 $(MAKE) -C Documentation all
307
308doc_clean:
309 $(MAKE) -C Documentation clean
310
305clean: 311clean:
306 $(RM) *.o *~ $(TARGETS) *.a *.so ctracecmd_wrap.c .*.d 312 $(RM) *.o *~ $(TARGETS) *.a *.so ctracecmd_wrap.c .*.d
307 313