Mercurial > hg > openttd
changeset 12013:c0e05f81bf93 draft
(svn r16419) -Fix [FS#2916]: MSYS has two distinct ways to write paths. When calling external binaries it resolves paths which causes comparisons between a resolved and unresolved path. So always use the resolved path instead of the unresolved one.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Sun, 24 May 2009 17:34:39 +0000 |
parents | 7299060f4fb6 |
children | 47c1a32b550d |
files | Makefile.src.in configure |
diffstat | 2 files changed, 9 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile.src.in +++ b/Makefile.src.in @@ -190,7 +190,7 @@ # Convert x:/... paths to /x/... for mingw ifeq ($(OS), MINGW) - @cat Makefile.dep.tmp | sed 's@\([a-zA-Z]\):\/@\/\1\/@g' > Makefile.dep.tmp.mingw + @cat Makefile.dep.tmp | sed 's@/\([a-zA-Z]\):\/@\/\1\/@g' > Makefile.dep.tmp.mingw @cp Makefile.dep.tmp.mingw Makefile.dep.tmp @rm -f Makefile.dep.tmp.mingw endif @@ -200,7 +200,7 @@ @$(AWK) ' \ /^# DO NOT/ { print $$0 ; next} \ /^#/ {next} \ - /:/ { \ + /: / { \ left = NF - 1; \ for (n = 2; n <= NF; n++) { \ if (match($$n, "^$(ROOT_DIR)") == 0) { \
--- a/configure +++ b/configure @@ -22,11 +22,16 @@ fi # Find out where configure is (in what dir) ROOT_DIR="`dirname $0`" -ROOT_DIR="`cd $ROOT_DIR && pwd`" +# For MSYS/MinGW we want to know the FULL path. This as that path is generated +# once you call an outside binary. Having the same path for the rest is needed +# for dependency checking. +# pwd -W returns said FULL path, but doesn't exist on others so fall back. +ROOT_DIR="`cd $ROOT_DIR && (pwd -W 2>/dev/null || pwd 2>/dev/null)`" check_path_characters -PWD="`pwd`" +# Same here as for the ROOT_DIR above +PWD="`pwd -W 2>/dev/null || pwd 2>/dev/null`" PREFIX="$PWD/bin" . $ROOT_DIR/config.lib