tools/Unix.mk:Security Checks and Windows Native Compilation Enhancements
Avoid splicing paths to /include when BOARD_COMMON_DIR does not exist and enhanced Windows native compilation Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
This commit is contained in:
parent
e4b561d51b
commit
eee3af93ff
@ -283,7 +283,9 @@ include/arch:
|
||||
|
||||
LINK_INCLUDE_DIR=$(BOARD_DIR)/include
|
||||
ifeq ($(wildcard $(LINK_INCLUDE_DIR)),)
|
||||
LINK_INCLUDE_DIR = $(BOARD_COMMON_DIR)/include
|
||||
ifneq ($(strip $(BOARD_COMMON_DIR)),)
|
||||
LINK_INCLUDE_DIR = $(BOARD_COMMON_DIR)/include
|
||||
endif
|
||||
endif
|
||||
|
||||
include/arch/board: | include/arch
|
||||
|
10
tools/Win.mk
10
tools/Win.mk
@ -264,10 +264,18 @@ include\arch:
|
||||
$(Q) $(DIRLINK) $(TOPDIR)\$(ARCH_DIR)\include $@
|
||||
|
||||
# Link the boards\<arch>\<chip>\<board>\include directory to include\arch\board
|
||||
# If the above path does not exist, then we try to link to common
|
||||
|
||||
LINK_INCLUDE_DIR=$(BOARD_DIR)/include
|
||||
ifeq ($(wildcard $(LINK_INCLUDE_DIR)),)
|
||||
ifneq ($(strip $(BOARD_COMMON_DIR)),)
|
||||
LINK_INCLUDE_DIR = $(BOARD_COMMON_DIR)/include
|
||||
endif
|
||||
endif
|
||||
|
||||
include\arch\board: | include\arch
|
||||
@echo "LN: $@ to $(BOARD_DIR)\include"
|
||||
$(Q) $(DIRLINK) $(BOARD_DIR)\include $@
|
||||
$(Q) $(DIRLINK) $(LINK_INCLUDE_DIR) $@
|
||||
|
||||
# Link the boards\<arch>\<chip>\common dir to arch\<arch-name>\src\board
|
||||
# Link the boards\<arch>\<chip>\<board>\src dir to arch\<arch-name>\src\board\board
|
||||
|
@ -1121,13 +1121,19 @@ static void check_configuration(void)
|
||||
debug("check_configuration: Checking %s\n", g_buffer);
|
||||
if (!verify_file(g_buffer))
|
||||
{
|
||||
fprintf(stderr, "ERROR: No Make.defs file in %s\n",
|
||||
g_configpath);
|
||||
fprintf(stderr, " No Make.defs file in %s\n",
|
||||
g_scriptspath);
|
||||
fprintf(stderr, "Run tools/configure -L"
|
||||
" to list available configurations.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
/* Let’s check if there is a script in the common directory */
|
||||
|
||||
snprintf(g_buffer, BUFFER_SIZE,
|
||||
"%s%c..%c..%c..%ccommon%cscripts%cMake.defs",
|
||||
g_configpath, g_delim, g_delim, g_delim, g_delim,
|
||||
g_delim, g_delim);
|
||||
if (!verify_file(g_buffer))
|
||||
{
|
||||
fprintf(stderr, "ERROR: No Make.defs file found\n");
|
||||
fprintf(stderr, "Run tools/configure -L"
|
||||
" to list available configurations.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user