[Asterisk-code-review] BuildSystem regression: Fix errors reported by clean targets. (asterisk[13])

George Joseph asteriskteam at digium.com
Mon Mar 12 09:46:01 CDT 2018


George Joseph has submitted this change and it was merged. ( https://gerrit.asterisk.org/8465 )

Change subject: BuildSystem regression: Fix errors reported by clean targets.
......................................................................

BuildSystem regression: Fix errors reported by clean targets.

Doing a 'make clean', 'make distclean', or 'make dist-clean' gets errors
about an invalid shell option: "/bin/sh: 0: Illegal option -".

The clean targets do not include the makeopts file which defines GREP and
LDCONFIG because the file may not exist and the distclean/dist-clean
targets will delete it anyway.

ASTERISK-27715

Change-Id: I33d40acdb03862bc89aeb6fb1ff497894a8ea7f5
---
M Makefile
1 file changed, 15 insertions(+), 5 deletions(-)

Approvals:
  Corey Farrell: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved
  George Joseph: Approved for Submit



diff --git a/Makefile b/Makefile
index c0138db..b7d9814 100644
--- a/Makefile
+++ b/Makefile
@@ -240,7 +240,9 @@
   _ASTCFLAGS+=-Wcast-align -DSOLARIS -I../include/solaris-compat -I/opt/ssl/include -I/usr/local/ssl/include -D_XPG4_2 -D__EXTENSIONS__
 endif
 
-ifneq ($(GREP),:)
+ifeq ($(GREP),)
+else ifeq ($(GREP),:)
+else
   ASTERISKVERSION:=$(shell GREP=$(GREP) AWK=$(AWK) GIT=$(GIT) build_tools/make_version .)
 endif
 ifneq ($(AWK),)
@@ -468,7 +470,9 @@
 		$(INSTALL) -m 644 $$x "$(DESTDIR)$(ASTDATADIR)/rest-api" ; \
 	done
 
-ifneq ($(GREP),:)
+ifeq ($(GREP),)
+else ifeq ($(GREP),:)
+else
   XML_core_en_US = $(foreach dir,$(MOD_SUBDIRS),$(shell $(GREP) -l "language=\"en_US\"" $(dir)/*.c $(dir)/*.cc 2>/dev/null))
 endif
 
@@ -487,7 +491,9 @@
 	@echo
 	@echo "</docs>" >> $@
 
-ifneq ($(GREP),:)
+ifeq ($(GREP),)
+else ifeq ($(GREP),:)
+else
   XML_full_en_US = $(foreach dir,$(MOD_SUBDIRS),$(shell $(GREP) -l "language=\"en_US\"" $(dir)/*.c $(dir)/*.cc 2>/dev/null))
 endif
 
@@ -631,7 +637,9 @@
 	fi
 
 ld-cache-update:
-ifneq ($(LDCONFIG),:)
+ifeq ($(LDCONFIG),)
+else ifeq ($(LDCONFIG),:)
+else
 ifeq ($(DESTDIR),)  # DESTDIR means binary archive creation; ldconfig should be run on postinst
 	@if [ $$(id -u) -eq 0 ] ; then \
 		$(LDCONFIG) "$(ASTLIBDIR)/" ; \
@@ -985,7 +993,9 @@
 	rm -f $(DESTDIR)$(DAHDI_UDEV_HOOK_DIR)/40-asterisk
 endif
 	$(MAKE) -C sounds uninstall
-ifneq ($(LDCONFIG),:)
+ifeq ($(LDCONFIG),)
+else ifeq ($(LDCONFIG),:)
+else
 	$(LDCONFIG) "$(ASTLIBDIR)/" || :
 endif
 

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

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: merged
Gerrit-Change-Id: I33d40acdb03862bc89aeb6fb1ff497894a8ea7f5
Gerrit-Change-Number: 8465
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180312/29f78e25/attachment.html>


More information about the asterisk-code-review mailing list