X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Message-ID: <4703C960.EF841594@dessent.net>
Date: Wed, 03 Oct 2007 09:54:56 -0700
From: Brian Dessent <brian@dessent.net>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: Problems compiling grep and friends
References: <FAE23AA888D14A218DAC781334E6BDC9@kingmark>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Reply-To: cygwin@cygwin.com
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Siegfried Heintze wrote:

> make[1]: Entering directory `/usr/src/grep-2.5.1a-4/po'
> if test -r ".././mkinstalldirs"; then \
>           .././mkinstalldirs //usr/local/share; \
>         else \
>           /bin/sh ../mkinstalldirs //usr/local/share; \
>         fi
> mkdir //usr
> mkdir: cannot create directory `//usr': No such host or network path
> mkdir //usr/local
> mkdir: cannot create directory `//usr/local': No such host or network path
> mkdir //usr/local/share
> mkdir: cannot create directory `//usr/local/share': No such host or network
> path

This is arguably a bug in the Makefile:

        if test -r "$(MKINSTALLDIRS)"; then \
          $(MKINSTALLDIRS) $(DESTDIR)/$(datadir); \
        else \
          $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)/$(datadir); \
        fi

Here the author seemed to be relying on the fact that on many *nix
systems, //foo/bar is equivalent to /foo/bar in the case where DESTDIR
is not set.  However this is not true on Cygwin as the double-slash
signals a UNC path, and the POSIX standards allow for this.  So as a
workaround, try "make install DESTDIR=/" which would result in
"///foo/bar" which is the POSIX-sanctioned way of dealing with
filesystems that reserve // for network paths.  Or, you could actually
use DESTDIR in the way it's designed (which is probably why this was
never noticed when e.g. creating the grep packages.)

Also, knock this off:

> cd c:/cygwin/usr/src/grep-2.5.1a-4/

Stop using Win32 paths.  They work only by coincidence, not by design. 
"cd /usr/src/grep-2.5.1a-4" is what you should use.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

