Hello,
I was part of the FAD, Pune held on 24th Sept. Following this I tried to use
autotools with a small code that I am working on. The issue is that
it uses lex and yacc and I haven't been able to make it work.
The present Makefile that I am using does the following:
CC=cc
LEXFLAG=-ll
YACCFLAG=-ly
appname=lp
$(appname): y.tab.o lex.yy.o lp.o lp.h
$(CC) -o $(appname) lex.yy.o y.tab.o lp.o $(LEXFLAG) $(YACCFLAG)
y.tab.o: y.tab.c
$(CC) -c y.tab.c $(YACCFLAG)
lex.yy.o: lex.yy.c
$(CC) -c lex.yy.c $(LEXFLAG)
lex.yy.c: ie.l
lex ie.l
y.tab.c: ie_parser.y
yacc -d ie_parser.y
lp.o: lp.c
$(CC) -c lp.c
My configure.ac file reads as follows
AC_INIT([language-parser],[1.0],gautam.akiwate(a)gmail.com)
AM_INIT_AUTOMAKE(dist-bzip2)
AM_MAINTAINER_MODE
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_YACC
AM_PROG_LEX
AC_OUTPUT([Makefile])
And the Makefile.am file has the following content
AM_YFLAGS = -d
BUILT_SOURCES = ie_parser.h
bin_PROGRAMS = lparser
lparser_SOURCES = ie.l ie_parser.y lp.h lp.c
noinst_HEADERS = lp.h
The following commands go through without error
$aclocal
$autoconf
$automake -a -c
$./configure
But when I do a make it generates an error saying that it is unable to find
yylwrap etc.
Can somebody please help me with this?
PS: Apologies for the long mail.
Regards
Gautam
--
"Quis custodiet ipsos custodes?"
Show replies by date