2017-10-19 03:11:57 +00:00
|
|
|
# Usage:
|
|
|
|
# Have files:
|
|
|
|
# - osmoyada-vty-reference.xml
|
|
|
|
# A docbook root XML including a &chapter-vty; reference.
|
|
|
|
# - vty/*additions*.xml
|
|
|
|
# Manual additions to specific VTY nodes, any number of files.
|
|
|
|
# - vty/*_reference.xml
|
|
|
|
# Export from VTY 'show online-help', exactly one file.
|
|
|
|
#
|
2018-11-16 11:39:59 +00:00
|
|
|
# In your Makefile.am,
|
|
|
|
# - define 'OSMO_GSM_MANUALS_DIR' to point at the osmo-gsm-manuals shared files
|
|
|
|
# installation path as returned by "pkg-config osmo-gsm-manuals --variable=osmogsmmanualsdir"
|
|
|
|
# (project specific repos set this with configure.ac),
|
2017-10-19 03:11:57 +00:00
|
|
|
# - define the (single) name of the vty-reference source in VTY_REFERENCE,
|
|
|
|
# - include this file.
|
|
|
|
#
|
|
|
|
# e.g.
|
|
|
|
#
|
2018-11-14 09:47:01 +00:00
|
|
|
# OSMO_GSM_MANUALS_DIR = ..
|
2019-12-02 14:54:27 +00:00
|
|
|
# VTY_REFERENCE = osmofoo-vty-reference.xml
|
2018-11-14 09:47:01 +00:00
|
|
|
# include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc
|
2017-10-19 03:11:57 +00:00
|
|
|
#
|
|
|
|
# This uses the Makefile.docbook.inc, you should not mix uses of
|
|
|
|
# Makefile.vty-reference.inc and Makefile.docbook.inc.
|
2019-12-02 12:58:32 +00:00
|
|
|
#
|
|
|
|
# In order to add more than one VTY reference, do this for each additional one:
|
|
|
|
# - Extend VTY_REFERENCE with the new entry, make sure it ends in "-vty-reference.xml":
|
|
|
|
# VTY_REFERENCE = osmofoo-vty-reference.xml osmobar-vty-reference.xml
|
|
|
|
# - Create a new osmobar-vty-reference.xml file, just like osmofoo-vty-reference.xml, but with
|
|
|
|
# "generated/docbook_osmobar-vty-reference.xml" as sections-vty path instead of
|
|
|
|
# "generated/docbook_vty.xml".
|
|
|
|
# - Create vty-osmobar/*_additions.xml and vty-osmobar/*_reference.xml. Pay attention to the
|
|
|
|
# directory name, it must start with vty-* instead of "vty" and it must match the prefix of
|
|
|
|
# your new VTY_REFERENCE entry ("vty-osmobar" in this example).
|
|
|
|
# - Add osmobar-vty-reference.xml and vty-osmobar to EXTRA_DIST in Makefile.am.
|
|
|
|
# - Full example: osmo-sgsn.git I24c3ca2fc2446673edceefb797c7d800c3a1a5d2
|
2017-10-19 03:11:57 +00:00
|
|
|
|
|
|
|
DOCBOOKS = $(VTY_REFERENCE)
|
2019-12-02 12:58:32 +00:00
|
|
|
|
|
|
|
# First VTY reference
|
2017-10-19 03:11:57 +00:00
|
|
|
DOCBOOKS_DEPS = generated/docbook_vty.xml
|
2019-12-02 12:58:32 +00:00
|
|
|
|
|
|
|
# Additional VTY references: prepend "generated/docbook_"
|
|
|
|
# For example:
|
|
|
|
# VTY_REFERENCE = osmosgsn-vty-reference.xml osmogbproxy-vty-reference.xml
|
|
|
|
# DOCBOOK_DEPS = generated/docbook_vty.xml generated/docbook_osmogbproxy-vty-reference.xml
|
|
|
|
DOCBOOKS_DEPS += $(patsubst %,generated/docbook_%,$(filter-out $(firstword $(VTY_REFERENCE)),$(VTY_REFERENCE)))
|
|
|
|
|
2018-11-14 09:47:01 +00:00
|
|
|
include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.docbook.inc
|
2017-10-19 03:11:57 +00:00
|
|
|
|
2018-11-14 09:47:01 +00:00
|
|
|
MERGE_DOC = $(shell realpath $(OSMO_GSM_MANUALS_DIR)/merge_doc.xsl)
|
2017-10-19 03:11:57 +00:00
|
|
|
|
|
|
|
CLEAN_FILES += generated
|
|
|
|
|
2019-12-02 12:58:32 +00:00
|
|
|
# First VTY reference
|
2017-10-19 03:11:57 +00:00
|
|
|
generated/docbook_vty.xml: \
|
Makefile.*.inc: adjust to out-of-tree building
Makefile.asciidoc.inc: create a symlink for the root adoc file, from
which a PDF gets generated, from the srcdir to the builddir. This file
may include other adoc files, which do not get symlinked. We need to do
this, because a2x (the program generating the PDF file) does not have a
parameter for the output file, and will otherwise generate the PDF in
the srcdir instead of the builddir. Do the same in the check target, so
the relative include paths work the same.
Makefile.asciidoc.inc, Makefile.docbook.inc: set the include paths for
the xstl parser, as well as the LaTeX compiler, so they can find the
files they need from both OSMO_GSM_MANUALS_DIR and builddir.
Makefile.asciidoc.inc, Makefile.docbook.inc: refer to the output file
$@ with $(notdir $@). This removes the path from the file, like
basename from coreutils. The output file will then be placed in the
builddir instead of the srcdir.
Makefile.vty-reference.inc: use $(srcdir) in references to vty/*.xml
files.
(moving manuals to project repositories 12/19)
Related: OS#3385
Change-Id: Ie6b212a6518f0fc29fae610a37ae6c533189278d
2018-11-14 14:51:07 +00:00
|
|
|
$(srcdir)/vty/*xml \
|
2018-11-14 09:47:01 +00:00
|
|
|
$(OSMO_GSM_MANUALS_DIR)/common/vty_additions.xml \
|
|
|
|
$(OSMO_GSM_MANUALS_DIR)/common/chapters/vty.xml \
|
|
|
|
$(OSMO_GSM_MANUALS_DIR)/vty_reference.xsl
|
|
|
|
$(OSMO_GSM_MANUALS_DIR)/build/vty_reference_combine.sh "$(MERGE_DOC)" \
|
2018-11-14 14:55:10 +00:00
|
|
|
$(srcdir)/vty/*reference.xml \
|
2018-11-14 09:47:01 +00:00
|
|
|
$(OSMO_GSM_MANUALS_DIR)/common/vty_additions.xml \
|
Makefile.*.inc: adjust to out-of-tree building
Makefile.asciidoc.inc: create a symlink for the root adoc file, from
which a PDF gets generated, from the srcdir to the builddir. This file
may include other adoc files, which do not get symlinked. We need to do
this, because a2x (the program generating the PDF file) does not have a
parameter for the output file, and will otherwise generate the PDF in
the srcdir instead of the builddir. Do the same in the check target, so
the relative include paths work the same.
Makefile.asciidoc.inc, Makefile.docbook.inc: set the include paths for
the xstl parser, as well as the LaTeX compiler, so they can find the
files they need from both OSMO_GSM_MANUALS_DIR and builddir.
Makefile.asciidoc.inc, Makefile.docbook.inc: refer to the output file
$@ with $(notdir $@). This removes the path from the file, like
basename from coreutils. The output file will then be placed in the
builddir instead of the srcdir.
Makefile.vty-reference.inc: use $(srcdir) in references to vty/*.xml
files.
(moving manuals to project repositories 12/19)
Related: OS#3385
Change-Id: Ie6b212a6518f0fc29fae610a37ae6c533189278d
2018-11-14 14:51:07 +00:00
|
|
|
$(srcdir)/vty/*additions*.xml
|
2018-11-14 09:47:01 +00:00
|
|
|
xsltproc $(OSMO_GSM_MANUALS_DIR)/vty_reference.xsl generated/combined.xml \
|
2017-10-19 03:11:57 +00:00
|
|
|
> generated/docbook_vty.xml
|
2019-12-02 12:58:32 +00:00
|
|
|
|
|
|
|
# Additional VTY references
|
|
|
|
generated/docbook_%-vty-reference.xml: \
|
|
|
|
$(srcdir)/vty-%/*xml \
|
|
|
|
$(OSMO_GSM_MANUALS_DIR)/common/vty_additions.xml \
|
|
|
|
$(OSMO_GSM_MANUALS_DIR)/common/chapters/vty.xml \
|
|
|
|
$(OSMO_GSM_MANUALS_DIR)/vty_reference.xsl
|
|
|
|
export VTYDIR="$(srcdir)/vty-$(patsubst generated/docbook_%-vty-reference.xml,%,$@)" && \
|
|
|
|
export VTYGEN="$@_combine" && \
|
|
|
|
$(OSMO_GSM_MANUALS_DIR)/build/vty_reference_combine.sh "$(MERGE_DOC)" \
|
|
|
|
$$VTYDIR/*reference.xml \
|
|
|
|
$(OSMO_GSM_MANUALS_DIR)/common/vty_additions.xml \
|
|
|
|
$$VTYDIR/*additions*.xml && \
|
|
|
|
xsltproc $(OSMO_GSM_MANUALS_DIR)/vty_reference.xsl $$VTYGEN/combined.xml > "$@"
|