All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] Makefile: remove symbolic links in tools/
@ 2010-02-05 23:49 Alessandro Rubini
  2010-02-06  0:01 ` Mike Frysinger
  0 siblings, 1 reply; 6+ messages in thread
From: Alessandro Rubini @ 2010-02-05 23:49 UTC (permalink / raw)
  To: u-boot

Older versions created symbolic links for e.g. crc32.c.
If such link remains in a tree, current Makefiles will use CC
instead of HOSTCC to compile it; this results in a linker error.
To be safe, let's remove any link from earlier checkouts.

Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
---
 Makefile |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index 327aa8c..f85462c 100644
--- a/Makefile
+++ b/Makefile
@@ -3778,6 +3778,7 @@ clobber:	clean
 	@rm -f $(obj)include/asm/proc $(obj)include/asm/arch $(obj)include/asm
 	@[ ! -d $(obj)nand_spl ] || find $(obj)nand_spl -name "*" -type l -print | xargs rm -f
 	@[ ! -d $(obj)onenand_ipl ] || find $(obj)onenand_ipl -name "*" -type l -print | xargs rm -f
+	@[ ! -d $(obj)tools ] || find $(obj)tools -name "*" -type l -print | xargs rm -f
 
 ifeq ($(OBJTREE),$(SRCTREE))
 mrproper \
-- 
1.5.6.5

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

* [U-Boot] [PATCH] Makefile: remove symbolic links in tools/
  2010-02-05 23:49 [U-Boot] [PATCH] Makefile: remove symbolic links in tools/ Alessandro Rubini
@ 2010-02-06  0:01 ` Mike Frysinger
  2010-02-06  1:08   ` Ben Warren
  0 siblings, 1 reply; 6+ messages in thread
From: Mike Frysinger @ 2010-02-06  0:01 UTC (permalink / raw)
  To: u-boot

On Friday 05 February 2010 18:49:37 Alessandro Rubini wrote:
> Older versions created symbolic links for e.g. crc32.c.
> If such link remains in a tree, current Makefiles will use CC
> instead of HOSTCC to compile it; this results in a linker error.
> To be safe, let's remove any link from earlier checkouts.

current policy is to run `git clean -x -d` after a `git pull`, but i dont care either way

> --- a/Makefile
> +++ b/Makefile
>  	@[ ! -d $(obj)nand_spl ] || find $(obj)nand_spl -name "*" -type l -print | xargs rm -f
>  	@[ ! -d $(obj)onenand_ipl ] || find $(obj)onenand_ipl -name "*" -type l -print | xargs rm -f
>	@[ ! -d $(obj)tools ] || find $(obj)tools -name "*" -type l -print | xargs rm -f

not related directly to your patch, but these -name '*' are useless

also, why not just scan the entire tree:
	@[ ! -d $(obj) ] || find $(obj) -type l -print | xargs rm -f
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100205/a01ed65b/attachment.pgp 

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

* [U-Boot] [PATCH] Makefile: remove symbolic links in tools/
  2010-02-06  0:01 ` Mike Frysinger
@ 2010-02-06  1:08   ` Ben Warren
  2010-02-06  1:36     ` Mike Frysinger
  2010-02-06  8:06     ` Alessandro Rubini
  0 siblings, 2 replies; 6+ messages in thread
From: Ben Warren @ 2010-02-06  1:08 UTC (permalink / raw)
  To: u-boot

On 2/5/2010 4:01 PM, Mike Frysinger wrote:
> On Friday 05 February 2010 18:49:37 Alessandro Rubini wrote:
>    
>> Older versions created symbolic links for e.g. crc32.c.
>> If such link remains in a tree, current Makefiles will use CC
>> instead of HOSTCC to compile it; this results in a linker error.
>> To be safe, let's remove any link from earlier checkouts.
>>      
> current policy is to run `git clean -x -d` after a `git pull`, but i dont care either way
>
>    
>> --- a/Makefile
>> +++ b/Makefile
>>   	@[ ! -d $(obj)nand_spl ] || find $(obj)nand_spl -name "*" -type l -print | xargs rm -f
>>   	@[ ! -d $(obj)onenand_ipl ] || find $(obj)onenand_ipl -name "*" -type l -print | xargs rm -f
>> 	@[ ! -d $(obj)tools ] || find $(obj)tools -name "*" -type l -print | xargs rm -f
>>      
> not related directly to your patch, but these -name '*' are useless
>
> also, why not just scan the entire tree:
> 	@[ ! -d $(obj) ] || find $(obj) -type l -print | xargs rm -f
> -mike
>    
>    
And 'find' had a '-delete' switch.  Not sure how long it's been there.

regards,
Ben

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

* [U-Boot] [PATCH] Makefile: remove symbolic links in tools/
  2010-02-06  1:08   ` Ben Warren
@ 2010-02-06  1:36     ` Mike Frysinger
  2010-02-06  8:06     ` Alessandro Rubini
  1 sibling, 0 replies; 6+ messages in thread
From: Mike Frysinger @ 2010-02-06  1:36 UTC (permalink / raw)
  To: u-boot

On Friday 05 February 2010 20:08:38 Ben Warren wrote:
> On 2/5/2010 4:01 PM, Mike Frysinger wrote:
> > On Friday 05 February 2010 18:49:37 Alessandro Rubini wrote:
> >> Older versions created symbolic links for e.g. crc32.c.
> >> If such link remains in a tree, current Makefiles will use CC
> >> instead of HOSTCC to compile it; this results in a linker error.
> >> To be safe, let's remove any link from earlier checkouts.
> >
> > current policy is to run `git clean -x -d` after a `git pull`, but i dont
> > care either way
> >
> >> --- a/Makefile
> >> +++ b/Makefile
> >>   	@[ ! -d $(obj)nand_spl ] || find $(obj)nand_spl -name "*" -type l
> >> -print | xargs rm -f @[ ! -d $(obj)onenand_ipl ] || find
> >> $(obj)onenand_ipl -name "*" -type l -print | xargs rm -f @[ ! -d
> >> $(obj)tools ] || find $(obj)tools -name "*" -type l -print | xargs rm -f
> >
> > not related directly to your patch, but these -name '*' are useless
> >
> > also, why not just scan the entire tree:
> > 	@[ ! -d $(obj) ] || find $(obj) -type l -print | xargs rm -f
> 
> And 'find' had a '-delete' switch.  Not sure how long it's been there.

i didnt suggest that because it isnt POSIX.  it'll break on BSD systems which 
typically ship with sh*t userland tools.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100205/79a73b4d/attachment.pgp 

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

* [U-Boot] [PATCH] Makefile: remove symbolic links in tools/
  2010-02-06  1:08   ` Ben Warren
  2010-02-06  1:36     ` Mike Frysinger
@ 2010-02-06  8:06     ` Alessandro Rubini
  2010-02-06 14:19       ` Wolfgang Denk
  1 sibling, 1 reply; 6+ messages in thread
From: Alessandro Rubini @ 2010-02-06  8:06 UTC (permalink / raw)
  To: u-boot

Mike Frysinger about -delete:
> i didnt suggest that because it isnt POSIX.  it'll break on BSD systems which
> typically ship with sh*t userland tools.

Actually, I just copied the above line with "-name *" and stuff
because I know there are portability issues I'm not aware of.
Actually, Git blame says -name comes from an original "-lname *", that
Jean Christophe turned to "-name * -type l" for posix compliance.  He
has been tricked by the original name-based match.

I proposed the one-liner only because I remember a similar issue being
addressed not long ago in the makefiles.  But I'm fine with removing
all such legacy, either, assuming novices will have a clean tool and
git users are able to "git status" or "git clean".

/alessandro

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

* [U-Boot] [PATCH] Makefile: remove symbolic links in tools/
  2010-02-06  8:06     ` Alessandro Rubini
@ 2010-02-06 14:19       ` Wolfgang Denk
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2010-02-06 14:19 UTC (permalink / raw)
  To: u-boot

Dear Alessandro Rubini,

In message <20100206080636.GA24726@morgana.gnudd.com> you wrote:
> Mike Frysinger about -delete:
> > i didnt suggest that because it isnt POSIX.  it'll break on BSD systems which
> > typically ship with sh*t userland tools.
> 
> Actually, I just copied the above line with "-name *" and stuff

But "-name *" is really redundant, on all systems I know of.

> I proposed the one-liner only because I remember a similar issue being
> addressed not long ago in the makefiles.  But I'm fine with removing
> all such legacy, either, assuming novices will have a clean tool and
> git users are able to "git status" or "git clean".

Agreed. Let's drop this change.

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 can't understand it. I can't even understand  the  people  who  can
understand it.                    - Queen Juliana of the Netherlands.

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

end of thread, other threads:[~2010-02-06 14:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-05 23:49 [U-Boot] [PATCH] Makefile: remove symbolic links in tools/ Alessandro Rubini
2010-02-06  0:01 ` Mike Frysinger
2010-02-06  1:08   ` Ben Warren
2010-02-06  1:36     ` Mike Frysinger
2010-02-06  8:06     ` Alessandro Rubini
2010-02-06 14:19       ` Wolfgang Denk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.