From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.devel Subject: Re: MinGW "pwd -W" configure.ac correction Date: Thu, 24 Oct 2013 21:55:56 -0400 Message-ID: References: <8338nqiqjz.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1382666157 18700 80.91.229.3 (25 Oct 2013 01:55:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 25 Oct 2013 01:55:57 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 25 03:56:02 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 1VZWd8-0001Bj-G4 for ged-emacs-devel@m.gmane.org; Fri, 25 Oct 2013 03:56:02 +0200 Original-Received: from localhost ([::1]:56989 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZWd8-0003sL-0R for ged-emacs-devel@m.gmane.org; Thu, 24 Oct 2013 21:56:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59840) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZWd5-0003rN-1Z for emacs-devel@gnu.org; Thu, 24 Oct 2013 21:55:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VZWd4-0001US-62 for emacs-devel@gnu.org; Thu, 24 Oct 2013 21:55:58 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35842) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZWd4-0001UO-2U for emacs-devel@gnu.org; Thu, 24 Oct 2013 21:55:58 -0400 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1VZWd2-0003jB-Qm; Thu, 24 Oct 2013 21:55:56 -0400 X-Spook: Bosnia Jyllandsposten colonel radar offensive information X-Ran: QxQ:4eHl=P#*!v8.W_busE;`?H&lrQ@tf"NAT`xGRZA]-AnEj!?])c_;zi?QWw){e.>x+I X-Hue: magenta X-Attribution: GM User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e 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:164523 Archived-At: Eli Zaretskii wrote: >> Does this `pwd -W' correction only matter for epaths.h? >> If so, could it be moved to the epaths-force-w32 rule in Makefile.in? > > This could maybe work today, but it's a time bomb: the underlying > problem, explained in configure.ac, will bite us if we ever invoke any > MinGW program (including, but not limited to, Emacs) during the build. (We should use relative paths wherever possible, to avoid this and other issues.) This sounds like rather a general problem. Is it something to report to autoconf they can improve support for it in some future version? > We cannot allow something like /usr/foo/bar in $abs_srcdir, anywhere. > It must be in the /x/foo/bar format, i.e. it must include the Windows > drive letter (in the "/x/" form) explicitly. It's just that epaths.h > were the first place where this problem hit us. I didn't appreciate at first that for autoconf, $srcdir is "special", and not like eg "$abs_srcdir." You can easily change the former, but not the latter (AFAICS). If Emacs really needs a special value for "absolute path to sources on MinGW" that is different to what autoconf provides, then the only method I can think of is: In configure.ac, on MinGW, define mingw_abs_srcdir = whatever Use that variable directly in configure wherever needed. In Makefiles, use abs_srcdir = @abs_srcdir@ mingw_abs_srcdir = @mingw_abs_srcdir@ real_abs_srcdir = @real_abs_srcdir@ where configure sets real_abs_srcdir = \${mingw_abs_srcdir} on MinGW, and \${abs_srcdir} everywhere else. Then in rules, remember to use $(real_abs_srcdir). Bit messy. Maybe someone else has a better idea.