From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sascha Wilde Newsgroups: gmane.emacs.devel Subject: Pathnames with two (or more) slashes in Makefile.c (was: Latest configure.in change breaks building) Date: Sun, 28 Jan 2007 15:28:11 +0100 Message-ID: References: <45BC7182.7010704@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1169994492 7891 80.91.229.12 (28 Jan 2007 14:28:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 28 Jan 2007 14:28:12 +0000 (UTC) Cc: Jan =?iso-8859-1?Q?Dj=E4rv?= To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 28 15:28:10 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HBB0s-0005jY-4K for ged-emacs-devel@m.gmane.org; Sun, 28 Jan 2007 15:28:10 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HBB0r-00089a-5W for ged-emacs-devel@m.gmane.org; Sun, 28 Jan 2007 09:28:09 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HBB0e-00089M-FE for emacs-devel@gnu.org; Sun, 28 Jan 2007 09:27:56 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HBB0c-000895-UL for emacs-devel@gnu.org; Sun, 28 Jan 2007 09:27:56 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HBB0c-00088y-R0 for emacs-devel@gnu.org; Sun, 28 Jan 2007 09:27:54 -0500 Original-Received: from ns.km1136.keymachine.de ([62.141.58.119] helo=km1136.keymachine.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HBB0b-00038C-VZ for emacs-devel@gnu.org; Sun, 28 Jan 2007 09:27:54 -0500 Original-Received: from kenny.sha-bang.de (xdsld178.osnanet.de [212.95.103.178]) (authenticated bits=0) by km1136.keymachine.de (8.12.11.20060308/8.12.10) with ESMTP id l0SERiVu021246; Sun, 28 Jan 2007 15:27:48 +0100 Original-Received: from wilde by kenny.sha-bang.de with local (Kenny MUA v.0409034.42) ID 1HBB0t-0004Zj-5q; Sun, 28 Jan 2007 15:28:11 +0100 In-Reply-To: <45BC7182.7010704@swipnet.se> (Jan =?iso-8859-1?Q?Dj=E4rv's?= message of "Sun\, 28 Jan 2007 10\:48\:50 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.93 (gnu/linux) X-detected-kernel: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:65566 Archived-At: Jan Dj=E4rv wrote: > Sascha Wilde skrev: >> the latest change on configure.in: >> >> 2007-01-26 Jan Dj=E4rv >> >> * configure.in: Add check for libXft. >> >> breaks the build process for me (CVS Head on GNU/Linux with GTK+ fronten= d): >> >> The new configure tests are successful: checking for xft >=3D >> 0.13.0... yes checking XFT_CFLAGS... -I/usr/X11R6/include >> -I/usr/include/freetype2 checking XFT_LIBS... -L//lib >> -L/usr/X11R6/lib -lXft -lXrender -lX11 -lXext >> -lfontconfig -lfreetype -lz > > What is //lib? It looks broken. //lib =3D=3D /lib, see below... [...] > You have -L -lncurses in there. What happens is when the preprocessor > reads Makefile.c (generated from Makefile.in), your -L//lib ... is > taken as a comment, and everything after // is removed, so you are > left with -L. You are right, the problem is not in your patch, but was triggered by it on m system. fontconfig.pc (one of the dependencies of xft.pc) on my system looks like this: prefix=3D/usr exec_prefix=3D/ libdir=3D${exec_prefix}/lib includedir=3D${prefix}/include Name: Fontconfig Description: Font configuration and customization library Version: 2.3.2 Libs: -L${libdir} -lfontconfig Cflags: -I${includedir} So yes, the library include directory is set to "//lib", in fact this is a very common idiom in various situations when the prefix installation path of software is set to "/". In fact, it isn't wrong at all (though it touches a certain corner case of the posix definition just by chance), the last paragraph in the section "Pathname Resolution" (chapter "General Concepts") from the posix standard states: A pathname consisting of a single slash shall resolve to the root directory of the process. A null pathname shall not be successfully resolved. A pathname that begins with two successive slashes may be interpreted in an implementation-defined manner, although more than two leading slashes shall be treated as a single slash. On GNU Systems (and most unixoid systems I know), two leading slashes are not interpreted in any special way, but like three and more slashes: they are treated as one. So the problem is, that the double slash is written unquoted to Makefile.c where it gets interpreted as a comment. This is IMO a bug. When generating Makefile.c consecutive slashes hould either be reduced to one or appropriately quoted. cheers sascha --=20 Sascha Wilde Nothing is fool-proof to a sufficiently talented fool.