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 192085 - configurations.xml: paths in customToolOutputs are not recognized properly
Summary: configurations.xml: paths in customToolOutputs are not recognized properly
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: PC Windows 7 x64
: P2 normal (vote)
Assignee: Thomas Preisler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-18 05:01 UTC by victor_petrov
Modified: 2010-11-19 06:15 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
C/C++ Project with a custom configurations.xml (34.93 KB, application/zip)
2010-11-18 05:08 UTC, victor_petrov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description victor_petrov 2010-11-18 05:01:35 UTC
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
Comment 1 victor_petrov 2010-11-18 05:03:40 UTC
g++ (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125) on Cygwin
Comment 2 victor_petrov 2010-11-18 05:08:46 UTC
Created attachment 103055 [details]
C/C++ Project with a custom configurations.xml
Comment 3 Thomas Preisler 2010-11-18 20:37:38 UTC
Fixed. The problem was it generated the following incorrect mkdir statement:

mkdir -p src/parser.h src

I fixed this.
Comment 4 victor_petrov 2010-11-18 21:06:05 UTC
(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!
Comment 5 Quality Engineering 2010-11-19 06:15:39 UTC
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