changeset 49138:67912cbf784a

8199103: Can't use COMPARE_BUILD with PATCH from custom root Reviewed-by: erikj
author ihse
date Tue, 06 Mar 2018 17:43:21 +0100
parents 50f5ea3292f1
children 771616d26ca1
files make/InitSupport.gmk
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/make/InitSupport.gmk	Tue Mar 06 17:30:13 2018 +0100
+++ b/make/InitSupport.gmk	Tue Mar 06 17:43:21 2018 +0100
@@ -435,7 +435,7 @@
   define PrepareCompareBuild
 	$(ECHO) "Preparing for comparison rebuild"
         # Apply patch, if any
-	$(if $(COMPARE_BUILD_PATCH), $(PATCH) -p1 < $(COMPARE_BUILD_PATCH))
+	$(if $(COMPARE_BUILD_PATCH), cd $(topdir) && $(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
@@ -455,7 +455,7 @@
   # 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))
+	$(if $(COMPARE_BUILD_PATCH), cd $(topdir) && $(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)