From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 12BC4F3E for ; Wed, 28 Feb 2018 18:12:01 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Feb 2018 09:12:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,406,1515484800"; d="scan'208";a="34360855" Received: from silpixa00399126.ir.intel.com (HELO silpixa00399126.ger.corp.intel.com) ([10.237.223.223]) by fmsmga001.fm.intel.com with ESMTP; 28 Feb 2018 09:11:59 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Date: Wed, 28 Feb 2018 17:11:56 +0000 Message-Id: <20180228171156.91077-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.14.3 Subject: [dpdk-dev] [PATCH] mk: allow renaming of build directories X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Feb 2018 17:12:02 -0000 When building using make, the Makefile in the build directory contained the name of the build directory to be passed as an "O=" parameter to the DPDK SDK makefiles. Unfortunately, this meant that the compilation would always fail if the build directory was renamed. To remove this limitation, we can use $(CURDIR) instead of the directory name. Signed-off-by: Bruce Richardson --- buildtools/gen-build-mk.sh | 4 ++-- mk/rte.sdkconfig.mk | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/buildtools/gen-build-mk.sh b/buildtools/gen-build-mk.sh index c18b205e3..a61c4d6cf 100755 --- a/buildtools/gen-build-mk.sh +++ b/buildtools/gen-build-mk.sh @@ -18,7 +18,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 0664725ee..ade681ffd 100644 --- a/mk/rte.sdkconfig.mk +++ b/mk/rte.sdkconfig.mk @@ -105,8 +105,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 -- 2.14.3