emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New msys-to-w32 breaks using %emacs_dir%, @VER@ in locallisppath


From: Dani Moncayo
Subject: Re: New msys-to-w32 breaks using %emacs_dir%, @VER@ in locallisppath
Date: Sat, 30 Nov 2013 08:12:51 +0100

>   ./build-aux/msys-to-w32: line 142: cd: %emacs_dir%/../: No such file
> or directory
>   msys-to-w32: invalid path: %emacs_dir%/share/emacs/@VER@/site-lisp

The below patch fixes this problem.

(the change to 'Makefile.in' fixes a related bug reported yesterday)


diff --git a/Makefile.in b/Makefile.in
index 3e3a4f5..065168b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -338,7 +338,7 @@ msys_sed_sh_escape=sed -e 's/[];$$*.^[]/\\\\&/g'
 epaths-force-w32: FRC
  @(w32srcdir=`${srcdir}/build-aux/msys-to-w32 "${srcdir}"`; \
   w32prefix=`${srcdir}/build-aux/msys-to-w32 "${prefix}" N`; \
-  w32prefixpattern=`echo "${w32prefix}" | ${msys_sed_sh_escape}` ; \
+  w32prefixpattern=`echo "$${w32prefix}" | ${msys_sed_sh_escape}` ; \
   w32locallisppath=`${srcdir}/build-aux/msys-to-w32
"${locallisppath}" N ":" "\\;" | ${msys_w32prefix_subst}` ; \
   sed < ${srcdir}/nt/epaths.nt > epaths.h.$$$$ \
   -e 's;\(#.*PATH_SITELOADSEARCH\).*$$;\1 "'"$${w32locallisppath}"'";' \
diff --git a/build-aux/msys-to-w32 b/build-aux/msys-to-w32
index e45ec3c..7a8fa86 100755
--- a/build-aux/msys-to-w32
+++ b/build-aux/msys-to-w32
@@ -36,7 +36,8 @@ transformations:
 3. Replace two consecutive slashes with single ones.
 4. Translate to Windows-native format those paths that are not in such
    format already. The translated paths will not end with a slash,
-   except for root directories (e.g. 'c:/' or 'c:/foo').
+   except for root directories (e.g. 'c:/' or 'c:/foo').  Paths
+   starting with '%emacs_dir%' will not be translated.
 5. Escape with backslashes every occurrence of SEPARATOR2 within the paths.
 6. Concatenate the translated paths with SEPARATOR2.

@@ -100,7 +101,11 @@ do
     p="${p//\\//}"
     p="${p//\/\///}"

-    if test -d "$p"
+    if test "${p:0:11}" = "%emacs_dir%"
+    then
+ # Paths starting with "%emacs_dir%" will not be translated
+        w32p=$p
+    elif test -d "$p"
     then
  # The path exists, so just translate it
  w32p=`cd "$p" && pwd -W`
@@ -162,4 +167,4 @@ do
 done

 # Write the translated pathlist to the standard output
-printf "${w32pathlist}"
+printf "%s" "${w32pathlist}"




-- 
Dani Moncayo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]