DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Olivier Matz <olivier.matz@6wind.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2 6/6] mk: add "make examples" target in root makefile
Date: Wed, 14 May 2014 16:04:39 +0200	[thread overview]
Message-ID: <2778792.5qLN2XeAKZ@xps13> (raw)
In-Reply-To: <1399631530-24956-7-git-send-email-olivier.matz@6wind.com>

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 <olivier.matz@6wind.com>
[..]
> +# 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

  reply	other threads:[~2014-05-14 14:04 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 [this message]
2014-05-15 16:03     ` Olivier MATZ

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=2778792.5qLN2XeAKZ@xps13 \
    --to=thomas.monjalon@6wind.com \
    --cc=dev@dpdk.org \
    --cc=olivier.matz@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).