From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by dpdk.org (Postfix) with ESMTP id 5105AAB06 for ; Thu, 15 May 2014 18:03:24 +0200 (CEST) Received: by mail-we0-f177.google.com with SMTP id x48so1278392wes.22 for ; Thu, 15 May 2014 09:03:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=qljHf+IIeb9X2Jh+PKUTEb7rG7y7k9XeJLLJUhMuHwA=; b=eV0Ae/kvQ9ujZ7cUqJq2pl48LZ7hRbcWl/nYhwRpFcfYoZlIHjIlvJoJctAKIsZ9In W04vYPCwb2IvBvBP+YCjeZXMTvTc3KvGmNQyzcnb8TWErN30fJv+IO772SNqcVGea8Hm 4zQBYXLUyArAwSlnI0bJYD0mFVc0NqGKt6mKD8aaCQY5h7r8ockQoRUXCHaQq0+Xh4e9 518sayYL+7QkVLPKKPygDuKDTojjBP/7KDRpcsEdgWEfx5me/xMoX6pVvH6MzF7dK5bP l/LO0VM9OO9N+nyM3Q6Y+kE1ed8X52cMOyF1tscKjgiCRF7mNFyn47BihuklyubIgsiX FVLw== X-Gm-Message-State: ALoCoQk4Y3B8fej2NrNXvUR06R4eycIcTsqXJeQTeNkvQxlPX/U5z2gf39ddVYE0v3q9MQTOPJV/ X-Received: by 10.180.14.199 with SMTP id r7mr9507584wic.0.1400169811950; Thu, 15 May 2014 09:03:31 -0700 (PDT) Received: from [10.16.0.195] (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id vm8sm7317594wjc.27.2014.05.15.09.03.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 15 May 2014 09:03:31 -0700 (PDT) Message-ID: <5374E54F.1020303@6wind.com> Date: Thu, 15 May 2014 18:03:27 +0200 From: Olivier MATZ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.4.0 MIME-Version: 1.0 To: Thomas Monjalon References: <1399631530-24956-1-git-send-email-olivier.matz@6wind.com> <1399631530-24956-7-git-send-email-olivier.matz@6wind.com> <2778792.5qLN2XeAKZ@xps13> In-Reply-To: <2778792.5qLN2XeAKZ@xps13> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: Thu, 15 May 2014 16:03:24 -0000 Hi Thomas, Thank you for your comments. On 05/14/2014 04:04 PM, Thomas Monjalon wrote: >> +# 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. Agree, I'll fix that. > [...] >> + $(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. The idea was to be able to build the examples for all installed targets, skipping those which are not installed: make install T=x86_64-default-linuxapp-gcc # build for x86_64-default-linuxapp-gcc only make examples But if you prefer, I can change it so the user has to specify the target explicitly. >> + else \ >> + $(MAKE) -C examples O=$(O) RTE_TARGET=$(*); \ >> + fi > > We should use "abspath $O" here when changing directory. Yes, I'll fix that too. > Last comment: I cannot use > make examples T=x86_64-default-linuxapp-gcc O=build > because of > RTE_SDK := $(CURDIR) > in GNUmakefile This works fine if you do: # install the x86_64-default-linuxapp-gcc target in RTE_SDK=. make install T=x86_64-default-linuxapp-gcc # compile examples in build, using the installed target # x86_64-default-linuxapp-gcc from RTE_SDK=. make examples T=x86_64-default-linuxapp-gcc O=build Indeed, I would say that all makefile commands called from DPDK root directory assume that RTE_SDK=. so that's the expected behavior. I'll send a v3 with the fixes tomorrow. Regards, Olivier