for some reason, that wasn't working too well yesterday when I tried poking at it, but works now...
For the interested, my full qmake project file, at least for this testing app is as follows
######################################################################
# Automatically generated by qmake (2.00a) Thu Sep 7 15:54:07 2006
######################################################################
TEMPLATE = app
TARGET +=
DEPENDPATH += .
INCLUDEPATH += .
# Input
HEADERS += parse.h parser.y.h parseTest.h
#LEXSOURCES += parser.l
#YACCSOURCES += parser.y
SOURCES += main.cpp parseTest.cpp
# Flex/bison specifics
#QMAKE_LEX = flex
#QMAKE_YACC = bison
#QMAKE_YACCFLAGS = -d -o y.tab.c
#QMAKE_YACC_HEADER =
#QMAKE_YACC_SOURCE =
FLEXSOURCES = parser.l
BISONSOURCES = parser.y
flex.commands = flex ${QMAKE_FILE_IN}
flex.input = FLEXSOURCES
flex.output = lex.yy.c
flex.variable_out = SOURCES
flex.depends = y.tab.h
flex.name = flex
QMAKE_EXTRA_COMPILERS += flex
bison.commands = bison -d -t -y ${QMAKE_FILE_IN} && mv y.tab.c y.tab.cpp
bison.input = BISONSOURCES
bison.output = y.tab.cpp
bison.variable_out = SOURCES
bison.name = bison
QMAKE_EXTRA_COMPILERS += bison
bisonheader.commands = @true
bisonheader.input = BISONSOURCES
bisonheader.output = y.tab.h
bisonheader.variable_out = HEADERS
bisonheader.name = bison header
bisonheader.depends = y.tab.cpp
QMAKE_EXTRA_COMPILERS += bisonheader
######################################################################
# Automatically generated by qmake (2.00a) Thu Sep 7 15:54:07 2006
######################################################################
TEMPLATE = app
TARGET +=
DEPENDPATH += .
INCLUDEPATH += .
# Input
HEADERS += parse.h parser.y.h parseTest.h
#LEXSOURCES += parser.l
#YACCSOURCES += parser.y
SOURCES += main.cpp parseTest.cpp
# Flex/bison specifics
#QMAKE_LEX = flex
#QMAKE_YACC = bison
#QMAKE_YACCFLAGS = -d -o y.tab.c
#QMAKE_YACC_HEADER =
#QMAKE_YACC_SOURCE =
FLEXSOURCES = parser.l
BISONSOURCES = parser.y
flex.commands = flex ${QMAKE_FILE_IN}
flex.input = FLEXSOURCES
flex.output = lex.yy.c
flex.variable_out = SOURCES
flex.depends = y.tab.h
flex.name = flex
QMAKE_EXTRA_COMPILERS += flex
bison.commands = bison -d -t -y ${QMAKE_FILE_IN} && mv y.tab.c y.tab.cpp
bison.input = BISONSOURCES
bison.output = y.tab.cpp
bison.variable_out = SOURCES
bison.name = bison
QMAKE_EXTRA_COMPILERS += bison
bisonheader.commands = @true
bisonheader.input = BISONSOURCES
bisonheader.output = y.tab.h
bisonheader.variable_out = HEADERS
bisonheader.name = bison header
bisonheader.depends = y.tab.cpp
QMAKE_EXTRA_COMPILERS += bisonheader
To copy to clipboard, switch view to plain text mode
I'll have to add windows and linux-specific definitions for the move command in the bison.commands, but apart from that it works fairly nicely.
Still I'm not sure why it wasn't working yesterday..but's that's not important.
Bookmarks