Skip to content

Commit a091e2f

Browse files
committed
8351029: IncludeCustomExtension does not work on cygwin with source code below /home
Reviewed-by: erikj
1 parent 3aa2ea7 commit a091e2f

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

make/PreInit.gmk

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,19 +161,19 @@ ifneq ($(SKIP_SPEC), true)
161161
( cd $(TOPDIR) && \
162162
$(foreach spec, $(SPECS), \
163163
$(MAKE) $(MAKE_INIT_ARGS) -j 1 -f $(TOPDIR)/make/Init.gmk \
164-
SPEC=$(spec) $(MAKE_INIT_MAIN_TARGET_ARGS) \
165-
main && \
164+
SPEC=$(spec) TOPDIR_ALT=$(TOPDIR) \
165+
$(MAKE_INIT_MAIN_TARGET_ARGS) main && \
166166
$(if $(and $(COMPARE_BUILD), $(PARALLEL_TARGETS)), \
167167
$(MAKE) $(MAKE_INIT_ARGS) -f $(TOPDIR)/make/Init.gmk \
168-
SPEC=$(spec) \
168+
SPEC=$(spec) TOPDIR_ALT=$(TOPDIR) \
169169
COMPARE_BUILD="$(COMPARE_BUILD)" \
170170
pre-compare-build && \
171171
$(MAKE) $(MAKE_INIT_ARGS) -j 1 -f $(TOPDIR)/make/Init.gmk \
172-
SPEC=$(spec) $(MAKE_INIT_MAIN_TARGET_ARGS) \
172+
SPEC=$(spec) TOPDIR_ALT=$(TOPDIR) \
173173
COMPARE_BUILD="$(COMPARE_BUILD):NODRYRUN=true" \
174-
main && \
174+
$(MAKE_INIT_MAIN_TARGET_ARGS) main && \
175175
$(MAKE) $(MAKE_INIT_ARGS) -f $(TOPDIR)/make/Init.gmk \
176-
SPEC=$(spec) \
176+
SPEC=$(spec) TOPDIR_ALT=$(TOPDIR) \
177177
COMPARE_BUILD="$(COMPARE_BUILD):NODRYRUN=true" \
178178
post-compare-build && \
179179
) \

make/PreInitSupport.gmk

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,13 +250,14 @@ endef
250250
# Param 1: FORCE = force generation of main-targets.gmk or LAZY = do not force.
251251
# Param 2: The SPEC file to use.
252252
define DefineMainTargets
253+
SPEC_FILE := $(strip $2)
253254

254255
# We will start by making sure the main-targets.gmk file is removed, if
255256
# make has not been restarted. By the -include, we will trigger the
256257
# rule for generating the file (which is never there since we removed it),
257258
# thus generating it fresh, and make will restart, incrementing the restart
258259
# count.
259-
main_targets_file := $$(dir $(strip $2))make-support/main-targets.gmk
260+
main_targets_file := $$(dir $$(SPEC_FILE))make-support/main-targets.gmk
260261

261262
ifeq ($$(MAKE_RESTARTS), )
262263
# Only do this if make has not been restarted, and if we do not force it.
@@ -268,10 +269,10 @@ define DefineMainTargets
268269
$$(main_targets_file):
269270
@( cd $$(TOPDIR) && \
270271
$$(MAKE) $$(MAKE_LOG_FLAGS) -r -R -f $$(TOPDIR)/make/GenerateFindTests.gmk \
271-
-I $$(TOPDIR)/make/common SPEC=$(strip $2) )
272+
-I $$(TOPDIR)/make/common SPEC=$$(SPEC_FILE) TOPDIR_ALT=$$(TOPDIR))
272273
@( cd $$(TOPDIR) && \
273274
$$(MAKE) $$(MAKE_LOG_FLAGS) -r -R -f $$(TOPDIR)/make/Main.gmk \
274-
-I $$(TOPDIR)/make/common SPEC=$(strip $2) NO_RECIPES=true \
275+
-I $$(TOPDIR)/make/common SPEC=$$(SPEC_FILE) TOPDIR_ALT=$$(TOPDIR) NO_RECIPES=true \
275276
$$(MAKE_LOG_VARS) \
276277
create-main-targets-include )
277278

make/common/MakeFileStart.gmk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ endif
4747
# We need spec.gmk to get $(TOPDIR)
4848
include $(SPEC)
4949

50-
THIS_MAKEFILE := $(patsubst make/%,%,$(patsubst $(TOPDIR)/%,%,$(THIS_MAKEFILE_PATH)))
50+
THIS_MAKEFILE := $(patsubst make/%,%,$(patsubst $(TOPDIR_ALT)/make/%,%,$(patsubst $(TOPDIR)/%,%,$(THIS_MAKEFILE_PATH))))
5151

5252
ifeq ($(LOG_FLOW), true)
5353
$(info :Enter $(THIS_MAKEFILE))

make/common/MakeIncludeStart.gmk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
# Get the next to last word (by prepending a padding element)
3131
THIS_INCLUDE_PATH := $(word $(words ${MAKEFILE_LIST}),padding ${MAKEFILE_LIST})
32-
THIS_INCLUDE := $(patsubst $(TOPDIR)/make/%,%,$(THIS_INCLUDE_PATH))
32+
THIS_INCLUDE := $(patsubst $(TOPDIR_ALT)/make/%,%,$(patsubst $(TOPDIR)/make/%,%,$(THIS_INCLUDE_PATH)))
3333

3434
# Print an indented message, also counting the top-level makefile as a level
3535
ifneq ($(INCLUDE_GUARD_$(THIS_INCLUDE)), true)

0 commit comments

Comments
 (0)