From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dani Moncayo Newsgroups: gmane.emacs.devel Subject: Re: New msys-to-w32 breaks using %emacs_dir%, @VER@ in locallisppath Date: Sat, 30 Nov 2013 08:12:51 +0100 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1385795571 23733 80.91.229.3 (30 Nov 2013 07:12:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 30 Nov 2013 07:12:51 +0000 (UTC) Cc: Emacs developers To: Juanma Barranquero Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 30 08:12:57 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VmejZ-0000Zp-Hh for ged-emacs-devel@m.gmane.org; Sat, 30 Nov 2013 08:12:57 +0100 Original-Received: from localhost ([::1]:51102 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmejY-0004pL-UW for ged-emacs-devel@m.gmane.org; Sat, 30 Nov 2013 02:12:56 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38618) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmejW-0004pG-3H for emacs-devel@gnu.org; Sat, 30 Nov 2013 02:12:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VmejU-0003NN-Uq for emacs-devel@gnu.org; Sat, 30 Nov 2013 02:12:54 -0500 Original-Received: from mail-lb0-x231.google.com ([2a00:1450:4010:c04::231]:61602) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmejU-0003NJ-Mv for emacs-devel@gnu.org; Sat, 30 Nov 2013 02:12:52 -0500 Original-Received: by mail-lb0-f177.google.com with SMTP id w7so7396107lbi.36 for ; Fri, 29 Nov 2013 23:12:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=sBPeauc9vBd0Le4R5TQYyqrjwN6AFX9s1MmK4YOnqaM=; b=lckiftDRQLLRT/8SBHMs+F2c97oZXLLXuquHlRZwYicprlhj4Zque611KTzxVtGE+h NONf370WJQyNeATiJ9PJKo3vaxV7Zfm8n+xWbntRxMzWzD61STZnSfdv0p2TfTY0SZ+4 jns/CWzu+HwoIMhg16JwMVJ+JIElGAhtW2ULdZ7PcAlZJH6z6XMLo1x8dpYFmFyusfpT 5SutuvNAJ7iRnZ1/nOx1raIHl71RmVGAAXXG0mb2AkizlPvDYdqN92bgO1qDahuMdE1W nmbbkq+S7US8uuiBQOdfzOLFBxrx+3vDHWbfnhL8JKCD0AhXhE4N9gNxZBDCCmboVrg8 d9Bw== X-Received: by 10.112.210.66 with SMTP id ms2mr66202lbc.51.1385795571499; Fri, 29 Nov 2013 23:12:51 -0800 (PST) Original-Received: by 10.114.176.231 with HTTP; Fri, 29 Nov 2013 23:12:51 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::231 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:165925 Archived-At: > ./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