delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/04/21/13:55:51

X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Ken Cecka <ceckak AT alumni DOT washington DOT edu>
Subject: make $(wildcard) not working with samba shares
Date: Fri, 21 Apr 2006 10:49:04 -0700
Lines: 86
Message-ID: <e2b5uh$4cl$1@sea.gmane.org>
Mime-Version: 1.0
User-Agent: KNode/0.9.2
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

--nextPart3447992.6Y0JUNmDf5
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8Bit

Hi All,

I'm having a problem with cygwin make and the $(wildcard) function.  I've
attached a Makefile which demonstrates the problem.  The gnu make
documentation indicates that the wildcard function should only return files
or directories that exist, but in certain circumstances it is returning
paths that do not exist.  This appears to be a bug introduced in the base
cygwin package.  Specifically,

using base/cygwin 1.5.19-4:
- fails when building from linux samba share (version 3.0.20)
- fails when building from solaris samba share (version 2.2.8a)
- succeeds when building from local hard drive

using base/cygwin 1.5.18-1:
- succeeds when building from linux samba share (version 3.0.20)
- succeeds when building from solaris samba share (version 2.2.8a)
- succeeds when building from local hard drive

I've tried a number of combinations to try to eliminate the failure when
using 1.5.19-4 and the samba share:
- fails when running directly from the share in a bash shell
  (//machine/path/to/test)
- fails when running from a mounted drive in a bash shell
  (//cygdrive/g/path/to/test)
- fails when running from a mounted drive in a dos cmd shell
  (g:\path\to\test>)

I've pasted below an example run that demonstrates the failure.

Any suggestions on whether I'm doing something wrong or if this is a known
issue?  In searching on google, I saw a few similar reports, but no
resolution.  I've been working around this issue for several months now
using the old cygwin package, but several of my coworkers are seeing it now
also and I'd like to get the real issue fixed.

Thanks,
Ken

$ uname -a
CYGWIN_NT-5.1 R63324-11 1.5.19(0.150/4/2) 2006-01-20 13:28 i686 Cygwin
$ cd //gora/kcecka/projects/cyg_smb_make_bug
$ make
echo "root file1" > file1.txt
mkdir -p sub1
echo "sub1 file2" > sub1/file2.txt
echo "sub1 file3" > sub1/file3.txt
mkdir -p sub2
echo "sub2 file4" > sub2/file4.txt
echo "sub2 file5" > sub2/file5.txt
make print_files
make[1]: Entering directory `//gora/kcecka/projects/cyg_smb_make_bug'
make[1]: *** No rule to make target `sub1/file3.txt/file1.txt', needed by
`print_files'.  Stop.
make[1]: Leaving directory `//gora/kcecka/projects/cyg_smb_make_bug'
make: *** [test] Error 2
$
--nextPart3447992.6Y0JUNmDf5
Content-Type: text/plain; name="Makefile"
Content-Transfer-Encoding: 8Bit
Content-Disposition: attachment; filename="Makefile"

FILES := $(wildcard *.txt) $(wildcard */*.txt) $(wildcard */*/*.txt)

all: setup test

setup:
	echo "root file1" > file1.txt
	mkdir -p sub1
	echo "sub1 file2" > sub1/file2.txt
	echo "sub1 file3" > sub1/file3.txt
	mkdir -p sub2
	echo "sub2 file4" > sub2/file4.txt
	echo "sub2 file5" > sub2/file5.txt

test:
	make print_files

print_files: $(FILES)
	cat $(FILES)


--nextPart3447992.6Y0JUNmDf5
Content-Type: text/plain; charset=us-ascii

--
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/
--nextPart3447992.6Y0JUNmDf5--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019