<p>Harald Welte <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/13597">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  Pau Espin Pedrol: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Makefile.common.inc: add {,un}install targets<br><br>Allow installing generated pdfs with 'make install' in all Osmocom<br>projects using osmo-gsm-manuals. This makes proper debian packaging of<br>the manuals easier.<br><br>Autotools will automatically run this file's install target, when<br>running 'make install' in the top source dir. Do not install anything,<br>when OSMO_GSM_MANUALS_NO_INSTALL is set, and set this variable for the<br>tests dir, so we don't install the test pdfs.<br><br>Related: OS#3899<br>Change-Id: I66f33172fa410681acbaef4592e9405627948705<br>---<br>M build/Makefile.common.inc<br>M tests/Makefile.am<br>2 files changed, 30 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/build/Makefile.common.inc b/build/Makefile.common.inc</span><br><span>index aaad088..b98e83f 100644</span><br><span>--- a/build/Makefile.common.inc</span><br><span>+++ b/build/Makefile.common.inc</span><br><span>@@ -3,12 +3,18 @@</span><br><span> # Other makefiles like Makefile.asciidoc.inc and Makefile.vty-reference.inc add</span><br><span> # entries to UPLOAD_FILES and CLEAN_FILES.</span><br><span> #</span><br><span style="color: hsl(0, 100%, 40%);">-# Include this file at the end to have the common targets (upload, clean etc.).</span><br><span style="color: hsl(120, 100%, 40%);">+# Put the repository name (e.g. "osmo-bts") into OSMO_REPOSITORY and include</span><br><span style="color: hsl(120, 100%, 40%);">+# this file at the end to have the common targets (upload, clean, install etc.).</span><br><span> </span><br><span> SSH_COMMAND = ssh -o 'UserKnownHostsFile=$(OSMO_GSM_MANUALS_DIR)/build/known_hosts' -p 48</span><br><span> UPLOAD_PATH ?= generic@sysmocom-downloads:documents</span><br><span> SYMLINKS = common build</span><br><span> CLEAN_FILES += $(SYMLINKS)</span><br><span style="color: hsl(120, 100%, 40%);">+PDF_FILES = $(patsubst %.adoc,%.pdf,$(ASCIIDOC)) $(patsubst %.xml,%.pdf,$(VTY_REFERENCE))</span><br><span style="color: hsl(120, 100%, 40%);">+OSMO_REPOSITORY ?= osmo-gsm-manuals</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# Prefix (Makefile.am sets this to configure's --prefix when including)</span><br><span style="color: hsl(120, 100%, 40%);">+prefix ?= /usr/local</span><br><span> </span><br><span> $(SYMLINKS):</span><br><span>       ln -s $(OSMO_GSM_MANUALS_DIR)/$@ $@</span><br><span>@@ -25,3 +31,23 @@</span><br><span>     mkdir -p out</span><br><span>         cp *.pdf out</span><br><span>         rsync -avz -e "$(SSH_COMMAND)" ./out/ docs@rita.osmocom.org:web-files/latest/</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# Install and uninstall targets</span><br><span style="color: hsl(120, 100%, 40%);">+# Notes about OSMO_GSM_MANUALS_NO_INSTALL:</span><br><span style="color: hsl(120, 100%, 40%);">+# - osmo-gsm-manuals.git's tests/Makefile.am sets this, so the test pdfs will not</span><br><span style="color: hsl(120, 100%, 40%);">+#   get installed</span><br><span style="color: hsl(120, 100%, 40%);">+# - installing manuals by default is fine, because Osmocom projects won't include</span><br><span style="color: hsl(120, 100%, 40%);">+#   the whole Makefile.common.inc unless --enable-manuals is passed to configure.</span><br><span style="color: hsl(120, 100%, 40%);">+install: $(PDF_FILES)</span><br><span style="color: hsl(120, 100%, 40%);">+     if [ "$(OSMO_GSM_MANUALS_NO_INSTALL)" != "1" ]; then \</span><br><span style="color: hsl(120, 100%, 40%);">+            for i in $(PDF_FILES); do \</span><br><span style="color: hsl(120, 100%, 40%);">+                   install -vDm644 "$$i" "$(DESTDIR)$(prefix)/share/doc/$(OSMO_REPOSITORY)-doc/$$i" || exit 1; \</span><br><span style="color: hsl(120, 100%, 40%);">+             done; \</span><br><span style="color: hsl(120, 100%, 40%);">+       fi</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+uninstall:</span><br><span style="color: hsl(120, 100%, 40%);">+      if [ "$(OSMO_GSM_MANUALS_NO_INSTALL)" != "1" ]; then \</span><br><span style="color: hsl(120, 100%, 40%);">+            for i in $(PDF_FILES); do \</span><br><span style="color: hsl(120, 100%, 40%);">+                   rm -v "$(DESTDIR)$(prefix)/share/doc/$(OSMO_REPOSITORY)-doc/$$i"; \</span><br><span style="color: hsl(120, 100%, 40%);">+         done; \</span><br><span style="color: hsl(120, 100%, 40%);">+       fi</span><br><span>diff --git a/tests/Makefile.am b/tests/Makefile.am</span><br><span>index 32f23b0..7dc9544 100644</span><br><span>--- a/tests/Makefile.am</span><br><span>+++ b/tests/Makefile.am</span><br><span>@@ -3,6 +3,9 @@</span><br><span>        test-vty-reference.xml \</span><br><span>     vty</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+# Do not install any of the test pdfs</span><br><span style="color: hsl(120, 100%, 40%);">+OSMO_GSM_MANUALS_NO_INSTALL = 1</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> # Generate adoc file that includes all chapters</span><br><span> ASCIIDOC = test-usermanual.adoc</span><br><span> ASCIIDOC_DEPS =</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/13597">change 13597</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/13597"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-gsm-manuals </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I66f33172fa410681acbaef4592e9405627948705 </div>
<div style="display:none"> Gerrit-Change-Number: 13597 </div>
<div style="display:none"> Gerrit-PatchSet: 5 </div>
<div style="display:none"> Gerrit-Owner: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-Reviewer: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: osmith <osmith@sysmocom.de> </div>