Commit 5bd398d3 authored by Juan Manuel Cruz Alcaraz's avatar Juan Manuel Cruz Alcaraz Committed by Anas Nashif
Browse files

win-build: Fixes Makefile target names including char ":"



The build system uses absolute path names to generate
target names. In Windows, absolute path names include the
character ":".
Makefile does not support target names with the character ":"
on them.
The target names involved are PHONY. The commit modifies the
Makefile logic to not include directory names in zephyr-app-dirs
and clean-dirs targets.

Jira: ZEP-517

Change-Id: I37b62f04b8bc6bffbbc19e0e4fd2a827347e5cbd
Signed-off-by: default avatarJuan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
parent 2bf22ae0
Loading
Loading
Loading
Loading
+11 −13
Original line number Diff line number Diff line
@@ -739,14 +739,13 @@ export KBUILD_IMAGE ?= zephyr

zephyr-dirs	:= $(patsubst %/,%,$(filter %/, $(core-y) $(drivers-y) \
		     $(libs-y)))
zephyr-app-dir-root := $(abspath $(patsubst %, %/.., $(SOURCE_DIR)))

zephyr-app-dirs	:= $(SOURCE_DIR)

zephyr-alldirs	:= $(sort $(zephyr-dirs) $(zephyr-app-dirs) $(patsubst %/,%,$(filter %/, \
zephyr-alldirs	:= $(sort $(zephyr-dirs) $(SOURCE_DIR) $(patsubst %/,%,$(filter %/, \
		     $(core-) $(drivers-) $(libs-) $(app-))))

core-y		:= $(patsubst %/, %/built-in.o, $(core-y))
app-y		:= $(patsubst %, %/built-in.o, $(notdir $(zephyr-app-dirs)))
app-y		:= $(patsubst %, %/built-in.o, $(notdir $(SOURCE_DIR)))
drivers-y	:= $(patsubst %/, %/built-in.o, $(drivers-y))
libs-y1		:= $(patsubst %/, %/lib.a, $(libs-y))
libs-y2		:= $(patsubst %/, %/built-in.o, $(libs-y))
@@ -883,7 +882,7 @@ zephyr: $(zephyr-deps) $(KERNEL_BIN_NAME)

# The actual objects are generated when descending,
# make sure no implicit rule kicks in
$(sort $(zephyr-deps)): $(zephyr-dirs) $(zephyr-app-dirs) ;
$(sort $(zephyr-deps)): $(zephyr-dirs) zephyr-app-dir ;

# Handle descending into subdirectories listed in $(zephyr-dirs)
# Preset locale variables to speed up the build process. Limit locale
@@ -895,10 +894,9 @@ PHONY += $(zephyr-dirs)
$(zephyr-dirs): prepare scripts
	$(Q)$(MAKE) $(build)=$@

PHONY += $(zephyr-app-dirs)
$(zephyr-app-dirs): zephyr-app-dir-root = $(abspath $(patsubst %, %/.., $@))
$(zephyr-app-dirs): prepare scripts
	$(Q)$(MAKE) $(build)=$(@F) srctree=$(zephyr-app-dir-root)
PHONY += zephyr-app-dir
zephyr-app-dir: prepare scripts
	$(Q)$(MAKE) $(build)=$(notdir $(SOURCE_DIR)) srctree=$(zephyr-app-dir-root)

# Things we need to do before we recursively start building the kernel
# or the modules are listed in "prepare".
@@ -1019,9 +1017,9 @@ clean: rm-dirs := $(CLEAN_DIRS)
clean: rm-files := $(CLEAN_FILES)
clean-dirs      := $(addprefix _clean_, . $(zephyr-alldirs) )

PHONY += $(clean-dirs) clean archclean zephyrclean
$(clean-dirs):
	$(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)
PHONY += clean-dirs-target clean archclean zephyrclean
clean-dirs-target:
	$(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$(clean-dirs))

clean: archclean

@@ -1134,7 +1132,7 @@ $(help-board-dirs): help-%:
%docs: FORCE
	$(Q)$(MAKE) -C doc htmldocs

clean: $(clean-dirs)
clean: clean-dirs-target
	$(call cmd,rmdirs)
	$(call cmd,rmfiles)
	@find $(if $(KBUILD_EXTMOD), $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \