sh:Enhanced compilation system
In this change, if board/include and board/script are not found, they will be looked for again in the upper level of common. Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
This commit is contained in:
parent
ccc0c54401
commit
e4b561d51b
@ -279,10 +279,16 @@ 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)),)
|
||||
LINK_INCLUDE_DIR = $(BOARD_COMMON_DIR)/include
|
||||
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
|
||||
|
@ -167,8 +167,12 @@ if [ ! -r ${src_makedefs} ]; then
|
||||
src_makedefs=${configpath}/../../scripts/Make.defs
|
||||
|
||||
if [ ! -r ${src_makedefs} ]; then
|
||||
echo "File Make.defs could not be found"
|
||||
exit 4
|
||||
src_makedefs=${configpath}/../../../common/scripts/Make.defs
|
||||
|
||||
if [ ! -r ${src_makedefs} ]; then
|
||||
echo "File Make.defs could not be found"
|
||||
exit 4
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
@ -170,6 +170,9 @@ for CONFIG in ${CONFIGS}; do
|
||||
DEFCONFIG=$CONFIGDIR/defconfig
|
||||
MAKEDEFS2=$CONFIGDIR/Make.defs
|
||||
|
||||
SCRIPTSDIR2=$BOARDDIR/../common/scripts
|
||||
MAKEDEFS3=$SCRIPTSDIR2/Make.defs
|
||||
|
||||
# Check the board configuration directory
|
||||
|
||||
if [ ! -d $BOARDDIR ]; then
|
||||
@ -193,8 +196,12 @@ for CONFIG in ${CONFIGS}; do
|
||||
if [ -r $MAKEDEFS1 ]; then
|
||||
MAKEDEFS=$MAKEDEFS1
|
||||
else
|
||||
echo "No readable Make.defs file at $MAKEDEFS1 or $MAKEDEFS2"
|
||||
exit 1
|
||||
if [ -r $MAKEDEFS3 ]; then
|
||||
MAKEDEFS=$MAKEDEFS3
|
||||
else
|
||||
echo "No readable Make.defs file at $MAKEDEFS1 or $MAKEDEFS2 or $MAKEDEFS3"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user