Re: PPC uImage build not reporting correctly

4 messages, 3 authors, 2005-05-11 · open the first message on its own page

Re: PPC uImage build not reporting correctly

From: Kumar Gala <hidden>
Date: 2005-05-09 15:19:20

On May 6, 2005, at 6:22 PM, [off-list ref] wrote:
On Fri, 6 May 2005, Kumar Gala wrote:
 > I tried the following w/o success:
 >
quoted
$(obj)/uImage: $(obj)/vmlinux.gz
=A0=A0=A0=A0=A0=A0=A0=A0 $(Q)rm -f $@
 >=A0=A0=A0=A0=A0=A0=A0=A0 $(call if_changed,uimage)
quoted
=A0=A0=A0=A0=A0=A0=A0=A0 @echo '=A0 Image: $@' $(shell if [ -f $@ ]; =
then echo 'is=20
ready'; else
 > echo 'not made'; fi)

Couldn't you eliminate the ($shell ..) construct altogether, like=20
this?:

$(obj)/uImage: $(obj)/vmlinux.gz
=A0=A0=A0=A0=A0=A0=A0 $(Q)rm -f $@
 =A0=A0=A0=A0=A0=A0=A0 $(call if_changed,uimage)
=A0=A0=A0=A0=A0=A0=A0 @echo -n '=A0 Image: $@'
 =A0=A0=A0=A0=A0=A0=A0 @if [ -f $@ ]; then echo 'is ready' ; else echo =
'not made'; fi

Yes, and this seems to actually work.

Sam, does this look reasonable to you.  If so I will work up a patch.

thanks

- kumar

Re: PPC uImage build not reporting correctly

From: Sam Ravnborg <hidden>
Date: 2005-05-10 04:27:22

On Mon, May 09, 2005 at 10:19:01AM -0500, Kumar Gala wrote:
On May 6, 2005, at 6:22 PM, [off-list ref] wrote:
quoted
On Fri, 6 May 2005, Kumar Gala wrote:
quoted
I tried the following w/o success:

$(obj)/uImage: $(obj)/vmlinux.gz
???????? $(Q)rm -f $@
???????? $(call if_changed,uimage)
???????? @echo '? Image: $@' $(shell if [ -f $@ ]; then echo 'is 
ready'; else
quoted
echo 'not made'; fi)
Couldn't you eliminate the ($shell ..) construct altogether, like 
this?:

$(obj)/uImage: $(obj)/vmlinux.gz
??????? $(Q)rm -f $@
??????? $(call if_changed,uimage)
??????? @echo -n '? Image: $@'
??????? @if [ -f $@ ]; then echo 'is ready' ; else echo 'not made'; fi
Yes, and this seems to actually work.

Sam, does this look reasonable to you.  If so I will work up a patch.
Looks ok - but I do not see why use of $(shell ...) did not work out.
Please bring your working version forward.

	Sam

Re: PPC uImage build not reporting correctly

From: <hidden>
Date: 2005-05-10 10:34:24

On Tue, 10 May 2005, Sam Ravnborg wrote:
On Mon, May 09, 2005 at 10:19:01AM -0500, Kumar Gala wrote:
quoted
On May 6, 2005, at 6:22 PM, [off-list ref] wrote:
quoted
On Fri, 6 May 2005, Kumar Gala wrote:
quoted
I tried the following w/o success:

$(obj)/uImage: $(obj)/vmlinux.gz
        $(Q)rm -f $@
        $(call if_changed,uimage)
        @echo ' Image: $@' $(shell if [ -f $@ ]; then echo 'is ready'; else echo 'not made'; fi)
Couldn't you eliminate the ($shell ..) construct altogether, like this?:

$(obj)/uImage: $(obj)/vmlinux.gz
       $(Q)rm -f $@
       $(call if_changed,uimage)
       @echo -n '? Image: $@'
       @if [ -f $@ ]; then echo 'is ready' ; else echo 'not made'; fi
Yes, and this seems to actually work.

Sam, does this look reasonable to you.  If so I will work up a patch.
Looks ok - but I do not see why use of $(shell ...) did not work out.
As I understand it, the $(shell ...) construct doesn't "work" in the case 
cited above because make evaluates/expands the $(shell ...) stuff while it 
is parsing the makefile and building the command list--i.e. before it has 
issued any commands to build anything.  What seems to be desired in this 
case is a file-existence test which runs "inline" with respect to the 
preceding commands.  The use of $(shell ...) inside a command 
subverts/preempts that natural sequence.  I think. :-)

Chris

Re: PPC uImage build not reporting correctly

From: Sam Ravnborg <hidden>
Date: 2005-05-11 04:59:57

 >
quoted
Looks ok - but I do not see why use of $(shell ...) did not work out.
As I understand it, the $(shell ...) construct doesn't "work" in the case 
cited above because make evaluates/expands the $(shell ...) stuff while it 
is parsing the makefile and building the command list--i.e. before it has 
issued any commands to build anything.  What seems to be desired in this 
case is a file-existence test which runs "inline" with respect to the 
preceding commands.  The use of $(shell ...) inside a command 
subverts/preempts that natural sequence.  I think. :-)
That explains it - thanks!

	Sam
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help