From: Olivier MATZ <olivier.matz@6wind.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2 6/6] mk: add "make examples" target in root makefile
Date: Thu, 15 May 2014 18:03:27 +0200 [thread overview]
Message-ID: <5374E54F.1020303@6wind.com> (raw)
In-Reply-To: <2778792.5qLN2XeAKZ@xps13>
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
prev parent reply other threads:[~2014-05-15 16:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-09 10:32 [dpdk-dev] [PATCH v2 0/6] examples: add a new makefile to build all examples Olivier Matz
2014-05-09 10:32 ` [dpdk-dev] [PATCH v2 1/6] mk: introduce rte.extsubdir.mk Olivier Matz
2014-05-09 10:32 ` [dpdk-dev] [PATCH v2 2/6] examples: use rte.extsubdir.mk to process subdirectories Olivier Matz
2014-05-13 13:51 ` [dpdk-dev] [PATCH v3 " Olivier Matz
2014-05-09 10:32 ` [dpdk-dev] [PATCH v2 3/6] examples: add a makefile to build all examples Olivier Matz
2014-05-09 10:32 ` [dpdk-dev] [PATCH v2 4/6] examples: fix qos_sched makefile Olivier Matz
2014-05-09 10:32 ` [dpdk-dev] [PATCH v2 5/6] examples: fix netmap_compat example Olivier Matz
2014-05-09 10:32 ` [dpdk-dev] [PATCH v2 6/6] mk: add "make examples" target in root makefile Olivier Matz
2014-05-14 14:04 ` Thomas Monjalon
2014-05-15 16:03 ` Olivier MATZ [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5374E54F.1020303@6wind.com \
--to=olivier.matz@6wind.com \
--cc=dev@dpdk.org \
--cc=thomas.monjalon@6wind.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).