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
|
# Makefile.am --- automake input file for systemtap beginner's guide
## process this file with automake to produce Makefile.in
DOC_INSTALL_DIR = $(DESTDIR)$(datadir)/doc/systemtap
SBG = SystemTap_Beginners_Guide
BEGIN_INSTALL_DIR = $(DOC_INSTALL_DIR)/$(SBG)
# INSTALL_PREBUILT_DOCS is automatically enabled by BUILD_DOCS
if INSTALL_PREBUILT_DOCS
all: $(SBG)/index.html
# The beginner documents are now pre generated in the source tree
# move all the relevant files into the build directory
$(SBG).pdf:
mkdir -p build/en-US/xml
cp en-US/*.xml build/en-US/xml/
cp en-US/*.ent build/en-US/xml/
cp -R en-US/xsl build/en-US/
cp -R en-US/extras build/en-US/xml/
cp -R en-US/images build/en-US/xml/
cp -R en-US/Common_Content build/en-US/xml
cp en-US/$(SBG).pdf $(builddir)/
# rely on the pdf generation to move all the necessary files into the right dirs
$(SBG)/index.html: $(SBG).pdf
if BUILD_DOCS
if BUILD_HTMLDOCS
xmlto --skip-validation \
-x build/en-US/xsl/html.xsl -o $(SBG) html build/en-US/xml/$(SBG).xml
cp -R build/en-US/xml/images $(SBG)
mkdir -p $(SBG)/Common_Content
cp -R build/en-US/xml/Common_Content/images $(SBG)/Common_Content
cp -R build/en-US/xml/Common_Content/css $(SBG)/Common_Content
endif
endif
clean-local:
rm -rf build/en-US/xml
rm -rf build/en-US/xsl
rm -f $(SBG).pdf
rm -rf $(SBG)
install-data-hook:
$(MKDIR_P) $(DOC_INSTALL_DIR)
$(INSTALL_DATA) $(SBG).pdf $(DOC_INSTALL_DIR)
if BUILD_HTMLDOCS
$(MKDIR_P) $(DOC_INSTALL_DIR)/$(SBG)
$(INSTALL_DATA) $(SBG)/*.html $(DOC_INSTALL_DIR)/$(SBG)
$(MKDIR_P) $(DOC_INSTALL_DIR)/$(SBG)/images
$(INSTALL_DATA) $(SBG)/images/*.png $(SBG)/images/*.svg \
$(DOC_INSTALL_DIR)/$(SBG)/images
$(MKDIR_P) $(DOC_INSTALL_DIR)/$(SBG)/Common_Content/css
$(MKDIR_P) $(DOC_INSTALL_DIR)/$(SBG)/Common_Content/images
$(INSTALL_DATA) $(SBG)/Common_Content/css/*.css \
$(DOC_INSTALL_DIR)/$(SBG)/Common_Content/css
$(INSTALL_DATA) $(SBG)/Common_Content/images/*.png \
$(SBG)/Common_Content/images/*.svg \
$(DOC_INSTALL_DIR)/$(SBG)/Common_Content/images
$(MKDIR_P) $(DOC_INSTALL_DIR)/$(SBG)/xsl
$(INSTALL_DATA) en-US/xsl/*.xsl \
$(DOC_INSTALL_DIR)/$(SBG)/xsl
endif
uninstall-local:
rm -f $(DOC_INSTALL_DIR)/$(SBG).pdf
rm -rf $(DOC_INSTALL_DIR)/$(SBG)
endif
|