help-make
[Top][All Lists]
Advanced

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

Re: Confusion around empty recipe


From: Jeenu Viswambharan
Subject: Re: Confusion around empty recipe
Date: Sun, 2 Jun 2024 18:49:50 +0100

On Sun, Jun 2, 2024 at 4:26 PM Mike Haboustak <haboustak@gmail.com> wrote:
> The high-level summary is that Make does not update the mtime for
> no-recipe targets after rebuilding them. Adding the empty recipe
> ensures a new mtime is recorded after the target is rebuilt, even
> though no additional work is performed.

Ah yes - I suspected as much! Because, from the output of 'make -rd',
I could see make running the touch command to update the .js files,
but subsequently make says the prerequisite, which it just updated, is
still older.

> The three work-arounds are: an empty recipe implicit rule, the new
> grouped targets implicit rule feature, or pattern rules, which work
> differently. Pattern rules may be what you want, unfortunately they're
> often not flexible enough to match all target/prerequisite file paths.

Now that I know what's happening, I think I can live with empty-recipe
workaround.

-- 
Jeenu



reply via email to

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