blob: 109aaa9e9764b84f4ae47b73434cc3783c81322f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
# Makefile.am --- automake input file for systemtap tapset reference manual
## process this file with automake to produce Makefile.in
DOC_INSTALL_DIR = $(DESTDIR)$(datadir)/doc/systemtap
MAN_INSTALL_DIR = $(DESTDIR)$(mandir)/man3
HTML_INSTALL_DIR = $(DESTDIR)$(datadir)/doc/systemtap/tapsets
###
# The build process is as follows (targets):
# (xmldocs) [by docproc]
# file.tmpl --> file.xml +--> file.ps (psdocs) [by xmlto]
# +--> file.pdf (pdfdocs) [by xmlto]
# +--> DIR=file (htmldocs) [by xmlto]
# +--> man/ (mandocs) [by xmlto]
noinst_PROGRAMS = docproc
SRCTREE=$(abs_top_srcdir)/
DOCPROC=$(abs_builddir)/docproc
if BUILD_PDFREFDOCS
PDFDOCS = tapsets.pdf
endif
if XMLTO_STRINGPARAM
XMLTOMANPARAMS=--stringparam man.authors.section.enabled=0 --stringparam man.copyright.section.enabled=0
endif
if BUILD_REFDOCS
all: $(PDFDOCS) stamp-htmldocs stamp-mandocs
tapsets.xml: docproc $(shell find $(SRCTREE)/tapset -name '*.stp')
SRCTREE=$(SRCTREE) $(DOCPROC) doc $(abs_srcdir)/tapsets.tmpl > tapsets.xml.new
if test -s tapsets.xml && cmp tapsets.xml.new tapsets.xml >/dev/null ; then \
echo tapsets.xml unchanged; \
rm tapsets.xml.new; \
else \
mv tapsets.xml.new tapsets.xml; \
fi
stamp-htmldocs: tapsets.xml
xmlto $(XMLTOHTMLPARAMS) html -o tapsets tapsets.xml >/dev/null 2>&1
touch stamp-htmldocs
# bump up the allocated space so "xmlto pdf" works
tapsets.pdf: tapsets.xml
env pool_size=2000000 hash_extra=2000000 xmlto $(XMLTOPDFPARAMS) pdf tapsets.xml >/dev/null 2>&1
stamp-mandocs: tapsets.xml
xmlto $(XMLTOMANPARAMS) man -o man3 tapsets.xml >/dev/null 2>&1
touch stamp-mandocs
#FIXME need to figure out where to install things appropriately
#installmandocs: mandocs
install-data-hook:
if BUILD_PDFREFDOCS
$(MKDIR_P) $(DOC_INSTALL_DIR)
$(INSTALL_DATA) tapsets.pdf $(DOC_INSTALL_DIR)
endif
$(MKDIR_P) $(MAN_INSTALL_DIR)
$(INSTALL_DATA) man3/* $(MAN_INSTALL_DIR)
$(MKDIR_P) $(HTML_INSTALL_DIR)
$(INSTALL_DATA) tapsets/* $(HTML_INSTALL_DIR)
endif
CLEANFILES=tapsets.xml stamp-* $(PDFDOCS)
clean-local:
rm -rf man3 tapsets
|