intl/icu-patches/bug-1198952-workaround-make-3.82-bug.diff
author Mike Hommey <mh+mozilla@glandium.org>
Thu, 04 Feb 2016 13:40:10 +0900
changeset 283076 ef28fb13dc0b8044567120e3eb9619a9f9a48339
parent 272059 58611d7d0dcbc323e5383dd27f6f37517c6d5d07
child 366642 e7bbd7e18b1af8ee082c9b894115e3c0ddd151fb
permissions -rw-r--r--
Bug 1245763 - Group sources and linkables handling function cals in mozbuild.emitter. r=gps

diff --git a/intl/icu/source/Makefile.in b/intl/icu/source/Makefile.in
index 9db6c52..1b9a964 100644
--- a/intl/icu/source/Makefile.in
+++ b/intl/icu/source/Makefile.in
@@ -134,28 +134,32 @@ endif
 
 LOCAL_SUBDIRS = $(SUBDIRS)
 CLEAN_FIRST_SUBDIRS = $(TOOLS)
 
 $(LIBDIR) $(BINDIR):
 	-$(MKINSTALLDIRS) $@
 
 ## Recursive targets
+## Strictly speaking, the $(MAKEOVERRIDES) is not necessary when recursing, but
+## there is a bug in GNU make 3.82 that throws away the original overrides in
+## favor of RECURSIVE=YES when the submake in the subdirectory restarts itself
+## after dependency files have been created.
 all-recursive install-recursive clean-recursive distclean-recursive dist-recursive check-recursive check-exhaustive-recursive: $(LIBDIR) $(BINDIR)
 	@dot_seen=no; \
 	target=`echo $@ | sed s/-recursive//`; \
 	list='$(LOCAL_SUBDIRS)'; for subdir in $$list; do \
 	  echo "$(MAKE)[$(MAKELEVEL)]: Making \`$$target' in \`$$subdir'"; \
 	  if test "$$subdir" = "."; then \
 	    dot_seen=yes; \
 	    local_target="$$target-local"; \
 	  else \
 	    local_target="$$target"; \
 	  fi; \
-	  (cd $$subdir && $(MAKE) RECURSIVE=YES $$local_target) || exit; \
+	  (cd $$subdir && $(MAKE) $(MAKEOVERRIDES) RECURSIVE=YES $$local_target) || exit; \
 	done; \
 	if test "$$dot_seen" = "no"; then \
 	  $(MAKE) "$$target-local" || exit; \
 	fi
 
 clean-recursive-with-twist:
 	$(MAKE) clean-recursive LOCAL_SUBDIRS='$(CLEAN_FIRST_SUBDIRS) $(filter-out $(CLEAN_FIRST_SUBDIRS),$(LOCAL_SUBDIRS))'