[Top][All Lists]

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

Re: Request for review of failing makefile

From: Bart Robinson
Subject: Re: Request for review of failing makefile
Date: Mon, 21 Dec 2009 10:26:14 -0800

On Mon, Dec 21, 2009 at 9:23 AM, David Aldrich <address@hidden> wrote:
>> You can quickly check if my hypothesis is correct by adding an empty
>> command to $(ARCHIVES_R), e.g.
>>       @echo "updated $@"
> As I wrote before, this solved my problem, i.e. the executable now gets
> relinked when the static library changes (before the link did not happen).
> This is great. However, there is the side effect that I now see the
> message:
> "updated ../lib.a"

It is typical to make the command empty, e.g.
    target: prereqs ;
the semicolon ends the prereqs and starts the commands, which are empty.
You can highlight the magic of the empty commands by using ":" which
is a special
command that does nothing:
    target: prereqs ; @:
that is cryptic enough that it may deter other engineers from messing
with the rule
and breaking your makefile, plus you can search on @: to find these rules.

-- bart

reply via email to

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