Re: [PATCH] auto-detect changed $prefix in Makefile and properly rebuild to avoid broken install
- From
Junio C Hamano <junkio@cox.net>
- Date
- Jun 14, 2006, 20:04 UTC
- Message-ID
- <7vver3cxlw.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <0J0V00LDT7B9BU00@mxout2.netvision.net.il>
Yakov Lerner <iler.ml@gmail.com> writes:
Show 6 quoted lines
> Many times, I mistakenly used 'make prefix=... install' where prefix value > was different from prefix value during build. This resulted in broken > install. This patch adds auto-detection of $prefix change to the Makefile. > This results in correct install whenever prefix is changed. > > Signed-off-by: Yakov Lerner <iler.ml@gmail.com>
I do not mind this per se, and probably even agree that this is an improvement compared to the current state of affairs, but a few points:
- please make sure you clean that state file in "make clean";
- we may want to make the state file a bit more visible (IOW, I somewhat do mind the name being dot-git-dot-prefix).
- we might want to later (or at the same time as this patch) do "consistent set of compilation flags" (e.g. run early part of compilation with openssl SHA-1 implementation, interrupt it and build and link the rest with mozilla SHA-1 implementation -- then you will get a nonsense binary without linker errors). It might make sense to prepare this mechanism so we could reuse it for that purpose.