From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id B8AF2903 for ; Sat, 28 Feb 2015 17:56:17 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP; 28 Feb 2015 08:54:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,668,1418112000"; d="scan'208";a="534221636" Received: from unknown (HELO rkwiles-desk.ger.corp.intel.com) ([10.255.41.74]) by orsmga003.jf.intel.com with ESMTP; 28 Feb 2015 08:56:24 -0800 From: Keith Wiles To: dev@dpdk.org Date: Sat, 28 Feb 2015 10:56:03 -0600 Message-Id: <1425142563-27185-1-git-send-email-keith.wiles@intel.com> X-Mailer: git-send-email 2.3.0 Subject: [dpdk-dev] [PATCH] External app builds need to locate common make fragments and includes. X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Feb 2015 16:56:18 -0000 When building an external application like Pktgen and using the proper makefile fragments rte.extXYZ.mk NOT rte.XYZ.mk files as you would use with example applications in the same RTE_SDK directory the rte.extXYZ.mk files are missing some defines/includes. 1 - Add missing tests for RTE_SDK/RTE_TARGET not defined code. 2 - The build of external applications are forced to be verbose ouput as the Q=@ define is not present. 3 - Missing include of target/generic/rte.vars.mk file which includes the information to locate the rte_config.h and other DPDK include files. A patch like this one was submitted before and was rejected because it seemed it was not required, because target/generic/rte.vars.mk already included by rte.vars.mk. This is not the cause for external applications like Pktgen which are built outside of the RTE_SDK directory and only include the rte.extXYZ.mk makefile fragments. Signed-off-by: Keith Wiles --- mk/rte.extvars.mk | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/mk/rte.extvars.mk b/mk/rte.extvars.mk index 3e5a990..e6c6401 100644 --- a/mk/rte.extvars.mk +++ b/mk/rte.extvars.mk @@ -30,8 +30,19 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -# directory where sources are located +# To be included at the beginning of all RTE external user Makefiles. This +# .mk will define the RTE environment variables by including the +# config file of SDK. It also includes the config file from external +# application if any. # + +ifeq ($(RTE_SDK),) +$(error RTE_SDK is not defined) +endif +ifeq ($(wildcard $(RTE_SDK)),) +$(error RTE_SDK variable points to an invalid location) +endif + ifdef S ifeq ("$(origin S)", "command line") RTE_SRCDIR := $(abspath $(S)) @@ -40,6 +51,16 @@ endif RTE_SRCDIR ?= $(CURDIR) export RTE_SRCDIR +# define Q to '@' or not. $(Q) is used to prefix all shell commands to +# be executed silently. +Q=@ +ifdef V +ifeq ("$(origin V)", "command line") +Q= +endif +endif +export Q + # # Makefile to call once $(RTE_OUTPUT) is created # @@ -51,6 +72,13 @@ endif RTE_EXTMK ?= $(RTE_SRCDIR)/Makefile export RTE_EXTMK +# RTE_TARGET is deducted from config when we are building the SDK. +# Else, when building an external app, RTE_TARGET must be specified +# by the user. +ifeq ($(RTE_TARGET),) +$(error RTE_TARGET is not defined) +endif + RTE_SDK_BIN := $(RTE_SDK)/$(RTE_TARGET) # @@ -78,4 +106,8 @@ RTE_MACHINE := $(CONFIG_RTE_MACHINE:"%"=%) RTE_EXEC_ENV := $(CONFIG_RTE_EXEC_ENV:"%"=%) RTE_TOOLCHAIN := $(CONFIG_RTE_TOOLCHAIN:"%"=%) - +ifneq ($(wildcard $(RTE_SDK)/mk/target/$(RTE_TARGET)/rte.vars.mk),) +include $(RTE_SDK)/mk/target/$(RTE_TARGET)/rte.vars.mk +else +include $(RTE_SDK)/mk/target/generic/rte.vars.mk +endif -- 2.3.0