Really good feedback here!

>    Provide an option that causes make to rebuild its command line goals
as if they are out of date, without considering or rebuilding the goals'
prerequisites.
that is a correct way of rephrasing it / what is entailed by "ignore
prerequisites".

> $< and $^
correct! Honestly i had not even thought about $ syntax. haha. of course
this is more complicated than 'simply just ignore and do'

> $?
I think the correct behavior for this is null / empty string. This can be
documented in the --help for the option.

>  cause the command-line goals' timestamps to be updated to "now", without
actually checking and udpating the prerequisites.
Something else I hadn't considered! This is a big problem for this
feature... Ideally it'd be good to not update the timestamp. But I think
that's not possible. I imagine that 'make' is checking the timestamp of the
file on disk. In this case, I think users would have to use at their own
discretion, keeping in mind that --ignore-prerequisites is not in the
spirit of normal 'make', and can break things. I'd document this side
effect in the --help, and give the recommendation that in order to ensure
that the prereq chain is up to date, in the future you can use -B to force
things.

But yeah, this does make the flag 'dangerous' if misused. Maybe that's the
reason this has never been added in the past. I can't possibly have been
the first to have considered this option.

On Mon, Nov 24, 2025 at 2:46 PM Paul Smith <[email protected]> wrote:

> On Sun, 2025-11-23 at 15:33 -0500, Joe Flack wrote:
> > Me and others using make have frequently wanted this simple feature:
> >
> > "Run a goal, but ignore prerequisites. Act as if they don't exist."
>
> I think Basile's suggestion is backwards, isn't it?  Don't you want to
> use the -W option with each prerequisite, to cause make to think that
> prerequisite is fully updated, so that it won't be updated again?
>
> The problem with this is you have to provide every prerequisite, and
> every prerequisite of all the prerequisites, etc. to -W else make will
> build whatever is out of date, that you didn't mark with -W.
>
> But, if you only have a few specific targets which are very expensive
> you can list just those with -W, maybe with a shell alias or variable
> or something; that might work...?
>
>
> I believe the enhancement you want can be stated more precisely as:
>
>    Provide an option that causes make to rebuild its command line goals
>    as if they are out of date, without considering or rebuilding the
>    goals' prerequisites.
>
>
> But there are unanswered questions in this suggestion.
>
> First, I assume you want the $< and $^ automatic variables to contain
> the prerequisites, rather than being empty, even though the
> prerequisites weren't considered?
>
> Second, what should make use for the value of the $? automatic
> variable, in this scenario?  Should it contain all the prerequisites?
> None of them?  Only the ones where the prerequisite file either doesn't
> exist or is newer than the target?
>
> Third, I have a concern about how this might impact build systems.  If
> all the targets you are working with are PHONY it's no big deal but if
> they are normal targets this will cause the command-line goals'
> timestamps to be updated to "now", without actually checking and
> udpating the prerequisites.
>
> Admittedly offhand I can't come up with an example where this breaks
> things but I bet they exist.  At the very least we should understand
> this and think about it.  Maybe this option should only be allowed for
> PHONY targets, for safety?  Or maybe it shouldn't update the timestamp
> on the goal (obviously we can't prevent the timestamp from being
> updated by the recipe but we could replace it with the previous
> timestamp).  But I don't really like this as it feels too magical in
> ways that make isn't usually.
>

Reply via email to