Followup to 461395 - fix a bug in make 3.80 by avoiding $* in pattern rules with explicit targets, r=ted
authorBenjamin Smedberg <benjamin@smedbergs.us>
Thu, 30 Oct 2008 14:01:44 -0700
changeset 21116 a618c70c87e55c0ce2b759319d1c563bff98f6d5
parent 21115 47c5a9ca37b503d39443c7cb3bfddbb0a1353427
child 21117 fbadbd5149d5c4eeb1d00d8d72e7a29c5237008c
push id3326
push userbsmedberg@mozilla.com
push dateThu, 30 Oct 2008 21:02:12 +0000
treeherdermozilla-central@a618c70c87e5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs461395
milestone1.9.1b2pre
Followup to 461395 - fix a bug in make 3.80 by avoiding $* in pattern rules with explicit targets, r=ted
config/rules.mk
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -695,29 +695,29 @@ ifneq (,$(DIRS)$(TOOL_DIRS)$(PARALLEL_DI
 	+$(LOOP_OVER_PARALLEL_DIRS)
 	+$(LOOP_OVER_DIRS)
 	+$(LOOP_OVER_TOOL_DIRS)
 endif
 
 ifdef PARALLEL_DIRS
 export:: $(PARALLEL_SUBMAKEFILES) | $(PARALLEL_DIRS_export)
 
-$(PARALLEL_DIRS_export):: %_export:
-	+$(MAKE) -C $* export
+$(PARALLEL_DIRS_export):: %_export: %
+	+$(MAKE) -C $< export
 endif
 
 export:: $(SUBMAKEFILES) $(MAKE_DIRS) $(if $(EXPORTS)$(XPIDLSRCS)$(SDK_HEADERS)$(SDK_XPIDLSRCS),$(PUBLIC)) $(if $(SDK_HEADERS)$(SDK_XPIDLSRCS),$(SDK_PUBLIC)) $(if $(XPIDLSRCS),$(IDL_DIR)) $(if $(SDK_XPIDLSRCS),$(SDK_IDL_DIR))
 	+$(LOOP_OVER_DIRS)
 	+$(LOOP_OVER_TOOL_DIRS)
 
 ifdef PARALLEL_DIRS
 tools:: $(PARALLEL_SUBMAKEFILES) | $(PARALLEL_DIRS_tools)
 
-$(PARALLEL_DIRS_tools):: %_tools:
-	+$(MAKE) -C $* tools
+$(PARALLEL_DIRS_tools):: %_tools: %
+	+$(MAKE) -C $< tools
 endif
 
 tools:: $(SUBMAKEFILES) $(MAKE_DIRS)
 	+$(LOOP_OVER_DIRS)
 ifdef TOOL_DIRS
 	@$(EXIT_ON_ERROR) \
 	$(foreach dir,$(TOOL_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) libs; ) true
 endif
@@ -745,18 +745,18 @@ endif # LIBRARY_NAME
 LIBS_DEPS = $(filter %.$(LIB_SUFFIX), $(LIBS))
 HOST_LIBS_DEPS = $(filter %.$(LIB_SUFFIX), $(HOST_LIBS))
 DSO_LDOPTS_DEPS = $(EXTRA_DSO_LIBS) $(filter %.$(LIB_SUFFIX), $(EXTRA_DSO_LDOPTS))
 
 ##############################################
 ifdef PARALLEL_DIRS
 libs:: $(PARALLEL_SUBMAKEFILES) | $(PARALLEL_DIRS_libs)
 
-$(PARALLEL_DIRS_libs):: %_libs:
-	+$(MAKE) -C $* libs
+$(PARALLEL_DIRS_libs):: %_libs: %
+	+$(MAKE) -C $< libs
 endif
 
 libs:: $(SUBMAKEFILES) $(MAKE_DIRS) $(HOST_LIBRARY) $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) $(HOST_PROGRAM) $(PROGRAM) $(HOST_SIMPLE_PROGRAMS) $(SIMPLE_PROGRAMS) $(JAVA_LIBRARY)
 ifndef NO_DIST_INSTALL
 ifdef LIBRARY
 ifdef EXPORT_LIBRARY # Stage libs that will be linked into a static build
 ifdef IS_COMPONENT
 	$(INSTALL) $(IFLAGS1) $(LIBRARY) $(DEPTH)/staticlib/components