Commit Graph

14 Commits

Author SHA1 Message Date
Oliver Smith 42cb9816db build/Makefile.common: full path for shrink script
Use the full path to shrink-pdfs.sh, so it works as expected when the
symlinks are not present. This is how pysim uses the publish/shrink
targets.

Fix for:
  build/shrink-pdfs.sh _build/latex/osmopysim-usermanual.pdf
  make: build/shrink-pdfs.sh: Command not found

Related: SYS#6380
Change-Id: Iba6e0e4932741adcb9e54e54eb7774716fb2e244
2023-03-20 11:15:46 +01:00
Oliver Smith 24cca7086b build/Makefile.common: shrink pdfs before publish
Closes: SYS#6380
Change-Id: I7c01b1cb1a0e7de385359671461a0ad142dfa5ad
2023-03-17 12:42:01 +01:00
Oliver Smith 33b5f5c889 build/Makefile.common: move clean/distclean down
Group upload and publish closer together by moving the clean targets to
the bottom.

Related: SYS#6380
Change-Id: Id8b6ead89a2aeba28e9c55bcfde6564376e8418a
2023-03-17 12:41:58 +01:00
Oliver Smith 2cef0dc72f Cosmetic: build/Makefile.common.inc: add comments
Describe what upload and publish do, it's not clear from the name of
these make targets.

Related: SYS#6380
Change-Id: Ic2ab9df2192912d20ede0241abe01e8d26a9afcc
2023-03-17 12:41:54 +01:00
Oliver Smith 59d031823d build/Makefile.common.inc: unset OSMO_REPOSITORY
Don't have a default value for OSMO_REPOSITORY, as this leads to manuals
getting uploaded to the wrong directory (publish) target and installed
to the wrong directory (install, uninstall).

Add checks to ensure the variable is set before using it in install and
uninstall.

Related: OS#5902
Change-Id: Ie21d58dd57a893a83f566eea464ab3eec82b67a4
2023-03-07 15:54:40 +01:00
Oliver Smith 2d2d795348 Change upload path to project/master/
Don't upload the manuals for master to "latest" anymore, this is
confusing given that we also refer to the most recent release as
"latest". Add the "master" directory to prepare a directory structure
where we can have manuals for each release:

  osmo-hlr/
  osmo-hlr/master/
  osmo-hlr/master/osmohlr-usermanual.pdf
  osmo-hlr/master/osmohlr-vty-reference.pdf

Related: OS#5902
Change-Id: Id090422afbd7b91ac78cc30e19372ac1c828cb6b
2023-03-07 11:21:27 +00:00
Harald Welte 811f3e8526 build: Switch from rita -> ftp.osmocom.org
We should use service-aliases and not the primary host name, as
that makes migration between machines hard.

Change-Id: Ie139a8cbf2aaa746c0edf6c90a567eb43bc51f45
2021-04-22 11:24:50 +02:00
Vadim Yanitskiy ff86b25a5d Makefile.common.inc: make 'publish' target use $(UPLOAD_FILES)
In some projects, the VTY reference PDFs may be located in sub-
directories.  Let's use $(UPLOAD_FILES), it already contains
the list of all *.pdf files to be uploaded / published.

Change-Id: I7d46dc3b67dee1a91f3ade5a166d833df816abd4
Related: SYS#4937
2020-11-06 17:09:39 +07:00
Oliver Smith 5501ba607b Makefile.common.inc: add {,un}install targets
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-12 14:32:20 +02:00
Oliver Smith d379a0e33c Makefile.common.inc: publish: don't depend on check
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-12-07 16:01:58 +01:00
Oliver Smith e7446e8810 publish from project repos, not this repo anymore
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-21 14:37:49 +01:00
Oliver Smith 06d1805c5b *filter.conf/*.sty: use symlinks to build, common
$(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-21 14:29:11 +01:00
Oliver Smith 2947683c3a use autotools to add "make install" target
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-21 14:29:05 +01:00
Neels Hofmeyr c481a988e3 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
2017-10-25 16:51:55 +00:00