diff --git a/buildtools/gen-build-mk.sh b/buildtools/gen-build-mk.sh index c18b205e32..636920b638 100755 --- a/buildtools/gen-build-mk.sh +++ b/buildtools/gen-build-mk.sh @@ -5,7 +5,6 @@ # Auto-generate a Makefile in build directory # Args: # $1: path of project src root -# $2: path of build dir (can be relative to $1) echo "# Automatically generated by gen-build-mk.sh" echo @@ -18,7 +17,7 @@ echo echo "MAKEFLAGS += --no-print-directory" echo echo "all:" -echo " @\$(MAKE) -C $1 O=$2" +echo " @\$(MAKE) -C $1 O=\$(CURDIR)" echo echo "%::" -echo " @\$(MAKE) -C $1 O=$2 \$@" +echo " @\$(MAKE) -C $1 O=\$(CURDIR) \$@" diff --git a/mk/rte.sdkconfig.mk b/mk/rte.sdkconfig.mk index d90d62cc6a..fa77331cbb 100644 --- a/mk/rte.sdkconfig.mk +++ b/mk/rte.sdkconfig.mk @@ -114,8 +114,7 @@ SDK_RELPATH=$(shell $(RTE_SDK)/buildtools/relpath.sh $(abspath $(RTE_SRCDIR)) \ OUTPUT_RELPATH=$(shell $(RTE_SDK)/buildtools/relpath.sh $(abspath $(RTE_OUTPUT)) \ $(abspath $(RTE_SRCDIR))) $(RTE_OUTPUT)/Makefile: | $(RTE_OUTPUT) - $(Q)$(RTE_SDK)/buildtools/gen-build-mk.sh $(SDK_RELPATH) $(OUTPUT_RELPATH) \ - > $(RTE_OUTPUT)/Makefile + $(Q)$(RTE_SDK)/buildtools/gen-build-mk.sh $(SDK_RELPATH) > $@ # clean installed files, and generate a new config header file # if NODOTCONF variable is defined, don't try to rebuild .config