Hi

I am having trouble using automake to build a libtool library with
multiple lex sources using flex.  Hopefully there is some feature I
have overlooked, but it seems like there is no easy way to do this :(

The automake docs claims that the ylwrap script solves the problem
with including multiple yacc or lex source fles in a single program,
but it seem to only solve a very small part of the problem.

In my Makefile.am:

  lib_LTLIBRARIES = libpcsclite_core.la

  libpcsclite_core_la_SOURCES = configfile.l bundleparser.l \
        ....

When I link this, I get the expected symbol conflicts.  By rewriting
bundleparser.l so it uses a different prefix than yy (bp in this
case), and using the -P option of flex, I can get everything working
nicely.  But how to do this with automake ?  There seems to be several
problems with this.

  bundleparser_lo_LFLAGS = -Pbp

doesn't seem to do anything.

  LFLAGS = -Pbp

on the other hand, do "something".  Unfortunately it breaks ylwrap
functionality as LEX_OUTPUT_ROOT is a fixed value, which is not the
case with the flex -P option.

So my questions are

1) How do I specify flex options for a specific lex source file ?

2) How do I specify a "-P" option with correct handling of
   LEX_OUTPUT_ROOT ?


I have tried with the current autoconf/automake/libtool release
versions CVS HEAD.

/bart

Reply via email to