Subject: Re: bug#75655: configure doesn't update Makefile

From: Eli Zaretskii <[email-masked]>
Date: Thu, 23 Jan 2025 08:07:14 +0200

> Cc: [email-masked]
> Date: Wed, 22 Jan 2025 20:44:59 +0000
> From:  Pip Cet via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> I switch between revisions a lot, and it's not obvious how to fix this
> from the error message:

My advice: don't switch Emacs branches in the same directory.  Emacs
branches are usually quite divergent, and making our build machinery
110% resistant to such switches would add complications that are
unjustified, especially since some dependencies are inherently hard to
track given the functionality of Make programs.

Switching branches in the same directory only works well if the
branches are similar enough.  Once you get to the situation where
directories and/or many files are being added/removed by one of the
branches (something that happens a lot here), problems begin that are
hard to fix using Make.

So my advice is to use separate directories for different branches.
Git supports this even if you don't want to have separate clones
(which is always a possibility): you can use "git worktree" commands.

> A third option would be to use the recipe I proposed, only instead of
> running config.status, we'd tell the user to, then fail the rule.

My tendency is not to support these cases if the price is significant
complications in our Makefiles and/or redundant regenerations of
files/targets (like loaddefs.el etc.) that don't need to be
regenerated.