< prev index next >

make/InitSupport.gmk

Print this page

        

*** 359,368 **** --- 359,374 ---- BUILD_LOG := $(OUTPUTDIR)/build.log BUILD_PROFILE_LOG := $(OUTPUTDIR)/build-profile.log BUILD_LOG_PIPE := > >($(TEE) -a $(BUILD_LOG)) 2> >($(TEE) -a $(BUILD_LOG) >&2) && wait + ifneq ($(CUSTOM_ROOT), ) + topdir=$(CUSTOM_ROOT) + else + topdir=$(TOPDIR) + endif + # Parse COMPARE_BUILD into COMPARE_BUILD_* # Syntax: COMPARE_BUILD=CONF=<configure options>:PATCH=<patch file>: # MAKE=<make targets>:COMP_OPTS=<compare script options>: # COMP_DIR=<compare script base dir>|<default>: # FAIL=<bool>
*** 371,381 **** # MAKE and COMP_OPTS can only be used with CONF and/or PATCH specified. # If any value contains "+", it will be replaced by space. # FAIL can be set to false to have the return value of compare be ignored. define ParseCompareBuild ifneq ($$(COMPARE_BUILD), ) ! COMPARE_BUILD_OUTPUTDIR := $(TOPDIR)/build/compare-build/$(CONF_NAME) COMPARE_BUILD_FAIL := true ifneq ($$(findstring :, $$(COMPARE_BUILD)), ) $$(foreach part, $$(subst :, , $$(COMPARE_BUILD)), \ $$(if $$(filter PATCH=%, $$(part)), \ --- 377,387 ---- # MAKE and COMP_OPTS can only be used with CONF and/or PATCH specified. # If any value contains "+", it will be replaced by space. # FAIL can be set to false to have the return value of compare be ignored. define ParseCompareBuild ifneq ($$(COMPARE_BUILD), ) ! COMPARE_BUILD_OUTPUTDIR := $(topdir)/build/compare-build/$(CONF_NAME) COMPARE_BUILD_FAIL := true ifneq ($$(findstring :, $$(COMPARE_BUILD)), ) $$(foreach part, $$(subst :, , $$(COMPARE_BUILD)), \ $$(if $$(filter PATCH=%, $$(part)), \
*** 410,422 **** # Otherwise assume patch file COMPARE_BUILD_PATCH=$$(strip $$(COMPARE_BUILD)) endif endif ifneq ($$(COMPARE_BUILD_PATCH), ) ! ifneq ($$(wildcard $$(TOPDIR)/$$(COMPARE_BUILD_PATCH)), ) # Assume relative path, if file exists ! COMPARE_BUILD_PATCH := $$(wildcard $$(TOPDIR)/$$(COMPARE_BUILD_PATCH)) else ifeq ($$(wildcard $$(COMPARE_BUILD_PATCH)), ) $$(error Patch file $$(COMPARE_BUILD_PATCH) does not exist) endif endif ifneq ($$(COMPARE_BUILD_FAIL), true) --- 416,428 ---- # Otherwise assume patch file COMPARE_BUILD_PATCH=$$(strip $$(COMPARE_BUILD)) endif endif ifneq ($$(COMPARE_BUILD_PATCH), ) ! ifneq ($$(wildcard $$(topdir)/$$(COMPARE_BUILD_PATCH)), ) # Assume relative path, if file exists ! COMPARE_BUILD_PATCH := $$(wildcard $$(topdir)/$$(COMPARE_BUILD_PATCH)) else ifeq ($$(wildcard $$(COMPARE_BUILD_PATCH)), ) $$(error Patch file $$(COMPARE_BUILD_PATCH) does not exist) endif endif ifneq ($$(COMPARE_BUILD_FAIL), true)
*** 429,462 **** define PrepareCompareBuild $(ECHO) "Preparing for comparison rebuild" # Apply patch, if any $(if $(COMPARE_BUILD_PATCH), $(PATCH) -p1 < $(COMPARE_BUILD_PATCH)) # Move the first build away temporarily ! $(RM) -r $(TOPDIR)/build/.compare-build-temp ! $(MKDIR) -p $(TOPDIR)/build/.compare-build-temp ! $(MV) $(OUTPUTDIR) $(TOPDIR)/build/.compare-build-temp # Restore an old compare-build, or create a new compare-build directory. if test -d $(COMPARE_BUILD_OUTPUTDIR); then \ $(MV) $(COMPARE_BUILD_OUTPUTDIR) $(OUTPUTDIR); \ else \ $(MKDIR) -p $(OUTPUTDIR); \ fi # Re-run configure with the same arguments (and possibly some additional), # must be done after patching. ( cd $(OUTPUTDIR) && PATH="$(ORIGINAL_PATH)" \ ! $(BASH) $(TOPDIR)/configure $(CONFIGURE_COMMAND_LINE) $(COMPARE_BUILD_CONF)) endef # Cleanup after a compare build define CleanupCompareBuild # If running with a COMPARE_BUILD patch, reverse-apply it $(if $(COMPARE_BUILD_PATCH), $(PATCH) -R -p1 < $(COMPARE_BUILD_PATCH)) # Move this build away and restore the original build ! $(MKDIR) -p $(TOPDIR)/build/compare-build $(MV) $(OUTPUTDIR) $(COMPARE_BUILD_OUTPUTDIR) ! $(MV) $(TOPDIR)/build/.compare-build-temp/$(CONF_NAME) $(OUTPUTDIR) ! $(RM) -r $(TOPDIR)/build/.compare-build-temp endef # Do the actual comparison of two builds define CompareBuildDoComparison # Compare first and second build. Ignore any error code from compare.sh. --- 435,468 ---- define PrepareCompareBuild $(ECHO) "Preparing for comparison rebuild" # Apply patch, if any $(if $(COMPARE_BUILD_PATCH), $(PATCH) -p1 < $(COMPARE_BUILD_PATCH)) # Move the first build away temporarily ! $(RM) -r $(topdir)/build/.compare-build-temp ! $(MKDIR) -p $(topdir)/build/.compare-build-temp ! $(MV) $(OUTPUTDIR) $(topdir)/build/.compare-build-temp # Restore an old compare-build, or create a new compare-build directory. if test -d $(COMPARE_BUILD_OUTPUTDIR); then \ $(MV) $(COMPARE_BUILD_OUTPUTDIR) $(OUTPUTDIR); \ else \ $(MKDIR) -p $(OUTPUTDIR); \ fi # Re-run configure with the same arguments (and possibly some additional), # must be done after patching. ( cd $(OUTPUTDIR) && PATH="$(ORIGINAL_PATH)" \ ! $(BASH) $(topdir)/configure $(CONFIGURE_COMMAND_LINE) $(COMPARE_BUILD_CONF)) endef # Cleanup after a compare build define CleanupCompareBuild # If running with a COMPARE_BUILD patch, reverse-apply it $(if $(COMPARE_BUILD_PATCH), $(PATCH) -R -p1 < $(COMPARE_BUILD_PATCH)) # Move this build away and restore the original build ! $(MKDIR) -p $(topdir)/build/compare-build $(MV) $(OUTPUTDIR) $(COMPARE_BUILD_OUTPUTDIR) ! $(MV) $(topdir)/build/.compare-build-temp/$(CONF_NAME) $(OUTPUTDIR) ! $(RM) -r $(topdir)/build/.compare-build-temp endef # Do the actual comparison of two builds define CompareBuildDoComparison # Compare first and second build. Ignore any error code from compare.sh.
< prev index next >