help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Post 3.81 $? handling


From: John Graham-Cumming
Subject: Re: Post 3.81 $? handling
Date: Sun, 30 Apr 2006 07:18:17 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040208 Thunderbird/0.5 Mnenhy/0.6.0.104

Paul D. Smith wrote:
  $ cat makefile

  foo: bar ; @echo "\$$? = $?"
  bar: ;

  $ touch foo

  $ make
$? =

OK. I see that works, now why? I'm assuming that the difference between bar: and bar: ; is that GNU Make thinks that it's updated bar in the latter case, but in the former it does not.

What I'm not sure about is why $? contains bar if I do bar: How does that come about? Is that because bar: is a 'FORCE' target and hence GNU Make is pretending it's up to date and hence it gets put into $?

John.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]