Makefile: Use CURDIR instead of PWD

Use $(CURDIR) instead of $(PWD) to refer to the current directory, as
the PWD variable comes from the shell environment and may not always
be set.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2021-05-19 23:49:50 -04:00
parent 099a6dd6c9
commit 0f9f061b35
1 changed files with 2 additions and 2 deletions

View File

@ -91,10 +91,10 @@ $(OUT)board-link: $(KCONFIG_CONFIG)
$(Q)echo "#$(CONFIG_BOARD_DIRECTORY)" > $@.temp $(Q)echo "#$(CONFIG_BOARD_DIRECTORY)" > $@.temp
$(Q)if ! cmp -s $@.temp $@; then rm -f $(OUT)*.d $(patsubst %,$(OUT)%/*.d,$(dirs-y)) ; mv $@.temp $@ ; fi $(Q)if ! cmp -s $@.temp $@; then rm -f $(OUT)*.d $(patsubst %,$(OUT)%/*.d,$(dirs-y)) ; mv $@.temp $@ ; fi
$(Q)rm -f $(OUT)board $(Q)rm -f $(OUT)board
$(Q)ln -sf $(PWD)/src/$(CONFIG_BOARD_DIRECTORY) $(OUT)board $(Q)ln -sf $(CURDIR)/src/$(CONFIG_BOARD_DIRECTORY) $(OUT)board
$(Q)mkdir -p $(OUT)board-generic $(Q)mkdir -p $(OUT)board-generic
$(Q)rm -f $(OUT)board-generic/board $(Q)rm -f $(OUT)board-generic/board
$(Q)ln -sf $(PWD)/src/generic $(OUT)board-generic/board $(Q)ln -sf $(CURDIR)/src/generic $(OUT)board-generic/board
include $(OUT)board-link include $(OUT)board-link