summaryrefslogtreecommitdiffstats
path: root/build
AgeCommit message (Collapse)AuthorFilesLines
2019-04-12Makefile.common.inc: add {,un}install targetsOliver Smith1-1/+27
Allow installing generated pdfs with 'make install' in all Osmocom projects using osmo-gsm-manuals. This makes proper debian packaging of the manuals easier. Autotools will automatically run this file's install target, when running 'make install' in the top source dir. Do not install anything, when OSMO_GSM_MANUALS_NO_INSTALL is set, and set this variable for the tests dir, so we don't install the test pdfs. Related: OS#3899 Change-Id: I66f33172fa410681acbaef4592e9405627948705
2019-04-10build/unix-time-to-fmt.py: use default python verOliver Smith1-1/+1
Don't explicitly depend on python 3, so we don't need to have python 2 *and* python 3 installed to build osmo-gsm-manuals. The script is short and works fine with either python version. Related: OS#3899 Change-Id: I8af9b8159f5c7e39b905f85edd1584cb4d5a33ef
2018-12-07Makefile.common.inc: publish: don't depend on checkOliver Smith1-1/+1
The 'check' target is only available when including Makefile.asciidoc.inc, which is not always the case. Some projects only build the VTY reference. Do not depend on check, so publishing the VTY reference for these projects is working as expected. Related: OS#3385 Change-Id: I64aae0016095d81ca9e9ebda9a2e3336ac126639
2018-11-21publish from project repos, not this repo anymoreOliver Smith2-0/+9
Do not publish PDFs for all projects anymore with jenkins.sh --publish or "make publish". Extract known_hosts from jenkins.sh, and install it along with the other shared files in OSMO_GSM_MANUALS_DIR. Add a "publish" target to Makefile.common.inc, so we can use it from the project repositories. Document its usage in INSTALL.txt. No automatism for building and publishing the documentation of all projects will be implemented in this patch series, as discussed here: https://osmocom.org/issues/3385#note-7 (moving manuals to project repositories 19/19) Related: OS#3385 Change-Id: Ibe0424ceace151115985896b6d43035c69067c50
2018-11-21vty_reference_combine.sh: chmod xsltproc outputOliver Smith1-0/+8
Force the xsltproc output file to be writable, if it exists already. This is needed for 'make distcheck': xsltproc gives output files the same permissions as input files. We need to change the output file in multiple iterations in vty_reference_combine.sh, hence it must be writable. (moving manuals to project repositories 15/19) Related: OS#3385 Change-Id: I693e12ee15665d01cbc50187e6cb3ca74ad0356a
2018-11-21*.adoc: use {srcdir} for out-of-tree buildsOliver Smith1-1/+1
Define a new {srcdir} variable in Makefile.asciidoc.inc, that can be used in all adoc files. The value is the same as the Makefile variable $(srcdir). Use {srcdir} in the "include::" lines of all adoc files. (moving manuals to project repositories 13/19) Related: OS#3385 Change-Id: I823e3d534cbc9ffceb68d3ab14c9f6710ff2eb2a
2018-11-21Makefile.*.inc: adjust to out-of-tree buildingOliver Smith3-8/+31
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-21Osmo*/Makefile.am: use $(srcdir), $(top_srcdir)Oliver Smith2-2/+2
Use $(srcdir) infront of all relative paths, which reference other files in the repository. Use $(top_srcdir) as OSMO_GSM_MANUALS_DIR. This is needed for out-of-tree building. (moving manuals to project repositories 11/19) Related: OS#3385 Change-Id: I2454d7507fae4e1c47458a1adf36f68e637f4bbc
2018-11-21vty_reference_combine.sh: add *reference.xml argOliver Smith2-4/+9
Pass the path to $(srcdir)/vty/*reference.xml as parameter to vty_reference_combine.sh instead of assuming that it will be in ./vty/*reference.xml. This is necessary to make the build scripts work for out-of-tree builds. Because when building out-of-tree, the source dir and build dir (the one where the Makefile gets generated, and in which "make" runs), are not the same anymore. The relative vty/reference.xml path is only valid in the source dir, not in the build dir. The next commits in this series have more changes for out-of-tree builds. Out-of-tree building is necessary for consistency with the other Osmocom code, which can be built out-of-tree as well. It would be strange if this did not work anymore as soon as the users enabled building the manuals. (moving manuals to project repositories 10/19) Related: OS#3385 Change-Id: I3dcb49d7705f882bd117088d4e5eab91dd1c7d8c
2018-11-21*filter.conf/*.sty: use symlinks to build, commonOliver Smith6-8/+21
$(OSMO_GSM_MANUALS_DIR) is used in most places to reference to the top dir, which contains "build" and "common". But not in the asciidoc mscgen filter configurations, and in the custom LaTeX style. They have ../common or ../build hardcoded, which won't work anymore when the project specific files will be in another repository. Update the Makefiles to create symlinks to "build" and "common" in the dir where the build was started. Use ./common in the files that had ../common hardcoded, and do the same for ./build. Update the Makefile.common.inc comment to refer to common targets in general, so we don't need to list each single one there (like the new 'common' and 'build' targets). I've also thought about using variables there, but this would only work for the asciidoc files, not for the .sty file. We would need to generate the latter from another file and replace the variable dynamically. Having the symlinks instead seemed to be slightly easier. (moving manuals to project repositories 7/19) Related: OS#3385 Change-Id: I4cfd1a9ef482d382f10cdf060e8e2cba81852864
2018-11-21cosmetic: update usage of OSMO_GSM_MANUALS_DIROliver Smith3-4/+10
OSMO_GSM_MANUALS_DIR should use pkg-config to figure out the location of the shared osmo-gsm-manuals files. (moving manuals to project repositories 6/19) Related: OS#3385 Change-Id: I64cfffb5104edcf7a20f41aeb5bf8ee6988b57c4
2018-11-21use autotools to add "make install" targetOliver Smith1-0/+2
For reasoning why a transition to autotools is desired, see the commit message of the previous patch in this series. "make install" copies the "build", "common" dirs, as well as the "*.xsl" files to $(prefix)/share/osmo-gsm-manuals. Prefix is typically /usr/local. Also a pkg-config file gets installed, so the path of the shared files can be looked up by autoconf scripts of the project repositories. The check-depends script is installed to $(prefix)/bin/osmo-gsm-manuals-check-depends and will be used by project specific autoconf scripts, too. All existing make targets ("make", "make check", "make upload") are still working, users only need to run "autoreconf -fi" and "./configure" beforehand. Makefile.am uses custom install-data-hook and uninstall-local targets, so we don't need to specify each file of the relevant subdirs in a _DATA variable (no extra maintenance effort). (moving manuals to project repositories 5/19) Related: OS#3385 Change-Id: I8e7036fae062ee783cb132b14608827a82c5e7c7
2018-11-20s/TOPDIR/OSMO_GSM_MANUALS_DIR/gOliver Smith3-22/+22
Replace TOPDIR with OSMO_GSM_MANUALS_DIR. When the project specific manuals will be built out of this repository, we still need to refer to the top directory of the shared content. But it will be in another repository, so we need to rename the variable to avoid confusion. (moving manuals to project repositories 3/19) Related: OS#3385 Change-Id: I2af797546de048a6ab19a5cbc755e5e15575d7ab
2018-11-20make check: properly reference dependenciesOliver Smith1-1/+1
Use $(ASCIIDOC_DEPS) instead of assuming that the value would be "chapters/*.adoc". The variable exists already, but it was not used yet in 'make check' of Makefile.asciidoc.inc. This allows creating a tests dir without its own chapters subdir (follow-up commit), which is part of a larger effort to move manuals to project repositories. The reason for moving manuals to project repositories is that we can have documentation changes together with code changes in the same patches. Not part of this patchset, but possible in the future, is optionally building UNIX man pages in the project repositories (OS#3386) as well as generating the VTY documentation on the fly from running the project binaries (OS#3695). (moving manuals to project repositories 1/19) Related: OS#3386 Change-Id: Id8b26759607a3490d6cbd93c68ba1f89aa8ef1f2
2018-11-12merge_doc.xsl: move from libosmocore.gitOliver Smith1-2/+1
Allow building manuals without the libosmocore source. Related: OS#3385 Change-Id: Ifb81b18422987cdf36b75993d2782abf93b5f48c
2018-11-12unix-time-to-fmt.py: fix crash without argumentOliver Smith1-0/+4
Print "unknown" to stdout when unix-time-to-fmt.py was called without an argument, instead of printing a Python stack trace to stderr. It gets called that way when building outside of a git folder. Change-Id: I3ba27cc23543e47cc8a1e494c35cc33f1dc8f297
2018-11-12Makefile.asciidoc.inc: make clean: also rm *.htmlOliver Smith1-1/+1
HTML files get created when a2x fails and asciidoc runs. Change-Id: I4d5e9c36f75141ce88d11b16c89809be4dce87d8
2018-11-12Makefile.asciidoc.inc: always exit 1 on a2x errorOliver Smith1-1/+2
a2x wraps asciidoc. When a2x fails, we run asciidoc without a2x to print verbose output. Make sure that 'make' fails at this point, even if asciidoc runs through. Change-Id: I30931303ecc6094efaedcb08380433a34211a169
2017-11-20Fix build with default pathsMax1-1/+1
If LIBOSMO_DIR is not set explicitly than ~/source/gsm/libosmocore is used which is base for MERGE_DOC which is used by vty_reference_combine.sh as it is. If the shell used by vty_reference_combine.sh does not expand ~ than the build will fail. Let's be nice and use realpath on MERGE_DOC before giving it to vty_reference_combine.sh to make sure complete path is used. Change-Id: I2edf64348502cbe498d9fd27a686c712b044c926
2017-10-25refactor Makefile build rules, don't use the FORCENeels Hofmeyr6-53/+145
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
2017-09-19fix make deps: join hint_to_remove_draft_mode to build stepNeels Hofmeyr1-4/+1
Change-Id: Iecf8e18ce2f1dac61bf55019e1fec601b33abb95
2017-07-19osmux-reference: Add traffic saving plotPau Espin Pedrol2-1/+22
Change-Id: I8fa60c1f95436c39fd1ff9424a907876d367484e
2017-07-19all manuals: Move date and release from center head to right footPau Espin Pedrol1-1/+2
Otherwise long doc titles (top left) run on top of release and date making it impossible to read any of them correctly. Change-Id: I685a981a5cfd82214d1d654aa1553a844c2af157
2017-06-12all: show 'DRAFT' watermark on the first pageNeels Hofmeyr2-1/+12
Unconditionally show a 'DRAFT' watermark only on the first page of each document. I would have liked to make this conditional based on the BUILD_RELEASE=* variable, but could not figure out how to switch off a .sty code segment based on command line parameters. Since we only seem to render all manuals in DRAFT mode all the time, it seems reasonable to include the DRAFT watermark always, requiring manual .sty editing if anyone wanted to build a non-DRAFT version. In the makefile, add an echo to say so in case of non-draft builds. Change-Id: Ia71795481c2467aab11ab344517df74775b2a852
2017-06-12all: show 'DRAFT' in page header, disable DRAFT watermarkNeels Hofmeyr1-4/+4
The 'DRAFT' watermark in the page background is a hindrance when trying to copy-paste text from the rendered PDFs. It segments the texts so that many code lines cannot be marked in whole to copy. So drop the watermark and instead just show 'DRAFT' in the page header. Change-Id: Ie22cdddf46bf7640e7f027940a6db904bf639142
2017-05-15all manuals: number paragraphs up to level 5 depthNeels Hofmeyr1-0/+3
Change-Id: Ic03ff99df4d655ce0b2dbc5a042a3a62f07cfef7
2016-10-18cosmetic: build: on a2x failure, use asciidoc -v and $ASCIIDOC_OPTSNeels Hofmeyr1-1/+1
This is only used to output warnings in case the a2x build failed. Use ASCIIDOC_OPTS instead of repeating the same options (with one missing) and add verbose output by asciidoc. Change-Id: I6135ba1a3e46610eea6089e2218f1024c49054be
2016-10-18add 'make check' targetNeels Hofmeyr1-0/+11
Generate *.check files from asciidoc output and grep for WARNINGs. Add *.check files to gitignore and to 'make clean'. Change-Id: Ibccc83a3415930a528f2e8e4e4dda3b81c6d0b64
2016-10-18build/Makefile: set LIBOSMO_DIR UPLOAD_PATH only if not existsAlexander Couzens1-2/+2
Allows the user to set by env or argument Change-Id: Ibc2c9ff6e61fd8cb59b908a9586ad5841d698924
2016-10-18portability: use py script instead of 'date -d @1234'Neels Hofmeyr2-1/+19
On FreeBSD, the 'date' command's -d option has a completely different meaning. Instead, use a small python script to do the date format conversion, which should be more portable. As a side effect, we now also use UTC instead of the build server's timezone, which may be considered a more international choice. Add build/unix-time-to-fmt.py, call in build/Makefile.asciidoc.inc. Change-Id: I91a40656184f553ee375216d8ba5c7788fe9990d
2016-05-22Makefile.inc: Fix "make upload" for asciidoc PDFsHarald Welte1-2/+2
2016-03-02diag-filter: Do not use the same output block as mscgenHolger Hans Peter Freyther1-12/+12
By using the same name for the config it overwrite the one used by the mscgen plugin. Let's avoid this and switch from svg to png as well as the docbook classification doesn't seem to work.
2016-03-02mscgen: Try to force png for nowHolger Hans Peter Freyther1-2/+2
The CI does not generate(?) or include the svg files in the PDF. It is not clear why that is done if something is missing from mscgen or from asciidoc or something else is wrong. Let's try once with the PNG output.
2016-02-20Ensure it's called "HISTORY" not "REVISION HISTORY"Harald Welte1-0/+3
The GFDL specifically names a "History" section, so let's make sure we stay within that language.
2016-02-20Ensure the git version + commit date ends up in PDFHarald Welte3-1/+23
This is a bit awkward, as the 'revnumber' asciidoc variable so far doesn't seem to end up in the docbook-xml. We now put it into 'releaseinfo' which gets then put into \DBKreleeaseinfo by dblatex. makefile watermark fixup
2016-02-20initial checkin of manuals to public repoHarald Welte6-0/+251
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.