Bug 913967: port Bug 912856 to comm-central to fix bustage, r=Standard8, a=bustage-fix.
authorJoshua Cranmer <Pidgeot18@gmail.com>
Fri, 06 Sep 2013 13:18:07 -0500
changeset 13005 f4c921623a74e0751c182a054b28935f64182d14
parent 13004 baed3587d7917d5c29e53dda3718e0fe23ed116f
child 13006 adbc208dc6089b00fe88aa58cd3480da3a969c03
push id9480
push userPidgeot18@gmail.com
push dateMon, 09 Sep 2013 15:38:44 +0000
treeherdercomm-central@adbc208dc608 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersStandard8, bustage-fix
bugs913967, 912856
Bug 913967: port Bug 912856 to comm-central to fix bustage, r=Standard8, a=bustage-fix.
bridge/bridge.mozbuild
config/recurse.mk
config/rules.mk
ldap/Makefile.in
ldap/moz.build
--- a/bridge/bridge.mozbuild
+++ b/bridge/bridge.mozbuild
@@ -4,16 +4,16 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 mailnews_dirs = []
 mailnews_static_dirs = []
 
 mailnews_dirs += ['../mozilla/xpfe/components/autocomplete']
 
 if CONFIG['MOZ_LDAP_XPCOM']:
-    mailnews_static_dirs += ['../ldap/sdks/c-sdk']
+    mailnews_dirs += ['../ldap']
     mailnews_dirs += ['../ldap/xpcom']
 
 if CONFIG['MOZ_MORK']:
     mailnews_dirs += ['../db']
 
 mailnews_dirs += ['../mailnews']
 
--- a/config/recurse.mk
+++ b/config/recurse.mk
@@ -5,16 +5,29 @@
 ifndef INCLUDED_RULES_MK
 include $(topsrcdir)/config/rules.mk
 endif
 
 #########################
 # Tier traversal handling
 #########################
 
+ifdef TIERS
+
+compile libs export tools::
+	$(call BUILDSTATUS,TIER_START $@ $(filter-out $(if $(filter export,$@),,precompile),$(TIERS)))
+	$(foreach tier,$(TIERS), $(if $(filter-out compile_precompile libs_precompile tools_precompile,$@_$(tier)), \
+		$(call BUILDSTATUS,SUBTIER_START $@ $(tier) $(if $(filter libs,$@),$(tier_$(tier)_staticdirs)) $(tier_$(tier)_dirs)) \
+		$(if $(filter libs,$@),$(foreach dir, $(tier_$(tier)_staticdirs), $(call TIER_DIR_SUBMAKE,$@,$(tier),$(dir),,1))) \
+		$(foreach dir, $(tier_$(tier)_dirs), $(call TIER_DIR_SUBMAKE,$@,$(tier),$(dir),$@)) \
+		$(call BUILDSTATUS,SUBTIER_FINISH $@ $(tier))))
+	$(call BUILDSTATUS,TIER_FINISH $@)
+
+else
+
 define CREATE_SUBTIER_TRAVERSAL_RULE
 PARALLEL_DIRS_$(1) = $$(addsuffix _$(1),$$(PARALLEL_DIRS))
 
 .PHONY: $(1) $$(PARALLEL_DIRS_$(1))
 
 ifdef PARALLEL_DIRS
 $$(PARALLEL_DIRS_$(1)): %_$(1): %/Makefile
 	+@$$(call SUBMAKE,$(1),$$*)
@@ -23,15 +36,17 @@ endif
 $(1):: $$(SUBMAKEFILES)
 ifdef PARALLEL_DIRS
 	+@$(MAKE) $$(PARALLEL_DIRS_$(1))
 endif
 	$$(LOOP_OVER_DIRS)
 
 endef
 
-$(foreach subtier,export libs tools,$(eval $(call CREATE_SUBTIER_TRAVERSAL_RULE,$(subtier))))
+$(foreach subtier,export compile libs tools,$(eval $(call CREATE_SUBTIER_TRAVERSAL_RULE,$(subtier))))
 
-export:: $(SUBMAKEFILES)
+compile export:: $(SUBMAKEFILES)
 	$(LOOP_OVER_TOOL_DIRS)
 
 tools:: $(SUBMAKEFILES)
 	$(foreach dir,$(TOOL_DIRS),$(call SUBMAKE,libs,$(dir)))
+
+endif
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -629,37 +629,29 @@ endif
 #   This is used to update or create the Makefiles before invoking them.
 SUBMAKEFILES += $(addsuffix /Makefile, $(DIRS) $(TOOL_DIRS) $(PARALLEL_DIRS))
 
 # The root makefile doesn't want to do a plain export/libs, because
 # of the tiers and because of libxul. Suppress the default rules in favor
 # of something else. Makefiles which use this var *must* provide a sensible
 # default rule before including rules.mk
 ifndef SUPPRESS_DEFAULT_RULES
-ifdef TIERS
-default all alldep::
-	$(foreach tier,$(TIERS),$(call SUBMAKE,tier_$(tier)))
-else
-
 default all::
-ifneq (,$(strip $(STATIC_DIRS)))
-	$(foreach dir,$(STATIC_DIRS),$(call SUBMAKE,,$(dir)))
-endif
 	$(MAKE) export
+	$(MAKE) compile
 	$(MAKE) libs
 	$(MAKE) tools
 
 # Do depend as well
 alldep::
 	$(MAKE) export
 	$(MAKE) depend
 	$(MAKE) libs
 	$(MAKE) tools
 
-endif # TIERS
 endif # SUPPRESS_DEFAULT_RULES
 
 ifeq ($(filter s,$(MAKEFLAGS)),)
 ECHO := echo
 QUIET :=
 else
 ECHO := true
 QUIET := -q
@@ -725,22 +717,17 @@ HOST_LIBS_DEPS = $(filter %.$(LIB_SUFFIX
 
 # Dependencies which, if modified, should cause everything to rebuild
 GLOBAL_DEPS += Makefile $(DEPTH)/config/autoconf.mk $(topsrcdir)/config/config.mk
 ifndef NO_MAKEFILE_RULE
 GLOBAL_DEPS += Makefile.in
 endif
 
 ##############################################
-ifdef PARALLEL_DIRS
-libs:: $(PARALLEL_DIRS_libs)
-
-$(PARALLEL_DIRS_libs): %_libs: %/Makefile
-	+@$(call SUBMAKE,libs,$*)
-endif
+compile:: $(MAKE_DIRS) $(OBJS) $(HOST_OBJS)
 
 ifdef EXPORT_LIBRARY
 ifeq ($(EXPORT_LIBRARY),1)
 ifdef IS_COMPONENT
 EXPORT_LIBRARY = $(MOZDEPTH)/staticlib/components
 else
 EXPORT_LIBRARY = $(MOZDEPTH)/staticlib
 endif
@@ -794,17 +781,16 @@ ifdef HOST_PROGRAM
 endif
 ifdef HOST_SIMPLE_PROGRAMS
 	$(call install_cmd,$(IFLAGS2) $(HOST_SIMPLE_PROGRAMS) $(DIST)/host/bin)
 endif
 ifdef HOST_LIBRARY
 	$(call install_cmd,$(IFLAGS1) $(HOST_LIBRARY) $(DIST)/host/lib)
 endif
 endif # !NO_DIST_INSTALL
-	$(LOOP_OVER_DIRS)
 
 ##############################################
 
 ifndef NO_PROFILE_GUIDED_OPTIMIZE
 ifdef MOZ_PROFILE_USE
 ifeq ($(OS_ARCH)_$(GNU_CC), WINNT_)
 # When building with PGO, we have to make sure to re-link
 # in the MOZ_PROFILE_USE phase if we linked in the
new file mode 100644
--- /dev/null
+++ b/ldap/Makefile.in
@@ -0,0 +1,7 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+libs export clean distclean::
+	$(MAKE) -C $(DEPTH)/ldap/sdks/c-sdk $@
+
new file mode 100644
--- /dev/null
+++ b/ldap/moz.build
@@ -0,0 +1,5 @@
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+