[asterisk-commits] build system: Prevent goals needing makeopts from running wh... (asterisk[master])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Jan 29 08:06:22 CST 2016
Joshua Colp has submitted this change and it was merged.
Change subject: build_system: Prevent goals needing makeopts from running when it's missing
......................................................................
build_system: Prevent goals needing makeopts from running when it's missing
The Makefile only optionally includes makeopts so when goals like uninstall that
dont depend on anything else are run after a distclean, rules like
'rm -f "$(DESTDIR)$(ASTMODDIR)/"*' get run as 'rm -f ""/*' which attempts
to remove everything in the root directory.
Although there's a rule defined for makeopts which prints a message and does
an 'exit 1', since '-include makepopts' was specified (with the -), the exit
was ignored letting the rest of the rules run.
This patch makes makeopts required unless the goal has the string 'clean' in it.
ASTERISK-25730 #close
Reported-by: George Joseph
Change-Id: I1bce59a7ea4f48e7a468e22b2abbb13c63417ac7
---
M Makefile
1 file changed, 4 insertions(+), 1 deletion(-)
Approvals:
Richard Mudgett: Looks good to me, but someone else must approve
Anonymous Coward #1000019: Verified
Joshua Colp: Looks good to me, approved
diff --git a/Makefile b/Makefile
index b1de3d2..a07a329 100644
--- a/Makefile
+++ b/Makefile
@@ -100,7 +100,10 @@
export LDCONFIG_FLAGS
export PYTHON
--include makeopts
+# makeopts is required unless the goal is clean or distclean
+ifeq ($(findstring clean,$(MAKECMDGOALS)),)
+include makeopts
+endif
# start the primary CFLAGS and LDFLAGS with any that were provided
# to the configure script
--
To view, visit https://gerrit.asterisk.org/2099
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I1bce59a7ea4f48e7a468e22b2abbb13c63417ac7
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
More information about the asterisk-commits
mailing list