[U-Boot] [PATCH] new default shortcut to config & build a board

The majority of the time that I build things in U-Boot, I want to just build for the board. I don't make board config tweaks after selecting the board. So add a new pattern rule that allows people to combine two steps in one go: `make foo_config && make` => `make foo`
This shouldn't conflict with any existing make rules as the pattern rule is used only the rule doesn't already exist.
Signed-off-by: Mike Frysinger vapier@gentoo.org --- Makefile | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile index 02393b6..bf45a0b 100644 --- a/Makefile +++ b/Makefile @@ -495,6 +495,10 @@ unconfig: $(obj)board/*/config.tmp $(obj)board/*/*/config.tmp \ $(obj)include/autoconf.mk $(obj)include/autoconf.mk.dep
+%: %_config + $(MAKE) $@_config + $(MAKE) + #======================================================================== # PowerPC #======================================================================== @@ -3505,10 +3509,6 @@ BFIN_BOARDS += ibf-dsp561 $(BFIN_BOARDS:%=%_config) : unconfig @$(MKCONFIG) $(@:_config=) blackfin blackfin $(@:_config=)
-$(BFIN_BOARDS): - $(MAKE) $@_config - $(MAKE) - #======================================================================== # AVR32 #========================================================================

On Monday 24 August 2009 17:28:26 Mike Frysinger wrote:
The majority of the time that I build things in U-Boot, I want to just build for the board. I don't make board config tweaks after selecting the board. So add a new pattern rule that allows people to combine two steps in one go: `make foo_config && make` => `make foo`
This shouldn't conflict with any existing make rules as the pattern rule is used only the rule doesn't already exist.
ping -mike

Hi Mike,
On Monday 24 August 2009 17:28:26 Mike Frysinger wrote:
The majority of the time that I build things in U-Boot, I want to just build for the board. I don't make board config tweaks after selecting the board. So add a new pattern rule that allows people to combine two steps in one go: `make foo_config && make` => `make foo`
This shouldn't conflict with any existing make rules as the pattern rule is used only the rule doesn't already exist.
Hm, I just tried this patch and I see a strange behaviour:
[dzu@pollux u-boot-testing (mao-rd-hor)]$ make -s sequoia Configuring for sequoia board... Configuring for sequoia board...
It is not obvious for me why I get this message twice - all I verified is that both messages are definitely from stdout only.
Apart from that, I don't see a reason why this should not go in. Currently I use "./MAKEALL <board>" for the same purpose btw.
Cheers Detlev

On Mon, Aug 24, 2009 at 11:28 PM, Mike Frysinger vapier@gentoo.org wrote:
+%: %_config
- $(MAKE) $@_config <--- Delete this, because the %_config already calls the target config block
- $(MAKE)
best regards,
luigi

The majority of the time that I build things in U-Boot, I want to just build for the board. I don't make board config tweaks after selecting the board. So add a new pattern rule that allows people to combine two steps in one go: `make foo_config && make` => `make foo`
This shouldn't conflict with any existing make rules as the pattern rule is used only the rule doesn't already exist.
Signed-off-by: Mike Frysinger vapier@gentoo.org --- v2 - fix duplicate config left over from original code pointed out by Luigi
Makefile | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile index 9c5b2a5..15363b8 100644 --- a/Makefile +++ b/Makefile @@ -501,6 +501,9 @@ unconfig: $(obj)board/*/config.tmp $(obj)board/*/*/config.tmp \ $(obj)include/autoconf.mk $(obj)include/autoconf.mk.dep
+%: %_config + $(MAKE) + #======================================================================== # PowerPC #======================================================================== @@ -3525,10 +3528,6 @@ BFIN_BOARDS += ibf-dsp561 $(BFIN_BOARDS:%=%_config) : unconfig @$(MKCONFIG) $(@:_config=) blackfin blackfin $(@:_config=)
-$(BFIN_BOARDS): - $(MAKE) $@_config - $(MAKE) - #======================================================================== # AVR32 #========================================================================

Dear Mike Frysinger,
In message 1254413514-12564-1-git-send-email-vapier@gentoo.org you wrote:
The majority of the time that I build things in U-Boot, I want to just build for the board. I don't make board config tweaks after selecting the board. So add a new pattern rule that allows people to combine two steps in one go: `make foo_config && make` => `make foo`
This shouldn't conflict with any existing make rules as the pattern rule is used only the rule doesn't already exist.
Signed-off-by: Mike Frysinger vapier@gentoo.org
v2
- fix duplicate config left over from original code pointed out by Luigi
Makefile | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
participants (4)
-
Detlev Zundel
-
Luigi Mantellini
-
Mike Frysinger
-
Wolfgang Denk