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.
