Hi all, On a current C++ project I'm using Autoconf and Automake. To solve the big subdir tree inside src I used VPATHs in my Makefile.am, if there's another way please say so. The current problem is due to the fact that using automake with bison and flex is giving me headaches. I have msat-parser.yy and msat-parser.ll which generate C++ code. And in my Makefile.am I have: AM_YFLAGS = -d AM_LFLAGS = -i -Cfa -+ -o$(LEX_OUTPUT_ROOT).cc
BUILT_SOURCES = msat-parser.h bin_PROGRAMS = test test_SOURCES = msat-parser.yy msat-lexer.ll ... While doing make I get: bison -y -d parser/msat/msat-parser.yy if test -f y.tab.h; then \ to=`echo "msat-parser_H" | sed \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`; \ sed -e "/^#/!b" -e "s/Y_TAB_H/$to/g" -e "s|y\.tab\.h|msat-parser.h|" \ y.tab.h >msat-parser.ht; \ rm -f y.tab.h; \ if cmp -s msat-parser.ht msat-parser.h; then \ rm -f msat-parser.ht ;\ else \ mv msat-parser.ht msat-parser.h; \ fi; \ fi if test -f y.output; then \ mv y.output msat-parser.output; \ fi sed '/^#/ s|y\.tab\.c|msat-parser.cc|' y.tab.c >msat-parser.cct && mv msat-parser.cct msat-parser.cc rm -f y.tab.c make all-am make[3]: Entering directory `/home/pocm/software/extsat/src' make[3]: Warning: File `.deps/vbhimplvsids.Po' has modification time 2e+02 s in the future if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I./include -ansi -std=c++98 -pedantic -Wall -DBUILDDATE=`date +'%Y-%b-%d %R'` -g -O2 -MT msat-parser.o -MD -MP -MF ".deps/msat-parser.Tpo" -c -o msat-parser.o msat-parser.cc; \ then mv -f ".deps/msat-parser.Tpo" ".deps/msat-parser.Po"; else rm -f ".deps/msat-parser.Tpo"; exit 1; fi g++: cannot specify -o with -c or -S and multiple compilations make[3]: *** [msat-parser.o] Error 1 Does anyone know what the problem might be? Thanks a lot. Cheers, -- Paulo Jorge Matos - pocm at sat inesc-id pt Web: http://sat.inesc-id.pt/~pocm Computer and Software Engineering INESC-ID - SAT Group