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
This commit is contained in:
parent
ea9d5b9499
commit
0a421119c8
|
@ -1,50 +1,12 @@
|
||||||
# XSL stylesheets downloaded from http://docbook.sourceforge.net/release/xsl/current/html/
|
TOPDIR = ..
|
||||||
# Makefile from BitBake/OpenEmbedded manuals
|
|
||||||
|
|
||||||
EXTRA_DEPS = gen-bts-vty-docbook
|
|
||||||
|
|
||||||
topdir = .
|
|
||||||
bts_reference = $(topdir)/osmobts-vty-reference.xml
|
|
||||||
manuals = $(bts_reference)
|
|
||||||
# types = pdf txt rtf ps xhtml html man tex texi dvi
|
|
||||||
# types = pdf txt
|
|
||||||
types = $(docbooktotypes)
|
|
||||||
docbooktotypes = pdf
|
|
||||||
# htmlcssfile =
|
|
||||||
# htmlcss =
|
|
||||||
|
|
||||||
TOPDIR := ..
|
|
||||||
ASCIIDOCS := osmobts-usermanual osmobts-abis rtp-amr
|
|
||||||
|
|
||||||
|
ASCIIDOC = osmobts-usermanual.adoc osmobts-abis.adoc rtp-amr.adoc
|
||||||
include $(TOPDIR)/build/Makefile.asciidoc.inc
|
include $(TOPDIR)/build/Makefile.asciidoc.inc
|
||||||
include $(TOPDIR)/build/Makefile.inc
|
|
||||||
|
|
||||||
osmobts-abis.pdf: abis/*.adoc abis/*.msc
|
|
||||||
osmobts-usermanual.pdf: chapters/*.adoc
|
osmobts-usermanual.pdf: chapters/*.adoc
|
||||||
|
osmobts-abis.pdf: abis/*.adoc abis/*.msc
|
||||||
|
rtp-amr.pdf: dtx.dot
|
||||||
|
|
||||||
clean:
|
VTY_REFERENCE = osmobts-vty-reference.xml
|
||||||
-rm -rf $(cleanfiles)
|
include $(TOPDIR)/build/Makefile.vty-reference.inc
|
||||||
-rm osmobts-abis__*.png
|
|
||||||
-rm osmobts-abis__*.svg
|
|
||||||
-rm rtp-amr__*.png
|
|
||||||
-rm rtp-amr__*.svg
|
|
||||||
-rm osmobts-usermanual__*.png
|
|
||||||
-rm osmobts-usermanual__*.svg
|
|
||||||
-rm osmobts-abis*.check
|
|
||||||
-rm osmobts-usermanual*.check
|
|
||||||
|
|
||||||
gen-bts-vty-docbook: FORCE
|
include $(TOPDIR)/build/Makefile.common.inc
|
||||||
$(call command,xsltproc -o generated/combined1.xml \
|
|
||||||
--stringparam with $(PWD)/../common/vty_additions.xml \
|
|
||||||
$(MERGE_DOC) vty/bts_vty_reference.xml, \
|
|
||||||
XSLTPROC,Merging Common VTY)
|
|
||||||
$(call command,xsltproc -o generated/combined2.xml \
|
|
||||||
--stringparam with $(PWD)/../common/ns_vty_additions.xml \
|
|
||||||
$(MERGE_DOC) generated/combined1.xml, \
|
|
||||||
XSLTPROC,Merging Common NS VTY)
|
|
||||||
$(call command,xsltproc -o generated/combined3.xml \
|
|
||||||
--stringparam with $(PWD)/vty/bts_vty_additions.xml \
|
|
||||||
$(MERGE_DOC) generated/combined2.xml, \
|
|
||||||
XSLTPROC,Merging BTS VTY)
|
|
||||||
$(call command,xsltproc ../vty_reference.xsl generated/combined3.xml > generated/docbook_vty.xml, \
|
|
||||||
XSLTPROC,Converting BTS VTY to DocBook)
|
|
||||||
|
|
Loading…
Reference in New Issue