Skip to content

Commit

Permalink
8248488: JDK-8246484 actually broke COMPARE_BUILD
Browse files Browse the repository at this point in the history
Reviewed-by: erikj
  • Loading branch information
magicus committed Jun 29, 2020
1 parent 5a6954a commit 682e836
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion make/Init.gmk
Expand Up @@ -197,7 +197,7 @@ ifeq ($(HAS_SPEC),)
COMPARE_BUILD="$(COMPARE_BUILD)" pre-compare-build && \
$(MAKE) $(MFLAGS) $(MAKE_LOG_FLAGS) -r -R -j 1 -f $(topdir)/make/Init.gmk \
SPEC=$(spec) HAS_SPEC=true $(MAKE_INIT_WITH_SPEC_ARGUMENTS) \
COMPARE_BUILD="$(COMPARE_BUILD)" main && \
COMPARE_BUILD="$(COMPARE_BUILD):NODRYRUN=true" main && \
$(MAKE) $(MFLAGS) $(MAKE_LOG_FLAGS) -r -R -f $(topdir)/make/Init.gmk \
SPEC=$(spec) HAS_SPEC=true ACTUAL_TOPDIR=$(topdir) \
COMPARE_BUILD="$(COMPARE_BUILD)" post-compare-build && \
Expand Down
11 changes: 8 additions & 3 deletions make/InitSupport.gmk
Expand Up @@ -350,6 +350,9 @@ else # $(HAS_SPEC)=true
$$(if $$(filter FAIL=%, $$(part)), \
$$(eval COMPARE_BUILD_FAIL=$$(strip $$(subst +, , $$(patsubst FAIL=%, %, $$(part))))) \
) \
$$(if $$(filter NODRYRUN=%, $$(part)), \
$$(eval COMPARE_BUILD_NODRYRUN=$$(strip $$(subst +, , $$(patsubst NODRYRUN=%, %, $$(part))))) \
) \
)
else
# Separate handling for single field case, to allow for spaces in values.
Expand All @@ -372,9 +375,11 @@ else # $(HAS_SPEC)=true
else ifeq ($$(wildcard $$(COMPARE_BUILD_PATCH)), )
$$(error Patch file $$(COMPARE_BUILD_PATCH) does not exist)
endif
PATCH_DRY_RUN := $$(shell cd $$(topdir) && $$(PATCH) --dry-run -p1 < $$(COMPARE_BUILD_PATCH) > /dev/null 2>&1 || $$(ECHO) FAILED)
ifeq ($$(PATCH_DRY_RUN), FAILED)
$$(error Patch file $$(COMPARE_BUILD_PATCH) does not apply cleanly)
ifneq ($$(COMPARE_BUILD_NODRYRUN), true)
PATCH_DRY_RUN := $$(shell cd $$(topdir) && $$(PATCH) --dry-run -p1 < $$(COMPARE_BUILD_PATCH) > /dev/null 2>&1 || $$(ECHO) FAILED)
ifeq ($$(PATCH_DRY_RUN), FAILED)
$$(error Patch file $$(COMPARE_BUILD_PATCH) does not apply cleanly)
endif
endif
endif
ifneq ($$(COMPARE_BUILD_FAIL), true)
Expand Down

0 comments on commit 682e836

Please sign in to comment.