This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 110752 - Windows: Impossible to add files from another disk
Summary: Windows: Impossible to add files from another disk
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 5.x
Hardware: PC All
: P2 blocker (vote)
Assignee: Thomas Preisler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-24 13:50 UTC by Maria Tishkova
Modified: 2007-11-13 15:31 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maria Tishkova 2007-07-24 13:50:06 UTC
I have created Managed project (project location is disk C:/)
And have added new file to the project using Add Existing Item context menu (file is located on disk D:/)

Here is the message I see when I try to build it on Windows:

Running "D:\cygwin\bin\make.exe  -f Makefile CONF=Debug clean" in C:\usr\masha\test_gdb

/usr/bin/make -f nbproject/Makefile-Debug.mk SUBPROJECTS= .clean-conf
make[1]: Entering directory `/cygdrive/c/usr/masha/test_gdb'
rm -f -r build/Debug
rm -f dist/Debug/Cygwin-Windows/test_gdb.exe
make[1]: Leaving directory `/cygdrive/c/usr/masha/test_gdb'

Clean successful. Exit value 0.

Running "D:\cygwin\bin\make.exe  -f Makefile CONF=Debug" in C:\usr\masha\test_gdb

/usr/bin/make -f nbproject/Makefile-Debug.mk SUBPROJECTS= .build-conf
make[1]: Entering directory `/cygdrive/c/usr/masha/test_gdb'
make[1]: *** No rule to make target `D\:/tmp/ctest.c', needed by `build/Debug/Cygwin-Windows/_ext/D_/tmp/ctest.o'.  Stop.
make[1]: Leaving directory `/cygdrive/c/usr/masha/test_gdb'
make: *** [.build-impl] Error 2

Build failed. Exit value 2.


I want to notice that this issue was already filed and fixed in NB5.5 so it looks like regression, it is a serious
problem for Windows users, so the priority is set to P2 (and because it is regression)


Please see IZ 84315
Comment 1 Thomas Preisler 2007-07-30 05:57:06 UTC
It's a limitation in make I don't know how to work-around. The problem is ':' is not accepted in a make target. The
generated make code looks like:

${OBJECTDIR}/_ext/D_/cygwin/tmp/args.o: D:/cygwin/tmp/args.c
	${MKDIR} -p ${OBJECTDIR}/_ext/D_/cygwin/tmp
	$(COMPILE.c) -g3 -gdwarf-2 -o ${OBJECTDIR}/_ext/D_/cygwin/tmp/args.o D\:/cygwin/tmp/args.c

I have tried just about everything from quoting to escaping the ':' but nothing works. Don't know how to fix it without
changes to make.
Comment 2 Maria Tishkova 2007-07-30 10:57:12 UTC
Thomas, 
please try to use the following:

${OBJECTDIR}/_ext/D_/cygwin/tmp/args.o: 
	${MKDIR} -p ${OBJECTDIR}/_ext/D_/cygwin/tmp
	$(COMPILE.c) -g3 -gdwarf-2 -o ${OBJECTDIR}/_ext/D_/cygwin/tmp/args.o D\:/cygwin/tmp/args.c

It works for me and I am sure will work for you.

I am reopening this Issue as it is serious for Windows developers.
Comment 3 Thomas Preisler 2007-09-13 03:36:39 UTC
You need the source file in the target as dependency otherwise it will always compile the file.

I fixed it is a different way. The dependent source file is references via /cygdrive/<drive> (if Cygwin compiler). It is
a legal syntax in make. SFU compilers will use /dev/fs/<drive> and MinGW just /<drive>:


${OBJECTDIR}/_ext/D_/tmp/Args_5/src/args.o: /cygdrive/D/tmp/Args_5/src/args.c 
	${MKDIR} -p ${OBJECTDIR}/_ext/D_/tmp/Args_5/src
	$(COMPILE.cc) -g3 -gdwarf-2 -o ${OBJECTDIR}/_ext/D_/tmp/Args_5/src/args.o D\:/tmp/Args_5/src/args.c
Comment 4 dnikitin 2007-11-13 15:31:07 UTC
Verified in trunk 2007111300