bug-make
[Top][All Lists]
Advanced

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

Re: empty $? (bug 8154?)


From: Jan Beulich
Subject: Re: empty $? (bug 8154?)
Date: Tue, 03 Jan 2006 11:02:42 +0100

>>> "Paul D. Smith" <address@hidden> 28.12.05 04:16 >>>
%% "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.

That's why I referred to the first response to bug #8154, which doesn't
have to do with building archives.

>Just to be clear, I tried this makefile:
>
>    $ cat Makefile
>    foo: FORCE ; @echo '$$? = $?'
>    FORCE:
>
>    $ 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?

The difference to the mentioned example is the missing 'touch foo'
prior to running make. Depending on whether foo exists, $? will or will
not be empty; its commands, however, will always be run (as expected).
My point is that if a target's commands get run, should it be obvious
that then $? cannot be empty?

Thanks again, Jan




reply via email to

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