automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

problem with flex scanner && `make dist'


From: tom fogal
Subject: problem with flex scanner && `make dist'
Date: Tue, 28 Feb 2006 12:08:16 -0500

Been a while since I've followed any autotools list; sorry if I've
missed the answer to this issue...

I have a project with a flex scanner that must be compiled with a C++
compiler (just for linking purposes; I'm not using the C++ flex
interface).  It seems the way to do this is to name it `file.ll'
instead of `file.l', in which case automake automatically picks up on
this and thinks of it as C++ source.

Unfortunately this seems to cause problems when I make dist.
Specifically:

make[1]: *** No rule to make target `input/scan.ll', needed by
`distdir'.  Stop.

My build system is semi-recursive. /Makefile.am recurses into /src/ and
/tests.  In /src there is a Makefile.am which `include's "Inc.am"s that
I have defined in each module's subdirectory.  I've appended
/src/parse/Inc.am's contents [1].  I'm using autoconf in this project
as well.

I haven't tried with the file named `scan.l', which might work (it
works in another, similarly-structured build system I have...) but
unfortunately I can't avoid C++ at the moment.  If it did work as
`scan.l', and there was some other hack to tell AM to use the C++
compiler, that would be acceptable for me.

I hope this is enough information to figure out what I've done wrong.
Any ideas / debugging hints would be very much appreciated.  Thanks,

-tom

[1]

##### /src/parse/Inc.am #####
AM_CXXFLAGS+=-DYY_NO_UNPUT -UYY_MAIN
AM_YFLAGS=-d -t -v -r itemset
BUILT_SOURCES += grammar.h scan.cc

libAll_a_SOURCES += \
   $(srcdir)/parse/grammar.ypp \
   $(srcdir)/parse/scan.ll

noinst_PROGRAMS=lexdbg parser

lexdbg_SOURCES = \
   $(srcdir)/input/scan.ll \
   $(srcdir)/util.cpp

parser_SOURCES = \
   $(srcdir)/input/grammar.ypp \
   $(srcdir)/input/scan.ll

lexdbg_CXXFLAGS=$(AM_CXXFLAGS) -DDEBUG_LEX -DYYERROR_VERBOSE \
        -DYY_NO_UNPUT -DDEBUG


parser_CXXFLAGS=-DYYERROR_VERBOSE -DDEBUG -DDEBUG_YACC -DYY_NO_UNPUT \
   $(AM_CXXFLAGS)

lexdbg_LDADD = -lfl
parser_LDADD = -lfl libAll.a
##### /src/parse/Inc.am #####




reply via email to

[Prev in Thread] Current Thread [Next in Thread]