Makefile: remove extra ifdef/endif of top Makefile
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 7 Apr 2015 05:09:09 +0000 (14:09 +0900)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 7 Apr 2015 19:34:00 +0000 (21:34 +0200)
commit6bf9e23332bffc6362cb63f37957ac69e5a6ac96
treedeea96ecf56668df3455443cc0f36f7f816af5ba
parent39956bbae7eed612dd873c1f2777f5b55579cb36
Makefile: remove extra ifdef/endif of top Makefile

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>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Makefile