linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Stephen Warren" <SWarren@nvidia.com>
To: "Sam Ravnborg" <sam@ravnborg.org>,
	"Kumar Gala" <kumar.gala@freescale.com>
Cc: Tom Rini <trini@kernel.crashing.org>,
	cpclark@xmission.com,
	Linux Kernel list <linux-kernel@vger.kernel.org>,
	linuxppc-embedded list <linuxppc-embedded@ozlabs.org>
Subject: RE: PPC uImage build not reporting correctly
Date: Tue, 10 May 2005 08:14:16 -0700	[thread overview]
Message-ID: <DBFABB80F7FD3143A911F9E6CFD477B007228DB0@hqemmail02.nvidia.com> (raw)

From: linux-kernel-owner@vger.kernel.org
[mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of Sam Ravnborg
> On Mon, May 09, 2005 at 10:19:01AM -0500, Kumar Gala wrote:
> > On May 6, 2005, at 6:22 PM, <cpclark@xmission.com> wrote:
> > > Couldn't you eliminate the ($shell ..) construct altogether, like=20
> > > 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
> >=20
> > Yes, and this seems to actually work.
> >=20
> > 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.
=20
It's because both any $(xxx) in the command will be expanded prior to
the command being executed ("command" meaning all lines in the complete
command script for the target in question - not on a line-by-line
basis).

Thus, the original $(wildcard), and also the $(shell) above are
evaluated/expanded by gmake prior to running any of the the "rm -rf",
"if_changed", and "echo" commands, and hence run before the uImage file
is created, and hence always think that it doesn't exist.

The only solution is to get the shell to do the evaluation of whether
uImage exists - that way, the evaluation is guaranteed to happen after
the uImage is (hopefully) created.

--=20
Stephen Warren, Software Engineer, NVIDIA, Fort Collins, CO
swarren@nvidia.com        http://www.nvidia.com/
swarren@wwwdotorg.org     http://www.wwwdotorg.org/pgp.html

             reply	other threads:[~2005-05-10 15:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-10 15:14 Stephen Warren [this message]
     [not found] <Pine.LNX.4.63.0505061718380.6288@xmission.xmission.com>
2005-05-09 15:19 ` PPC uImage build not reporting correctly Kumar Gala
2005-05-10  4:28   ` Sam Ravnborg
2005-05-10 10:34     ` cpclark
2005-05-11  5:01       ` Sam Ravnborg
  -- strict thread matches above, loose matches on Subject: below --
2005-05-06 15:23 Kumar Gala
2005-05-06 21:45 ` Sam Ravnborg
2005-05-06 21:57   ` Kumar Gala

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=DBFABB80F7FD3143A911F9E6CFD477B007228DB0@hqemmail02.nvidia.com \
    --to=swarren@nvidia.com \
    --cc=cpclark@xmission.com \
    --cc=kumar.gala@freescale.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-embedded@ozlabs.org \
    --cc=sam@ravnborg.org \
    --cc=trini@kernel.crashing.org \
    /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;
as well as URLs for NNTP newsgroup(s).