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 68 69 70 71
|
# 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
if XMLTO_STRINGPARAM
XMLTOHTMLPARAMS=--stringparam use.id.as.filename=1 -m $(abs_srcdir)/generate-toc.xml
endif
if BUILD_REFDOCS
# The tapset documents are now pre generated in the source tree
if BUILD_HTMLDOCS
noinst_PROGRAMS = docproc
SRCTREE=$(abs_top_srcdir)/
DOCPROC=$(abs_builddir)/docproc
endif
all: stamp-htmldocs
tapsets.xml: docproc $(shell find $(SRCTREE)/tapset -name '*.stp')
if BUILD_HTMLDOCS
sed -e '/^!Syscalls/{r $(abs_srcdir)/syscalls.xmlpart' -e 'd}' $(abs_srcdir)/tapsets.tmpl > tapsets.tmpl.new
SRCTREE=$(SRCTREE) $(DOCPROC) doc tapsets.tmpl.new > tapsets.xml.new
$(preferred_python) $(srcdir)/overload.py tapsets.xml.new > tapsets.xml.new1
xsltproc $(srcdir)/sort-tapsets.xslt tapsets.xml.new1 > tapsets.xml.new2
rm tapsets.xml.new tapsets.xml.new1 tapsets.tmpl.new
if test -s tapsets.xml && cmp tapsets.xml.new2 tapsets.xml >/dev/null ; then \
echo tapsets.xml unchanged; \
rm tapsets.xml.new2; \
else \
mv tapsets.xml.new2 tapsets.xml; \
fi
endif
stamp-htmldocs: tapsets.xml
if BUILD_HTMLDOCS
xmlto $(XMLTOHTMLPARAMS) html -o tapsets tapsets.xml
touch stamp-htmldocs
endif
#FIXME need to figure out where to install things appropriately
#installmandocs: mandocs
install-data-hook:
$(MKDIR_P) $(DOC_INSTALL_DIR)
cp $(abs_srcdir)/tapsets.pdf $(DOC_INSTALL_DIR)
$(MKDIR_P) $(MAN_INSTALL_DIR)
cp -R $(abs_srcdir)/man3/* $(MAN_INSTALL_DIR)
cp -R $(abs_srcdir)/man_pages/* $(MAN_INSTALL_DIR) # manpager output
if BUILD_HTMLDOCS
$(MKDIR_P) $(HTML_INSTALL_DIR)
$(INSTALL_DATA) tapsets/* $(HTML_INSTALL_DIR)
endif
endif
# Still install prebuilt docs if --enable-docs=prebuilt
if !BUILD_REFDOCS
if INSTALL_PREBUILT_DOCS
install-data-hook:
$(MKDIR_P) $(DOC_INSTALL_DIR)
cp $(abs_srcdir)/tapsets.pdf $(DOC_INSTALL_DIR)
$(MKDIR_P) $(MAN_INSTALL_DIR)
cp -R $(abs_srcdir)/man3/* $(MAN_INSTALL_DIR)
cp -R $(abs_srcdir)/man_pages/* $(MAN_INSTALL_DIR) # manpager output
endif
endif
CLEANFILES=stamp-* tapsets.xml
clean-local:
rm -rf tapsets
|