delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/05/28/13:19:00

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
Message-ID: <40B7746F.5040800@equator.com>
Date: Fri, 28 May 2004 10:18:39 -0700
From: Nitin Gupta <nitin DOT gupta AT equator DOT com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Bug in cygwin/XP file system

--------------060802070109040100060607
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hi,
I use to build some source code located on a Linux PC by mounting a 
Network drive to that and accessing it over cygwin by "cd /cygdrive/X" 
and than do a "make". It seems like that it does not work on new cygwin  
(output of uname -a : CYGWIN_NT-5.1 gupta-xp 1.5.10(0.116/4/2) 
2004-05-25 22:07 i686 unknown unknown Cygwin )

I am attaching two files to recreate the bug.
steps
1. Create a "TEST" directory on your local hard drive and on a Linux 
machine.
2. copy the attached script and makefile in that directory
3. map linux drive on your windows PC
4. open a cygwin shell
5. cd to "TEST" directory on your Linux PC mapped directory and run the 
script and than do a make
6. if you get a message like "rule to make subdir12.o not found", than 
you are seeing the bug. If not, it mysteriously works for you.
7. In case you saw the bug, cd to "TEST" directory on your local hard 
drive and run the script and do "make", it should work for you.

The test script just generate 100 sub directories under test and than 
generate .c files. make file try to generate libX.a out of those  100 
objects.

Thanks,
Nitin

Note: when replying, please cc it to my email address, as I am not on 
cygwin mailing list.

-- 
NI+IN


--------------060802070109040100060607
Content-Transfer-Encoding: 7bit
Content-Type: application/x-sh;
 name="generate_test.sh"
Content-Disposition: inline;
 filename="generate_test.sh"

#!/bin/sh
i=1
MAX=100
echo "### Generating $MAX subdirs with source files..."
while [ $i -le $MAX ]
do
   mkdir -p SUBDIRS/subdir${i}
   echo "int main(){}" > SUBDIRS/subdir${i}/subdir${i}.c
   i=`expr $i + 1`
done


--------------060802070109040100060607
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
 name="Makefile"
Content-Disposition: inline;
 filename="Makefile"


.PHONY: target

VPATH   := $(sort $(filter-out CVS,$(shell find SUBDIRS -type d)))

OBJECTS := $(filter-out SUBDIRS.o,$(addsuffix .o,$(notdir $(VPATH))))


target:  libX.a

libX.a : $(OBJECTS)
	ar rucv $@ $(OBJECTS)

	#echo "VPATH: $(VPATH)"
	#echo "OBJECTS: $(OBJECTS)"

%.o:%.c
	gcc $^ -o $@

clean:
	rm -rf SUBDIRS *.o libX.a


--------------060802070109040100060607
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/
--------------060802070109040100060607--

- Raw text -


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