help-bison
[Top][All Lists]
Advanced

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

Re: Can't compile bison/flex output files without cc?


From: Philip Herron
Subject: Re: Can't compile bison/flex output files without cc?
Date: Fri, 01 May 2009 14:10:41 +0100
User-agent: Thunderbird 2.0.0.21 (X11/20090409)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hey

I got this all working it seems. I didn't finish it but i can see how
anjuta makes it work.

So basicly you want to be just adding in your foo.l and fooparser.y as
your sources. Because when you add a new source you should notice
anjuta manages your Makefile.am! This means your using the full
autoconf and automake.

One problem i am not sure how your meant to add to your configure.ac
for automake to have the macros to LEX and YACC

But what you could do is look at this configure.ac that anjuta
generated for me:

dnl Process this file with autoconf to produce a configure script.
dnl Created by Anjuta application wizard.

AC_INIT(foobar_sample, 0.1)

AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
AC_CONFIG_HEADERS([config.h])
AM_MAINTAINER_MODE

AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC




dnl
***************************************************************************
dnl Internatinalization
dnl
***************************************************************************
GETTEXT_PACKAGE=foobar_sample
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT
package name])
AM_GLIB_GNU_GETTEXT
IT_PROG_INTLTOOL([0.35.0])

AM_PROG_LIBTOOL


AC_OUTPUT([
Makefile
src/Makefile
po/Makefile.in
])


What you should do is add in here:

AC_PROG_YACC
AC_PROG_LEX

before the check for libtool. You should probably do checks to throw
an error like something:
after each: if test "$LEX" == ""  then AC_MSG_ERROR or somthing.

But once thats done now automake knows of lex and yacc but you also
need in your Makefile.am that contains the sources to be compiled add in:

AM_YFLAGS = -d


This should do the job.

- -Phil

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkn69M4ACgkQAhcOgIaQQ2GmIwCfS+FjNY2TVDTRuFzWKieD3tWz
LfgAn0fK06P+ImutbyjxOz7SweOfS+Yt
=wV5g
-----END PGP SIGNATURE-----





reply via email to

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