From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com [209.85.212.179]) by dpdk.org (Postfix) with ESMTP id 8B4B35917 for ; Wed, 14 May 2014 16:04:37 +0200 (CEST) Received: by mail-wi0-f179.google.com with SMTP id bs8so2454146wib.6 for ; Wed, 14 May 2014 07:04:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=+CAsLr81MlUAbtnvTLkct7Fzl1M87ACzvF7ERjks/hU=; b=MpsABFRfesLhXAvO19fZz9ondS+h7PngsD9Ez2SGsPulnmIegirwiJuyrxD0Yrmw8G GNuGsJgG58aAC7FItLOHFB7FYvnwH4xwerr4oavVdyjma8bKYc2049OzqW6ve1ozKQnf 2nFT+hQYrYW5AIbjfIb/wOWK8SMoo5Y/Gu/CyjtDKdicQ93wfT1ycyi8nk2wYhK36gkG oRrq3I+yKBJtM5y5qutVvi5bBq6yE7eggk/V3hgfXrQeYk99haGJT0BhIwTCfXvbpH3A exV5uc9uUhHn+5NZGN5h3o6V2WVB3AvQtsScAAntAVDT+f/maumw7R2mNWbQVictIfgd zMeg== X-Gm-Message-State: ALoCoQkRzQvH4q6JKHAcJgJo0VrpFjQkogHLGonx3zAHucCaEjFMMzAvqFABqV1wJDFxDz2cpHc0 X-Received: by 10.180.126.8 with SMTP id mu8mr26529016wib.10.1400076283801; Wed, 14 May 2014 07:04:43 -0700 (PDT) Received: from xps13.localnet (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id y10sm4168714wix.24.2014.05.14.07.04.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 May 2014 07:04:42 -0700 (PDT) From: Thomas Monjalon To: Olivier Matz Date: Wed, 14 May 2014 16:04:39 +0200 Message-ID: <2778792.5qLN2XeAKZ@xps13> Organization: 6WIND User-Agent: KMail/4.13 (Linux/3.14.3-2-ARCH; KDE/4.13.0; x86_64; ; ) In-Reply-To: <1399631530-24956-7-git-send-email-olivier.matz@6wind.com> References: <1399631530-24956-1-git-send-email-olivier.matz@6wind.com> <1399631530-24956-7-git-send-email-olivier.matz@6wind.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2 6/6] mk: add "make examples" target in root makefile 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: Wed, 14 May 2014 14:04:37 -0000 Hi Olivier, 2014-05-09 12:32, Olivier Matz: > It is now possible to build all projects from the examples/ directory > using one command from root directory. > > Some illustration of what is possible: > > - build examples in the DPDK tree for one target > > # install the x86_64-default-linuxapp-gcc in > # ${RTE_SDK}/x86_64-default-linuxapp-gcc directory > user@droids:~/dpdk.org$ make install T=x86_64-default-linuxapp-gcc > # build examples for this new installation in > # ${RTE_SDK}/examples directory > user@droids:~/dpdk.org$ make examples T=x86_64-default-linuxapp-gcc > > - build examples outside DPDK tree for several targets > > # install all targets matching x86_64-*-linuxapp-gcc in > # ${RTE_SDK}/x86_64-*-linuxapp-gcc directories > user@droids:~/dpdk.org$ make install T=x86_64-*-linuxapp-gcc > # build examples for these installations in /tmp/foobar > user@droids:~/dpdk.org$ make examples T=x86_64-*-linuxapp-gcc > O=/tmp/foobar > > Signed-off-by: Olivier Matz [..] > +# Build directory is given with O= > +ifndef O > +O = $(RTE_SDK)/examples > +endif > + > +# Target for which examples should be built. > +ifndef T > +T = * > +endif Using "?=" should be cleaner than "ifndef" I think. [...] > + $(Q)if [ ! -d "${RTE_SDK}/${*}" ]; then \ > + echo "Target ${*} does not exist in ${RTE_SDK}/${*}." ; \ > + echo -n "Please install DPDK first (make install) or use another " ; \ > + echo "target argument (T=target)." ; \ You should stop make execution with "false" on such error. > + else \ > + $(MAKE) -C examples O=$(O) RTE_TARGET=$(*); \ > + fi We should use "abspath $O" here when changing directory. Last comment: I cannot use make examples T=x86_64-default-linuxapp-gcc O=build because of RTE_SDK := $(CURDIR) in GNUmakefile Thanks -- Thomas