aboutsummaryrefslogtreecommitdiffstats
path: root/build/Makefile.inc
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-02-20 10:56:10 +0100
committerHarald Welte <laforge@gnumonks.org>2016-02-20 15:01:50 +0100
commit37ba7a9825c893563c98481681209de3ad6c9ec7 (patch)
tree6bfc9bcfcad07f22dda6402190b4df750214c859 /build/Makefile.inc
initial checkin of manuals to public repo
The manuals existed in different form for several years in an internal sysmocom repository. However, since they had just recently been converted from docboox-xml to asciidoc and all files have been re-shuffled for enabling the public release, there's not much point in keeping the history with git-filter-branch.
Diffstat (limited to 'build/Makefile.inc')
-rw-r--r--build/Makefile.inc47
1 files changed, 47 insertions, 0 deletions
diff --git a/build/Makefile.inc b/build/Makefile.inc
new file mode 100644
index 0000000..1c55304
--- /dev/null
+++ b/build/Makefile.inc
@@ -0,0 +1,47 @@
+# XSL stylesheets downloaded from http://docbook.sourceforge.net/release/xsl/current/html/
+# Makefile from BitBake/OpenEmbedded manuals
+
+LIBOSMO_DIR := ~/source/gsm/libosmocore
+MERGE_DOC := $(LIBOSMO_DIR)/doc/vty/merge_doc.xsl
+UPLOAD_PATH := generic@sysmocom-downloads:documents
+
+pdfs = $(patsubst %.xml,%.pdf,$(manuals))
+lint = $(patsubst %.xml,%.xml-lint,$(manuals))
+
+#cleanfiles = $(foreach i,$(types),$(topdir)/$(i))
+cleanfiles += $(pdfs) $(lint)
+
+ifdef DEBUG
+dblatex_quiet =
+define command
+ $(1)
+endef
+else
+dblatex_quiet = -q
+define command
+ @echo $(2) $(3)
+ @$(1)
+endef
+endif
+
+all: $(types)
+
+
+$(types): FORCE
+
+
+pdf: $(pdfs) $(manuals)
+
+
+# Lint the file
+%.xml-lint: %.xml FORCE
+ $(call command,xmllint --xinclude --postvalid --noout $<,XMLLINT,$<)
+
+# Create a PDF file and lint it before
+%.pdf: %.xml %.xml-lint $(EXTRA_DEPS) FORCE
+ $(call command,dblatex $(dblatex_quiet) -P draft.mode=no $<,DBLATEX,$<)
+
+upload: $(pdfs)
+ rsync -avz $(pdfs) $(UPLOAD_PATH)/
+
+FORCE: