[U-Boot] [PATCH] Makefile: restore *_config target

Masahiro Yamada yamada.m at jp.panasonic.com
Wed Aug 6 04:11:22 CEST 2014


Hi Jeroen,



On Tue, 05 Aug 2014 21:35:18 +0200
Jeroen Hofstee <jeroen at myspectrum.nl> wrote:

> Hi Masahiro,
> 
> On 05-08-14 03:50, Masahiro Yamada wrote:
> > On Mon, 04 Aug 2014 19:49:24 +0200
> > Jeroen Hofstee <jeroen at myspectrum.nl> wrote:
> >
> >>>> cc: Tom Rini <trini at ti.com>
> >>>> cc: Masahiro Yamada <yamada.m at jp.panasonic.com>
> >>>> cc: Simon Glass <sjg at chromium.org>
> >>>> Signed-off-by: Jeroen Hofstee <jeroen at myspectrum.nl>
> >>>> ---
> >>>>    Makefile | 7 ++++++-
> >>>>    1 file changed, 6 insertions(+), 1 deletion(-)
> >>>>
> >>>> diff --git a/Makefile b/Makefile
> >>>> index 5e49545..2a339aa 100644
> >>>> --- a/Makefile
> >>>> +++ b/Makefile
> >>>> @@ -413,7 +413,7 @@ endif
> >>>>    version_h := include/generated/version_autogenerated.h
> >>>>    timestamp_h := include/generated/timestamp_autogenerated.h
> >>>>    >> -no-dot-config-targets := clean clobber mrproper distclean \
> >>>> +no-dot-config-targets := clean clobber %_config mrproper distclean \
> >>>>    			 help %docs check% coccicheck \
> >>>>    			 ubootversion backup tools-only
> >>> This change is not necessay at all, I think.
> >>>
> >> Depends on the intention, I do _not_ want to invoke the %config
> >> for the %_config target, and this prevents that.
> >
> > I am afraid you are misunderstanding the usage of no-dot-config-targets.
> >
> > This variable contains targets we can run without the configuration,
> > such as cleaning targets, help targets, ...
> >
> > You are adding the configuration target itself to this variable.
> >
> 
> No I am not misunderstanding it. I am adding an alias not
> a configure target and an alias can obviously run without a
> configured u-boot (and should in this case). If I move the rule
> up it can be avoided if you insist on it.
> 
> >>>> @@ -436,6 +436,11 @@ ifeq ($(KBUILD_EXTMOD),)
> >>>>            endif
> >>>>    endif
> >>>>    >> +# Before the switch to KConfig the configure target was %_config instead
> >>>> +# of %_defconfig. Just reinvoke make to be backwards compatible.
> >>>> +%_config: FORCE
> >>>> +	$(Q)$(MAKE) $(@:_config=_defconfig)
> >>>> +
> >>>>    ifeq ($(mixed-targets),1)
> >>>>    # ===========================================================================
> >>>>    # We're called with mixed targets (*config and build targets).
> >>> Because <board>_config matches "%config" pattern at line 467,
> >> Well only when ifeq ($(config-targets),1) was true, which above prevents.
> >>
> >>> could you modify scripts/multiconfig.py, please?
> >>>
> >> I don't understand what you want to change there... it should only
> >> see %_defconfig.
> >>
> >
> > "<board>_config" is now an alias of "<board>_defconfig", right?
> yes, make %_config just invokes make %_defconfig. That is all.
> 
> > I thoght it is more reasonable to handle it in the same place as the other
> > configuration targets.
> >
> 
> Matter of taste I guess,

Not at all.
Confituration targets should go inside  "ifeq ($(config-targets),1) ... else",
your code is breaking the basic concept of the top Makefile.

NAK.
At least, your patch does not work with O= option.





$ git log
commit 5981f2917be03463714d8badfc78454c02ca160e
Author: Jeroen Hofstee <jeroen at myspectrum.nl>
Date:   Fri Aug 1 21:28:54 2014 +0200

    Makefile: restore *_config target
    
    The switch to KConfig break the [board]_config target. This breaks
    backwards compatibility and hence all documentation about how to
    build u-boot is no longer valid. It is also annoying for general
    recipes to build u-boot as contained in buildroot, crochet, oe,
    poky, eldk etc. Hence restore the *_config target.
    
    cc: Tom Rini <trini at ti.com>
    cc: Masahiro Yamada <yamada.m at jp.panasonic.com>
    cc: Simon Glass <sjg at chromium.org>
    Signed-off-by: Jeroen Hofstee <jeroen at myspectrum.nl>

commit 25b4adbba018633b943a99322bfb2fb819c0bafb
Author: Masahiro Yamada <yamada.m at jp.panasonic.com>
Date:   Wed Jul 30 14:08:25 2014 +0900

    include: remove CONFIG_SPL/CONFIG_TPL definition in config headers
    
    Now CONFIG_SPL and CONFIG_TPL are defined in Kconfig.
    
    Remove the redundant definition in config headers.
    
    Signed-off-by: Masahiro Yamada <yamada.m at jp.panasonic.com>
    Reviewed-by: Simon Glass <sjg at chromium.org>

$ git clean -x -d -f
$ git status 
On branch jeroen
nothing to commit, working directory clean
$ make  O=foo sandbox_config 
make[2]: *** No rule to make target `sandbox_defconfig'.  Stop.
make[1]: *** [sandbox_config] Error 2
make: *** [sub-make] Error 2
$ make  O=foo sandbox_defconfig 
  HOSTCC  scripts/basic/fixdep
  GEN     /home/yamada/workspace/u-boot-org/foo/Makefile
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#




Best Regards
Masahiro Yamada



More information about the U-Boot mailing list