From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2] Makefile: remove extra ifdef/endif of top Makefile
Date: Tue, 7 Apr 2015 21:34:51 +0200 [thread overview]
Message-ID: <20150407213451.2da186b3@free-electrons.com> (raw)
In-Reply-To: <1428383349-20804-1-git-send-email-yamada.masahiro@socionext.com>
Dear Masahiro Yamada,
On Tue, 7 Apr 2015 14:09:09 +0900, Masahiro Yamada wrote:
> The GNU make's origin function know undefined variable well,
> so the outer ifdef/endif conditional checking is unneeded.
>
> From `info make` documentation, origin will return
>
> `undefined'
> if VARIABLE was never defined.
> `command line'
> if VARIABLE was defined on the command line.
> ...
>
> Therefore, $(origin V) will get a value anyway, killing ifdef/endif
> is viable and safe.
>
> Furthermore, I've checked the minimal requirements from the top
> Makefile is GNU make 3.81, and that version of GNU make has support
> of origin function well already, so now it's safe to kill the outer
> conditional checking, without upgrading the minimal requirements.
>
> Signed-off-by: Cheng Renquan <crq@kernel.org>
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> [ Commit description is borrowed from Linux Kernel
> (commit b8b0618cf6fa) and adjusted for Buildroot ]
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Applied, thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
prev parent reply other threads:[~2015-04-07 19:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-07 5:09 [Buildroot] [PATCH v2] Makefile: remove extra ifdef/endif of top Makefile Masahiro Yamada
2015-04-07 17:13 ` Yann E. MORIN
2015-04-07 19:34 ` Thomas Petazzoni [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=20150407213451.2da186b3@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--cc=buildroot@busybox.net \
/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