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.
[ Originally filed by hlin ] File > New Project > C/C++ Dev > C/C++ App (Application_1) In Projects, right-click Application_1 > New > Makefile navigate to Enter Source Files panel Add source file "a.c" Add source file "b.c" in Source Files list, select "b.c" and rename it to "a.c" click Change -> duplicates of "a.c" now exist in the list. continue to finish the makefile -> observe in the generated makefile: OBJS_foo= \ $(TARGETDIR_foo)/a.o \ $(TARGETDIR_foo)/a.o Seems duplicate file name is detected by Add but not by Change. On a side note, when Adding a duplicate file name, nothing happens, which is correct function-wise... but a msg at the bottom of the panel indicating a user error would be more helpful.
A related case filed by soldatov emphasized the issue with makefile wizard generating wrong code when the project includes two source files with the same name. The scenario: o Create /tmp/1.c: //---------------------------- int test123(); int main() { return test123(); } //---------------------------- o Create /tmp/folder/1.c: //---------------------------- int test123() { return 1; } //---------------------------- o Launch the IDE File > New Project > C/C++ Dev > C/C++ App set Project Location = /tmp accept all other defaults; Finish In Projects, right-click Application_1 > New > Makefile navigate to Create List of Targets, Target Name = test select Executable (a.out) Add; Next; Next in Enter Source Files, browse to /tmp, select 1.c browse to /tmp/folder, select 1.c -> Source Files now show /tmp/1.c and /tmp/folder/1.c continue to Finish. right-click <makefile> and choose Make ==> Build failed. Observe the following in the generated <makefile>: -------------------------------------------- # Compile source files into .o files $(TARGETDIR_test)/1.o: $(TARGETDIR_test) /tmp/1.c $(COMPILE.c) $(CFLAGS_test) $(CPPFLAGS_test) -o $@ /tmp/1.c $(TARGETDIR_test)/1.o: $(TARGETDIR_test) /tmp/folder/1.c $(COMPILE.c) $(CFLAGS_test) $(CPPFLAGS_test) -o $@ /tmp/folder/1.c --------------------------------------------
The makefile wizard is not part of the project system.
This bug was reported against NetBeans IDE 6.0 or an older release, or against a non-maintained module. NetBeans team does not have enough resources to get to this issue, therefore we are closing the issue as a WONTFIX. If you are interested in providing a patch for this bug, please see our NetFIX guidelines for how to proceed. We apologize for any inconvenience. Thank you. The NetBeans Team