Re: [PATCH] auto-detect changed $prefix in Makefile and properly rebuild to avoid broken install

2 messages, 2 authors, 2016-08-11 · open the first message on its own page

Re: [PATCH] auto-detect changed $prefix in Makefile and properly rebuild to avoid broken install

From: Junio C Hamano <hidden>
Date: 2016-08-11 19:28:54

Santi [off-list ref] writes:
Wed, 14 Jun 2006 22:26 +0300, Yakov Lerner [off-list ref]:
quoted
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.
I do this each time I install packages from source. I keep them with
"stow" and the usual sequence is:

make prefix=/home/santi/usr
make install prefix=/home/santi/usr/stow/git
cd /home/santi/usr/stow/
stow -v git

so with this auto-detection I'll compile some programs twice.
I do not know what "stow" is about, but if it is to allow you to
run make-install to install things in somewhere else, examine
the result, and then move the result to the real location
(implying that you should be able to nuke the "somewhere else"
after you have done so), with the patch, the above sequence
would install the binaries pointing at a wrong directory,
because the second compilation would make them point at the
temporary installation directory ~/usr/stow/git, not the final
location ~/usr/.

Re: [PATCH] auto-detect changed $prefix in Makefile and properly rebuild to avoid broken install

From: Karl Hasselström <hidden>
Date: 2016-06-15 22:42:30

On 2006-06-16 22:26:38 -0700, Junio C Hamano wrote:
I do not know what "stow" is about, but if it is to allow you to run
make-install to install things in somewhere else, examine the
result, and then move the result to the real location (implying that
you should be able to nuke the "somewhere else" after you have done
so), with the patch, the above sequence would install the binaries
pointing at a wrong directory, because the second compilation would
make them point at the temporary installation directory
~/usr/stow/git, not the final location ~/usr/.
GNU stow doesn't move installed programs, it just maintains symlinks
to them. You install programs under /usr/local/stow/foo-4.7.11, and
stow sets up symlinks to them under /usr/local. (So for example,
/usr/local/bin/foo would be a symlink to
/usr/local/stow/foo-4.7.11/bin/foo.) This gives you the ability to
nuke an installed program cleanly. And it just works, pathwise, since
the program remains in its original location.

-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help