public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] Don't let the command-line ARCH=powerpc override our redefinition to ppc.
@ 2009-10-19 21:24 Scott Wood
  2009-10-19 22:33 ` Wolfgang Denk
  0 siblings, 1 reply; 4+ messages in thread
From: Scott Wood @ 2009-10-19 21:24 UTC (permalink / raw)
  To: u-boot

The override keyword is needed for make to take our version over the one
specified on the command line, and remove it from the list of command line
overrides that are passed to submakes.  IMHO, the combination of "export"
and "override" ought to do this automatically, but oh well.

Signed-off-by: Scott Wood <scottwood@freescale.com>
---
 Makefile |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index bed9469..f9e7a50 100644
--- a/Makefile
+++ b/Makefile
@@ -134,7 +134,8 @@ unexport CDPATH
 #########################################################################
 
 ifeq ($(ARCH),powerpc)
-ARCH = ppc
+override ARCH = ppc
+MAKEOVERRIDES := $(MAKEOVERRIDES:ARCH%=)
 endif
 
 # The "tools" are needed early, so put this first
-- 
1.6.4.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 1/2] Don't let the command-line ARCH=powerpc override our redefinition to ppc.
  2009-10-19 21:24 [U-Boot] [PATCH 1/2] Don't let the command-line ARCH=powerpc override our redefinition to ppc Scott Wood
@ 2009-10-19 22:33 ` Wolfgang Denk
  2009-10-19 22:53   ` Scott Wood
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2009-10-19 22:33 UTC (permalink / raw)
  To: u-boot

Dear Scott Wood,

In message <20091019212409.GA31322@loki.buserror.net> you wrote:
> The override keyword is needed for make to take our version over the one
> specified on the command line, and remove it from the list of command line
> overrides that are passed to submakes.  IMHO, the combination of "export"
> and "override" ought to do this automatically, but oh well.

I have to admit that I don't see the problem. When I explicitly ask
for a specific ARCH setting on the command line (versus using some
setting I inherited from the envrionment, eventually even unaware of
the current value), then I do want to use that. So the current code
seems to do what I would expect from it.

Maybe my expectations are whacky, though.

I tend to NAK this one.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I was playing poker the other night... with Tarot cards. I got a full
house and 4 people died.                              - Steven Wright

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 1/2] Don't let the command-line ARCH=powerpc override our redefinition to ppc.
  2009-10-19 22:33 ` Wolfgang Denk
@ 2009-10-19 22:53   ` Scott Wood
  2009-10-26 22:21     ` Scott Wood
  0 siblings, 1 reply; 4+ messages in thread
From: Scott Wood @ 2009-10-19 22:53 UTC (permalink / raw)
  To: u-boot

Wolfgang Denk wrote:
> Dear Scott Wood,
> 
> In message <20091019212409.GA31322@loki.buserror.net> you wrote:
>> The override keyword is needed for make to take our version over the one
>> specified on the command line, and remove it from the list of command line
>> overrides that are passed to submakes.  IMHO, the combination of "export"
>> and "override" ought to do this automatically, but oh well.
> 
> I have to admit that I don't see the problem. When I explicitly ask
> for a specific ARCH setting on the command line (versus using some
> setting I inherited from the envrionment, eventually even unaware of
> the current value), then I do want to use that. So the current code
> seems to do what I would expect from it.
> 
> Maybe my expectations are whacky, though.
> 
> I tend to NAK this one.

For the benefit of those who weren't on the IRC channel when we 
discussed this, I'll restate my objection.  I think you're reading too 
much into the difference between setting ARCH with an environment 
variable and setting it on the command line.  The number of users who 
are going to be confused by this (at least one, since I was) is greater 
than the number of users who would have done something useful by truly 
forcing ARCH=powerpc (zero without other changes, since all it gets you 
is a failed build).

The way it is now, it looks as if ARCH=powerpc is accepted as an alias 
for ARCH=ppc.  If this is not intended to be the case, and it's only 
intended to be accepted as an alias if you use one specific method of 
passing arguments (which again I recommend against, as it's confusing 
and not actually useful), then can we at least add a comment to the part 
of the makefile that does the rewriting clarifying this?

Printing a warning if ARCH is still powerpc probably wouldn't hurt 
either, even in the absence of any rewriting.

-Scott

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 1/2] Don't let the command-line ARCH=powerpc override our redefinition to ppc.
  2009-10-19 22:53   ` Scott Wood
@ 2009-10-26 22:21     ` Scott Wood
  0 siblings, 0 replies; 4+ messages in thread
From: Scott Wood @ 2009-10-26 22:21 UTC (permalink / raw)
  To: u-boot

Scott Wood wrote:
> Wolfgang Denk wrote:
>> Dear Scott Wood,
>>
>> In message <20091019212409.GA31322@loki.buserror.net> you wrote:
>>> The override keyword is needed for make to take our version over the one
>>> specified on the command line, and remove it from the list of command line
>>> overrides that are passed to submakes.  IMHO, the combination of "export"
>>> and "override" ought to do this automatically, but oh well.
>> I have to admit that I don't see the problem. When I explicitly ask
>> for a specific ARCH setting on the command line (versus using some
>> setting I inherited from the envrionment, eventually even unaware of
>> the current value), then I do want to use that. So the current code
>> seems to do what I would expect from it.
>>
>> Maybe my expectations are whacky, though.
>>
>> I tend to NAK this one.
> 
> For the benefit of those who weren't on the IRC channel when we 
> discussed this, I'll restate my objection.  I think you're reading too 
> much into the difference between setting ARCH with an environment 
> variable and setting it on the command line.  The number of users who 
> are going to be confused by this (at least one, since I was) is greater 
> than the number of users who would have done something useful by truly 
> forcing ARCH=powerpc (zero without other changes, since all it gets you 
> is a failed build).

BTW, the existing makefile fragment:
ifeq ($(ARCH),powerpc)
ARCH = ppc
endif

does not do anything if you pass ARCH in the environment either.  U-Boot will 
build if you pass ARCH=powerpc that way, but it will also build if you pass 
ARCH=nonsense, as whatever you specify will be replaced by include/config.mk.

-Scott

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-10-26 22:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-19 21:24 [U-Boot] [PATCH 1/2] Don't let the command-line ARCH=powerpc override our redefinition to ppc Scott Wood
2009-10-19 22:33 ` Wolfgang Denk
2009-10-19 22:53   ` Scott Wood
2009-10-26 22:21     ` Scott Wood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox