<p>Joshua Colp <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/18860">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Sean Bright: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Joshua Colp: Approved for Submit

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">build: fix bininstall launchd issue on cross-platform build<br><br>configure script detects /sbin/launchd, but the result of this<br>check is not used in Makefile (bininstall). Makefile also detects<br>/sbin/launchd file to decide if it is required to install<br>safe_asterisk.<br><br>configure script correctly detects cross compile build and sets<br>PBX_LAUNCHD=0<br><br>In case of building asterisk on MacOS host for Linux target using<br>external toolchain (e.g. OpenWrt toolchain), bininstall does not<br>install safe_asterisk (due to /sbin/launchd detection in Makefile),<br>but it is required on target (Linux).<br><br>This patch adds HAVE_SBIN_LAUNCHD=@PBX_LAUNCHD@ to makeopts.in to<br>use the result of /sbin/launchd detection from configure script in<br>Makefile.<br>Also this patch uses HAVE_SBIN_LAUNCHD in Makefile (bininstall) to<br>decide if it is required to install safe_asterisk.<br><br>ASTERISK-29905 #close<br><br>Change-Id: Iff61217276cd188f43f51ef4cdbffe39d9f07f65<br>---<br>M Makefile<br>M makeopts.in<br>2 files changed, 5 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/Makefile b/Makefile</span><br><span>index 2c8fb97..fb06f71 100644</span><br><span>--- a/Makefile</span><br><span>+++ b/Makefile</span><br><span>@@ -561,9 +561,9 @@</span><br><span>  $(INSTALL) -m 755 contrib/scripts/astversion "$(DESTDIR)$(ASTSBINDIR)/"</span><br><span>    $(INSTALL) -m 755 contrib/scripts/astgenkey "$(DESTDIR)$(ASTSBINDIR)/"</span><br><span>     $(INSTALL) -m 755 contrib/scripts/autosupport "$(DESTDIR)$(ASTSBINDIR)/"</span><br><span style="color: hsl(0, 100%, 40%);">-      if [ ! -f /sbin/launchd ]; then \</span><br><span style="color: hsl(0, 100%, 40%);">-               ./build_tools/install_subst contrib/scripts/safe_asterisk "$(DESTDIR)$(ASTSBINDIR)/safe_asterisk"; \</span><br><span style="color: hsl(0, 100%, 40%);">-  fi</span><br><span style="color: hsl(120, 100%, 40%);">+ifneq ($(HAVE_SBIN_LAUNCHD),1)</span><br><span style="color: hsl(120, 100%, 40%);">+    ./build_tools/install_subst contrib/scripts/safe_asterisk "$(DESTDIR)$(ASTSBINDIR)/safe_asterisk";</span><br><span style="color: hsl(120, 100%, 40%);">+endif</span><br><span> </span><br><span> ifneq ($(DISABLE_XMLDOC),yes)</span><br><span>     $(INSTALL) -m 644 doc/core-*.xml "$(DESTDIR)$(ASTDATADIR)/documentation"</span><br><span>diff --git a/makeopts.in b/makeopts.in</span><br><span>index 54eaa04..e99cd50 100644</span><br><span>--- a/makeopts.in</span><br><span>+++ b/makeopts.in</span><br><span>@@ -350,3 +350,5 @@</span><br><span> </span><br><span> BEANSTALK_INCLUDE=@BEANSTALK_INCLUDE@</span><br><span> BEANSTALK_LIB=@BEANSTALK_LIB@</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+HAVE_SBIN_LAUNCHD=@PBX_LAUNCHD@</span><br><span></span><br></pre><div style="white-space:pre-wrap"></div><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/18860">change 18860</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.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.asterisk.org/c/asterisk/+/18860"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 19 </div>
<div style="display:none"> Gerrit-Change-Id: Iff61217276cd188f43f51ef4cdbffe39d9f07f65 </div>
<div style="display:none"> Gerrit-Change-Number: 18860 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean@seanbright.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: Sean Bright <sean@seanbright.com> </div>
<div style="display:none"> Gerrit-CC: Sergey V. Lobanov <sergey@lobanov.in> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>