<p>Joshua Colp <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/9616">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Kevin Harwell: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved; Approved for Submit

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Build System: Create 'make install-configs' target.<br><br>This target requires specifying CONFIG_SRC=path_to_configs.  This can be<br>used to install custom configs for the Asterisk build while still<br>performing directory replacements on asterisk.conf.<br><br>Modify internal INSTALL_CONFIGS so first argument requires full path to<br>the config sources relative to Asterisk source root.<br><br>Change-Id: Idcd841df3c8d5bfe23d566bb9e2e448e9df4f8ab<br>---<br>M Makefile<br>1 file changed, 12 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 fc53406..72ac710 100644</span><br><span>--- a/Makefile</span><br><span>+++ b/Makefile</span><br><span>@@ -767,7 +767,7 @@</span><br><span> #  (1) the configuration directory to install from</span><br><span> #  (2) the extension to strip off</span><br><span> define INSTALL_CONFIGS</span><br><span style="color: hsl(0, 100%, 40%);">-    @for x in configs/$(1)/*$(2); do \</span><br><span style="color: hsl(120, 100%, 40%);">+    @for x in $(1)/*$(2); do \</span><br><span>           dst="$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x $(2)`"; \</span><br><span>             if [ -f "$${dst}" ]; then \</span><br><span>                        if [ "$(OVERWRITE)" = "y" ]; then \</span><br><span>@@ -803,6 +803,14 @@</span><br><span>       fi</span><br><span> endef</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+install-configs:</span><br><span style="color: hsl(120, 100%, 40%);">+     @if test -z "$(CONFIG_SRC)" -o ! -d "$(CONFIG_SRC)"; then \</span><br><span style="color: hsl(120, 100%, 40%);">+               >&2 echo "CONFIG_SRC must be set to a directory."; \</span><br><span style="color: hsl(120, 100%, 40%);">+         exit 1; \</span><br><span style="color: hsl(120, 100%, 40%);">+     fi</span><br><span style="color: hsl(120, 100%, 40%);">+    @echo "Installing config files from $(CONFIG_SRC)/*$(CONFIG_EXTEN)"</span><br><span style="color: hsl(120, 100%, 40%);">+ $(call INSTALL_CONFIGS,$(CONFIG_SRC),$(CONFIG_EXTEN))</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> # XXX why *.adsi is installed first ?</span><br><span> adsi:</span><br><span>    @echo Installing adsi config files...</span><br><span>@@ -819,7 +827,7 @@</span><br><span> </span><br><span> samples: adsi</span><br><span>     @echo Installing other config files...</span><br><span style="color: hsl(0, 100%, 40%);">-  $(call INSTALL_CONFIGS,samples,.sample)</span><br><span style="color: hsl(120, 100%, 40%);">+       $(call INSTALL_CONFIGS,configs/samples,.sample)</span><br><span>      $(INSTALL) -d "$(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/INBOX"</span><br><span>      build_tools/make_sample_voicemail "$(DESTDIR)/$(ASTDATADIR)" "$(DESTDIR)/$(ASTSPOOLDIR)"</span><br><span>         @for x in phoneprov/*; do \</span><br><span>@@ -842,7 +850,7 @@</span><br><span> </span><br><span> basic-pbx:</span><br><span>  @echo Installing basic-pbx config files...</span><br><span style="color: hsl(0, 100%, 40%);">-      $(call INSTALL_CONFIGS,basic-pbx)</span><br><span style="color: hsl(120, 100%, 40%);">+     $(call INSTALL_CONFIGS,configs/basic-pbx)</span><br><span> </span><br><span> webvmail:</span><br><span>   @[ -d "$(DESTDIR)$(HTTP_DOCSDIR)/" ] || ( printf "http docs directory not found.\nUpdate assignment of variable HTTP_DOCSDIR in Makefile!\n" && exit 1 )</span><br><span>@@ -1112,6 +1120,7 @@</span><br><span>         @find contrib/ast-db-manage/ -name '*.pyc' -delete</span><br><span>   @ALEMBIC=$(ALEMBIC) build_tools/make_check_alembic config cdr voicemail >&2</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+.PHONY: install-configs</span><br><span> .PHONY: menuselect</span><br><span> .PHONY: main</span><br><span> .PHONY: sounds</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/9616">change 9616</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/9616"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Idcd841df3c8d5bfe23d566bb9e2e448e9df4f8ab </div>
<div style="display:none"> Gerrit-Change-Number: 9616 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>