automake
[Top][All Lists]
Advanced

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

Multiple parsers/scanners with automake


From: Svend Sorensen
Subject: Multiple parsers/scanners with automake
Date: Mon, 21 Mar 2005 12:51:18 -0800

I am trying to convert my program (http://cuetools.berlios.de) to use
automake and autoconf (my first attempt at using these tools).  I am
having some difficulty because the code uses two sets of scanners and
parsers.

Previously, my hand hacked Makefile had included the following lines:

toc_scan.c: LFLAGS+= -Ptoc_yy
cue_scan.c: LFLAGS+= -Pcue_yy
toc_parse.c: YFLAGS+= -p toc_yy
cue_parse.c: YFLAGS+= -p cue_yy

(these only work with gmake).  I have read the automake manual
regarding Yacc and Lex support.  So far, I have used the list of
recommended defines, and that has allowed me to remove the Yacc
command line prefixes in the Makefile.

I am unsure what to do now regarding the Lex prefixes.  The automake
manual seems to indicate that only Yacc requires the variable
prefixing hack, but I am getting variable redefined errors when I
don't use the Lex command line prefix.

I have looked at the gdb source, which is recommeded by the automake
manual.  However, gdb only seems to have one Lex file, so it only
helped me with the Yacc part.  In addition, gdb seems to only use
autoconf, not automake.  Again, this is my first attempt at using the
automake/autoconf tools, so I could be wrong about this.

Do I have to find a list of symbol names used by Lex, and redefine
them to have a prefix?  Is there any examples of packages that have
multiple Yacc _and_ Lex files that use autoconf/automake?

-- 
Svend




reply via email to

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