ICU-5628 Fix using install-sh in out-of-source builds - #4109
Conversation
|
Hooray! The files in the branch are the same across the force-push. 😃 ~ Your Friendly Jira-GitHub PR Checker Bot |
| INSTALL="\\\$(top_srcdir)/${ac_install_sh}" | ||
| fi | ||
| # If using the included install-sh, make INSTALL work from any build dir. | ||
| if test "${ac_install_sh}" = "${INSTALL}"; then |
There was a problem hiding this comment.
Unchanged guard, and matching an effect in AC_PROG_INSTALL.
| # If using the included install-sh, make INSTALL work from any build dir. | ||
| if test "${ac_install_sh}" = "${INSTALL}"; then | ||
| case "$srcdir" in | ||
| .|./*|../*) INSTALL="\\\$(top_builddir)/${ac_install_sh}" ;; |
There was a problem hiding this comment.
Guard based on srcdir, similar to original code. I believe srcdir makes sense because it is used to construct the search path - and thus becomes part of the value - for install-sh.
Now any relative path instead of just ., and now prepending top_builddir instead of top_srcdir.
|
Disclaimer: I did not test this with in-source builds. |
|
This fix is pointless with the 25 year old Line 192 in f86dc86 Line 212 in f86dc86 Up-to-date version: https://github.com/autotools-mirror/autoconf/blob/master/build-aux/install-sh |
Please do test.
So we should probably update that first, and test that that update does not break things. |
|
Agreed, removing the use of |
|
Looks good but agreed, needs to be tested at each step. |
Cf. microsoft/vcpkg#53279:
icu's
configure.acusesAC_PROG_INSTALLwhich tries to find a fast binaryinstalland uses a slowinstall-shscript as fallback. Via@INSTALL@, the result is baked intoicudefs.mkin the toplevel build directory.When the fallback is used, icu prepends
$(top_srcdir)for in-source builds (i.e.${srcdir} = "."). (I assume this was meant as a fix for ICU-525 which is the same error for in-source builds.)For out-of-source builds, nothing is prepended, and so the value of
INSTALLis valid only for the toplevel build dir. This leads to errors when it is actually used in subdirs.This change prepends
$(top_builddir)instead, so that a valid path is construct for every possible case. Prepending is scoped to situations wheresrcpathis relative.To reproduce the original issue, rename /usr/bin/install and similar candidates before running
../path/to/icu/source/configure.The change from this PR is in
configure.ac.configureis generated from that file.Checklist