diff --git a/doc/Makefile b/doc/Makefile index d5a3c95a4..f4f74d488 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -19,6 +19,8 @@ MANUAL_URL="https://wiki.debian.org/FreedomBox/Manual?action=show&mimetype=text% OUTPUTS=freedombox-manual.pdf plinth.1 manual-pages +SCRIPTS_DIR=scripts + # In order to debug various problems with the documents especially # intermediate LaTeX state, run make as follows: # @@ -50,9 +52,9 @@ all: $(OUTPUTS) fetch: wget --quiet -O - $(MANUAL_URL) | \ xmllint --format --output freedombox-manual.raw.xml - - xsltproc fetch-images.xslt freedombox-manual.raw.xml | sort -u | \ - awk 'NF {print "wget --quiet -O images/" $$1 " " $$2}' | sh - ./fetch-manual-pages + xsltproc $(SCRIPTS_DIR)/fetch-images.xslt freedombox-manual.raw.xml | \ + sort -u | awk 'NF {print "wget --quiet -O images/" $$1 " " $$2}' | sh + $(SCRIPTS_DIR)/fetch-manual-pages .PHONY: manual-pages manual-pages-list:=$(shell cat manual-pages.list) freedombox-manual @@ -68,13 +70,13 @@ manual-pages: $(manual-pages-part-html) %.part.html: %.html perl -pe 'BEGIN {undef $$/} s/.*]*>(.*)<\/body\s*>.*/$$1/si' $< > $@ -freedombox-manual.xml: freedombox-manual.raw.xml fixes.xslt - xsltproc --output $@ fixes.xslt $< +freedombox-manual.xml: freedombox-manual.raw.xml $(SCRIPTS_DIR)/fixes.xslt + xsltproc --output $@ $(SCRIPTS_DIR)/fixes.xslt $< -%.xml: %.raw.xml manual-page-fixes.xslt - xsltproc --output $@ manual-page-fixes.xslt $< - ./post-processor remove-footer $@ - ./post-processor fix-wiki-urls $@ +%.xml: %.raw.xml $(SCRIPTS_DIR)/manual-page-fixes.xslt + xsltproc --output $@ $(SCRIPTS_DIR)/manual-page-fixes.xslt $< + $(SCRIPTS_DIR)/post-processor remove-footer $@ + $(SCRIPTS_DIR)/post-processor fix-wiki-urls $@ %.html: %.xml xsltproc --output $@ /usr/share/xml/docbook/stylesheet/docbook-xsl/xhtml5/docbook.xsl $< diff --git a/doc/fetch-images.xslt b/doc/scripts/fetch-images.xslt similarity index 100% rename from doc/fetch-images.xslt rename to doc/scripts/fetch-images.xslt diff --git a/doc/fetch-manual-pages b/doc/scripts/fetch-manual-pages similarity index 100% rename from doc/fetch-manual-pages rename to doc/scripts/fetch-manual-pages diff --git a/doc/fixes.xslt b/doc/scripts/fixes.xslt similarity index 100% rename from doc/fixes.xslt rename to doc/scripts/fixes.xslt diff --git a/doc/manual-page-fixes.xslt b/doc/scripts/manual-page-fixes.xslt similarity index 100% rename from doc/manual-page-fixes.xslt rename to doc/scripts/manual-page-fixes.xslt diff --git a/doc/post-processor b/doc/scripts/post-processor similarity index 100% rename from doc/post-processor rename to doc/scripts/post-processor