[asterisk-commits] Change in asterisk[master]: Build System: Enable use of ~/.asterisk.makeopts and /etc/as...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Apr 15 21:26:24 CDT 2015


Matt Jordan has submitted this change and it was merged.

Change subject: Build System: Enable use of ~/.asterisk.makeopts and /etc/asterisk.makeopts.
......................................................................


Build System: Enable use of ~/.asterisk.makeopts and /etc/asterisk.makeopts.

The Makefile claims that you can set default menuselect options by creating
~/.asterisk.makeopts or /etc/asterisk.makeopts, but they are never read.
The rule for menuselect.makeopts is only allowed to run if the active target
is 'menuselect', but the menuselect target doesn't depend on
menuselect.makeopts.  A dot (wildcard character) was added so the rule will
be active for the targets that cause it to run: nmenuselect, cmenuselect,
and gmenuselect.

ASTERISK-13271 #close
Reported by: John Nemeth

Change-Id: Ibde804ff196283def49ccb9432fbf224a22586e2
---
M Makefile
1 file changed, 9 insertions(+), 3 deletions(-)

Approvals:
  Matt Jordan: Looks good to me, approved; Verified



diff --git a/Makefile b/Makefile
index c2e1fba..15e21b6 100644
--- a/Makefile
+++ b/Makefile
@@ -160,8 +160,14 @@
 # The file /etc/asterisk.makeopts will also be included but can be overridden
 # by the file in your home directory.
 
-GLOBAL_MAKEOPTS=$(wildcard /etc/asterisk.makeopts)
-USER_MAKEOPTS=$(wildcard ~/.asterisk.makeopts)
+ifeq ($(wildcard menuselect.makeopts),)
+	USER_MAKEOPTS=$(wildcard ~/.asterisk.makeopts)
+	GLOBAL_MAKEOPTS=$(wildcard /etc/asterisk.makeopts)
+else
+	USER_MAKEOPTS=
+	GLOBAL_MAKEOPTS=
+endif
+
 
 MOD_SUBDIR_CFLAGS="-I$(ASTTOPDIR)/include"
 OTHER_SUBDIR_CFLAGS="-I$(ASTTOPDIR)/include"
@@ -333,7 +339,7 @@
 	@exit 1
 
 menuselect.makeopts: menuselect/menuselect menuselect-tree makeopts build_tools/menuselect-deps $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS)
-ifeq ($(filter %menuselect,$(MAKECMDGOALS)),)
+ifeq ($(filter %.menuselect,$(MAKECMDGOALS)),)
 	menuselect/menuselect --check-deps $@
 	menuselect/menuselect --check-deps $@ $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS)
 endif

-- 
To view, visit https://gerrit.asterisk.org/110
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibde804ff196283def49ccb9432fbf224a22586e2
Gerrit-PatchSet: 3
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>



More information about the asterisk-commits mailing list