[Top][All Lists]

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

Re: empty $? (bug 8154?)

From: Paul D. Smith
Subject: Re: empty $? (bug 8154?)
Date: Tue, 27 Dec 2005 22:16:51 -0500

%% "Jan Beulich" <address@hidden> writes:

  jb> In a makefile like presented in the first response to this issue,
  jb> it is claimed that it is appropriate for $? to be empty. However,
  jb> I would assume that if $? is empty and if the target exists, then
  jb> there is no need to remake the target. Or, to say it the other way
  jb> around, if an existing target is remade it should be safe to
  jb> assume $? is non-empty.

  jb> Further, the documentation says in 'Rules without Commands or
  jb> Prerequisites': 'If a rule has no prerequisites or commands, and
  jb> the target of the rule is a nonexistent file, then make imagines
  jb> this target to have been updated whenever its rule is run. This
  jb> implies that all targets depending on this one will always have
  jb> their commands run.'  This, to me, also implies that dependencies
  jb> like the commonly used FORCE target should be visible in $?.

Sorry, Jan, but I don't understand your comments here and how they
relate to either bug #8154 (other than that they are both about $?) or
the FORCE stuff you mention.  That bug talks about updating archives
where there is no command to update them; you appear to be talking about
something completely different here.

Most of the time an example is worth a few hundred words, at least: can
you please provide a simple couple of lines of makefile to reproduce the
situation you are seeing, show the output make gives, and explain
exactly why you feel this is incorrect?  We can move on from there.

Just to be clear, I tried this makefile:

    $ cat Makefile
    foo: FORCE ; @echo '$$? = $?'

    $ make
    $? = FORCE

every time, so I don't understand your comment that FORCE should be
visible in $?, as if it weren't visible there... it IS visible there?

 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist

reply via email to

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