summaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2013-11-05 16:51:09 -0500
committerGlenn Morris <rgm@gnu.org>2013-11-05 16:51:09 -0500
commitc923b188f48bb342b30870eda89ea8d79376b05d (patch)
tree3a389513421d7b58481b3221807bf76494cf2743 /Makefile.in
parent02fc973bc978ccc4570d8f7b00c85346e8cd5df6 (diff)
downloademacs-c923b188f48bb342b30870eda89ea8d79376b05d.tar.gz
* Makefile.in (epaths-force-w32): Move srcdir tweak here
* configure.ac (abs_srcdir) [MINGW32]: No point setting it here, config.status computes it.
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile.in b/Makefile.in
index 461f0cb0481..984dcea7cca 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -342,8 +342,16 @@ msys_sed_sh_escape=sed -e 's/[];$$*.^[]/\\\\&/g'
# nt/epaths.nt as the template.
# Use the value of ${locallisppath} supplied by `configure',
# to support the --enable-locallisppath argument.
+#
+# When building with MinGW inside the MSYS tree, 'pwd' produces directories
+# relative to the root of the MSYS tree, e.g. '/home/user/foo' instead of
+# '/d/MSYS/home/user/foo'. If such a value of srcdir is written to
+# src/epaths.h, that causes temacs to fail, because, being a MinGW
+# program that knows nothing of MSYS root substitution, it cannot find
+# the data directory. "pwd -W" produces Windows-style 'd:/foo/bar'
+# absolute directory names, so we use it here to countermand that lossage.
epaths-force-w32: FRC
- @(w32srcdir=`echo "${abs_srcdir}" | ${msys_to_w32}` ; \
+ @(w32srcdir=`cd "${srcdir}"; pwd -W | sed -e 's,^\([A-Za-z]\):,/\1,' | ${msys_to_w32}` ; \
prefixpattern=`echo '${prefix}' | ${msys_to_w32} | ${msys_sed_sh_escape}` ; \
locallisppath=`echo '${locallisppath}' | ${msys_lisppath_to_w32} | ${msys_prefix_subst}` ; \
sed < ${srcdir}/nt/epaths.nt > epaths.h.$$$$ \