From: Jeroen Hofstee <jeroen@myspectrum.nl>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Makefile: restore *_config target
Date: Tue, 05 Aug 2014 21:35:18 +0200 [thread overview]
Message-ID: <53E131F6.5010209@myspectrum.nl> (raw)
In-Reply-To: <20140805105008.D57E.AA925319@jp.panasonic.com>
Hi Masahiro,
On 05-08-14 03:50, Masahiro Yamada wrote:
> On Mon, 04 Aug 2014 19:49:24 +0200
> Jeroen Hofstee <jeroen@myspectrum.nl> wrote:
>
>>>> cc: Tom Rini <trini@ti.com>
>>>> cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
>>>> cc: Simon Glass <sjg@chromium.org>
>>>> Signed-off-by: Jeroen Hofstee <jeroen@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, I like my approach more, since it
catches differences earlier and no scripts below have to be altered.
> Could you try the following patch?
>
>
>
> diff --git a/scripts/multiconfig.py b/scripts/multiconfig.py
> index 749abcb..30bfd7f 100755
> --- a/scripts/multiconfig.py
> +++ b/scripts/multiconfig.py
> @@ -402,6 +402,9 @@ def main():
> cmd = sys.argv[1]
> if cmd.endswith('_defconfig'):
> do_board_defconfig(cmd)
> + elif cmd.endswith('_config'):
> + # backward compatibility
> + do_board_defconfig(cmd[:-len('_config')] + '_defconfig')
> else:
> func = cmd_list.get(cmd, do_others)
> func(cmd)
>
I can't parse this, since I don't know python that well, but it likely
works. I do like it more if make already handled it though.
Regards,
Jeroen
next prev parent reply other threads:[~2014-08-05 19:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-01 19:28 [U-Boot] [PATCH] Makefile: restore *_config target Jeroen Hofstee
2014-08-04 1:51 ` Masahiro Yamada
2014-08-04 17:49 ` Jeroen Hofstee
2014-08-05 1:50 ` Masahiro Yamada
2014-08-05 19:35 ` Jeroen Hofstee [this message]
2014-08-06 2:11 ` Masahiro Yamada
2014-08-07 20:40 ` Jeroen Hofstee
2014-08-04 10:09 ` Simon Glass
2014-08-04 17:35 ` Jeroen Hofstee
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=53E131F6.5010209@myspectrum.nl \
--to=jeroen@myspectrum.nl \
--cc=u-boot@lists.denx.de \
/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