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.
I'm trying to create a Bison/Flex project where the Bison/Flex output files are in the src/ folder, with the rest of my source code. I modified an existing C/C++ Application Project by looking at the Lex/Yacc sample project configurations.xml. The Lex/Yacc project has the following entry in its configurations.xml: <customToolOutputs>y.tab.c y.tab.h</customToolOutputs> I wanted my files to be named parser.c and parser.h and to reside in the src/ folder, so I changed this line in my C/C++ project configurations.xml to: <customToolOutputs>src/parser.h src/parser.c</customToolOutputs> But it appears that Makefile-Debug.mk and Makefile-Release.mk have the following target generated: src/parser.h src/parser.c: src/grammar.y ${MKDIR} -p src/parser.h src @echo Running bison... bison --defines=src/parser.h -o src/parser.c src/grammar.y Notice the mkdir command creates the directory "src/parser.h", instead of just "src". This causes bison to complain that it cannot create the "src/parser.h" file because it already exists as a directory. Below are the messages I get when I select Build: "/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf make[1]: Entering directory `/cygdrive/d/vcc' "/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/Cygwin-Windows/vcc.exe make[2]: Entering directory `/cygdrive/d/vcc' mkdir -p build/Debug/Cygwin-Windows/src rm -f build/Debug/Cygwin-Windows/src/main.o.d g++.exe -c -g -MMD -MP -MF build/Debug/Cygwin-Windows/src/main.o.d -o build/Debug/Cygwin-Windows/src/main.o src/main.cpp mkdir -p src/parser.h src Running bison... bison --defines=src/parser.h -o src/parser.c src/grammar.y bison: cannot open file `src/parser.h': Is a directory make[2]: *** [src/parser.c] Error 1 make[1]: *** [.build-conf] Error 2 make: *** [.build-impl] Error 2 make[2]: Leaving directory `/cygdrive/d/vcc' make[1]: Leaving directory `/cygdrive/d/vcc' BUILD FAILED (exit value 2, total time: 2s) I can get it to compile if the I run rmdir src/parser.h/ just before running bison. I have attached the C/C++ project to this issue report. My environment: Product Version: NetBeans IDE 6.9.1 (Build 201011082200) Java: 1.6.0_21; Java HotSpot(TM) 64-Bit Server VM 17.0-b17 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb) Userdir: C:\Users\vpetrov\.netbeans\6.9 The toolchain I'm using is
g++ (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125) on Cygwin
Created attachment 103055 [details] C/C++ Project with a custom configurations.xml
Fixed. The problem was it generated the following incorrect mkdir statement: mkdir -p src/parser.h src I fixed this.
(In reply to comment #3) > Fixed. The problem was it generated the following incorrect mkdir statement: > > mkdir -p src/parser.h src > > I fixed this. Thank you!
Integrated into 'main-golden', will be available in build *201011190001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/4b8d8c2eeb0e User: Thomas Preisler <thp@netbeans.org> Log: #192085 - configurations.xml: paths in customToolOutputs are not recognized properl