<p>osmith has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/13597">View Change</a></p><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, 22 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/97/13597/1</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..b13bda1 100644</span><br><span>--- a/build/Makefile.common.inc</span><br><span>+++ b/build/Makefile.common.inc</span><br><span>@@ -3,12 +3,16 @@</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%);">+# Include 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%);">+</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 +29,17 @@</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: $(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/osmocom/$$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/osmocom/$$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: newchange </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: 1 </div>
<div style="display:none"> Gerrit-Owner: osmith <osmith@sysmocom.de> </div>