On Fri, Sep 05, 2014 at 11:17:00AM -0400, Ehsan Akhgari wrote:
> Thanks!
>
> So, I can only see three places in rules.mk where we seem to do things in
> libs::, and I cannot find anything else in recursivemake.py or Makefile.in.
> Am I missing something? Or are those three rules the only work to do in a
> new tier?
>
> Also, I'm not really sure where to start from here. I think given the above
> one can create a new tier, but I don't know what things would be safe to
> move into it, etc...
The attached patch will get you started with a new tier. Feel free to
find a better name than "newlibs".
Mike
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
@@ -169,17 +169,17 @@ export:: install-dist/sdk
ifndef JS_STANDALONE
ifdef ENABLE_TESTS
# Additional makefile targets to call automated test suites
include $(topsrcdir)/testing/testsuite-targets.mk
endif
endif
default all::
- $(call BUILDSTATUS,TIERS export $(if $(COMPILE_ENVIRONMENT),compile
)libs tools $(if $(MOZ_AUTOMATION),$(MOZ_AUTOMATION_TIERS)))
+ $(call BUILDSTATUS,TIERS export $(if $(COMPILE_ENVIRONMENT),compile
)newlibs libs tools $(if $(MOZ_AUTOMATION),$(MOZ_AUTOMATION_TIERS)))
include $(topsrcdir)/config/rules.mk
distclean::
$(RM) $(DIST_GARBAGE)
ifeq ($(OS_ARCH),WINNT)
# we want to copy PDB files on Windows
diff --git a/config/recurse.mk b/config/recurse.mk
--- a/config/recurse.mk
+++ b/config/recurse.mk
@@ -27,29 +27,29 @@ endif
# make -C qux
ifeq (.,$(DEPTH))
include root.mk
# Main rules (export, compile, libs and tools) call recurse_* rules.
# This wrapping is only really useful for build status.
-compile libs export tools::
+compile newlibs libs export tools::
$(call BUILDSTATUS,TIER_START $@)
+$(MAKE) recurse_$@
$(call BUILDSTATUS,TIER_FINISH $@)
# Special rule that does install-manifests (cf. Makefile.in) + compile
binaries::
+$(MAKE) recurse_compile
# Carefully avoid $(eval) type of rule generation, which makes pymake slower
# than necessary.
# Get current tier and corresponding subtiers from the data in root.mk.
-CURRENT_TIER := $(filter $(foreach tier,compile libs export
tools,recurse_$(tier) $(tier)-deps),$(MAKECMDGOALS))
+CURRENT_TIER := $(filter $(foreach tier,compile newlibs libs export
tools,recurse_$(tier) $(tier)-deps),$(MAKECMDGOALS))
ifneq (,$(filter-out 0 1,$(words $(CURRENT_TIER))))
$(error $(CURRENT_TIER) not supported on the same make command line)
endif
CURRENT_TIER := $(subst recurse_,,$(CURRENT_TIER:-deps=))
# The rules here are doing directory traversal, so we don't want further
# recursion to happen when running make -C subdir $tier. But some make files
# further call make -C something else, and sometimes expect recursion to
@@ -103,32 +103,32 @@ endif
endif # ifeq ($(CURRENT_TIER),compile)
else
# Don't recurse if MAKELEVEL is NO_RECURSE_MAKELEVEL as defined above
ifeq ($(NO_RECURSE_MAKELEVEL),$(MAKELEVEL))
-compile libs export tools::
+compile newlibs libs export tools::
else
#########################
# Tier traversal handling
#########################
define CREATE_SUBTIER_TRAVERSAL_RULE
.PHONY: $(1)
$(1):: $$(SUBMAKEFILES)
$$(LOOP_OVER_DIRS)
endef
-$(foreach subtier,export libs tools,$(eval $(call
CREATE_SUBTIER_TRAVERSAL_RULE,$(subtier))))
+$(foreach subtier,export newlibs libs tools,$(eval $(call
CREATE_SUBTIER_TRAVERSAL_RULE,$(subtier))))
ifndef TOPLEVEL_BUILD
libs:: target host
endif
endif # ifeq ($(NO_RECURSE_MAKELEVEL),$(MAKELEVEL))
endif # ifeq (.,$(DEPTH))
diff --git a/config/rules.mk b/config/rules.mk
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -543,16 +543,17 @@ endif
# 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
default all::
$(MAKE) export
ifdef COMPILE_ENVIRONMENT
$(MAKE) compile
endif
+ $(MAKE) newlibs
$(MAKE) libs
$(MAKE) tools
ifeq ($(findstring s,$(filter-out --%, $(MAKEFLAGS))),)
ECHO := echo
QUIET :=
else
ECHO := true
diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py
b/python/mozbuild/mozbuild/backend/recursivemake.py
--- a/python/mozbuild/mozbuild/backend/recursivemake.py
+++ b/python/mozbuild/mozbuild/backend/recursivemake.py
@@ -310,16 +310,17 @@ class RecursiveMakeBackend(CommonBackend
'xpidl',
]}
self._traversal = RecursiveMakeTraversal()
self._compile_graph = defaultdict(set)
self._may_skip = {
'export': set(),
+ 'newlibs': set(),
'libs': set(),
}
self._no_skip = {
'tools': set(),
}
def consume_object(self, obj):
"""Write out build files necessary to build with recursive make."""
@@ -522,16 +523,17 @@ class RecursiveMakeBackend(CommonBackend
if current not in self._no_skip['tools'] \
or current.startswith('subtiers/'):
current = None
return current, [], subdirs.dirs + subdirs.tests
filters = [
('export', parallel_filter),
('libs', libs_filter),
+ ('newlibs', parallel_filter),
('tools', tools_filter),
]
root_deps_mk = Makefile()
# Fill the dependencies for traversal of each tier.
for tier, filter in filters:
main, all_deps = \
_______________________________________________
dev-builds mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-builds