summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2017-10-19 05:11:57 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2018-11-28 17:00:07 +0100
commitd70979c8ec52439991f3ae731a55ea69923374a5 (patch)
tree61a20e7647dcb6d1393bc6a7a737606917261785
parent3fe180e237ff5e9d299b9d7dcb7907469078e9a4 (diff)
refactor Makefile build rules, don't use the FORCE
The initial goal was to make sure we don't have overall FORCE rules causing unnecessary rebuilds -- annoying while writing documentation. As I looked through possible dependencies, I finally understood what's going on here. Remove code dup and nicely sort which belongs where in build/Makefile.*.inc. In each, describe in a top comment how to use it, and also unify how they are used: - Rename Makefile.inc to Makefile.docbook.inc and refactor - Add Makefile.vty-reference.inc - Add Makefile.common.inc Make sure that we accurately pick up all dependencies. Drop use of the macro called 'command', that silenced the actual command lines invoked and replaced them with short strings: it obscures what is actually going on and makes the Makefiles hard to read and understand. Each manual's makefile is greatly reduced to few definitions and a Makefile include, e.g. one for asciidoc, one for VTY reference. Move common/bsc_vty_additions.xml to OsmoBSC/vty/libbsc_vty_additions.xml, link from OsmoNITB. It applies only to OsmoBSC and OsmoNITB. Add a script that combines a VTY reference file with *all* additions files found in a manual's vty/ dir. Call this from Makefile.vty-reference.inc. Change-Id: I9758e04162a480e28c7dc83475b514cf7fd25ec0
-rw-r--r--doc/manuals/Makefile46
l---------doc/manuals/vty/bsc_vty_additions.xml1
2 files changed, 7 insertions, 40 deletions
diff --git a/doc/manuals/Makefile b/doc/manuals/Makefile
index 99cd31766..0cd260d0e 100644
--- a/doc/manuals/Makefile
+++ b/doc/manuals/Makefile
@@ -1,44 +1,10 @@
-# XSL stylesheets downloaded from http://docbook.sourceforge.net/release/xsl/current/html/
-# Makefile from BitBake/OpenEmbedded manuals
-
-EXTRA_DEPS = gen-nitb-vty-docbook
-
-topdir = .
-nitb_reference = $(topdir)/osmonitb-vty-reference.xml
-manuals = $(nitb_reference)
-# types = pdf txt rtf ps xhtml html man tex texi dvi
-# types = pdf txt
-types = $(docbooktotypes)
-docbooktotypes = pdf
-# htmlcssfile =
-# htmlcss =
-
-TOPDIR := ..
-ASCIIDOCS := osmonitb-usermanual
+TOPDIR = ..
+ASCIIDOC = osmonitb-usermanual.adoc
+ASCIIDOC_DEPS = chapters/*.adoc
include $(TOPDIR)/build/Makefile.asciidoc.inc
-include $(TOPDIR)/build/Makefile.inc
-
-osmonitb-usermanual.pdf: chapters/*.adoc
-clean:
- -rm -rf $(cleanfiles)
- -rm osmonitb-usermanual__*.svg
- -rm osmonitb-usermanual__*.png
- -rm osmonitb-usermanual.check
+VTY_REFERENCE = osmonitb-vty-reference.xml
+include $(TOPDIR)/build/Makefile.vty-reference.inc
-gen-nitb-vty-docbook: FORCE
- $(call command,xsltproc -o generated/combined1.xml \
- --stringparam with $(PWD)/../common/vty_additions.xml \
- $(MERGE_DOC) vty/nitb_vty_reference.xml, \
- XSLTPROC,Merging Common VTY)
- $(call command,xsltproc -o generated/combined2.xml \
- --stringparam with $(PWD)/../common/bsc_vty_additions.xml \
- $(MERGE_DOC) generated/combined1.xml, \
- XSLTPROC,Merging Common BSC VTY)
- $(call command,xsltproc -o generated/combined3.xml \
- --stringparam with $(PWD)/vty/nitb_vty_additions.xml \
- $(MERGE_DOC) generated/combined2.xml, \
- XSLTPROC,Merging NITB VTY)
- $(call command,xsltproc ../vty_reference.xsl generated/combined3.xml > generated/docbook_vty.xml, \
- XSLTPROC,Converting NITB VTY to DocBook)
+include $(TOPDIR)/build/Makefile.common.inc
diff --git a/doc/manuals/vty/bsc_vty_additions.xml b/doc/manuals/vty/bsc_vty_additions.xml
new file mode 120000
index 000000000..5def5f1d7
--- /dev/null
+++ b/doc/manuals/vty/bsc_vty_additions.xml
@@ -0,0 +1 @@
+../../OsmoBSC/vty/bsc_vty_additions.xml \ No newline at end of file