bug-gnu-utils
[Top][All Lists]
Advanced

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

Problems with automake, autoconf and lex-yacc


From: Anthony PIRON
Subject: Problems with automake, autoconf and lex-yacc
Date: Tue, 24 Oct 2000 10:01:37 +0200

Hi all,

REPLY TO THE NEWSGROUP AND TO MY MAIL ADDRESS PLEASE

I hope I'm in the good newsgroup.
I have got somes problems with the lex and yacc support in automake,
autoconf.
When I do a 'make dist' the files 'parser.y lexer.l' are well put in the

tar file.
The files 'parser.c lexer.c' are also put in the tar but not 'parser.h'.

Which implies compilation error with the generated Makefile since
'./configure' seems only to generate a Makefile which test the creation
of 'parser.c' but not 'parser.h'. The 'parser.h' header isn't found nor
created if
there is already a 'parser.c' file.
What I would like is none of this three files in the distribution
archive ('parser.c lexer.c parser.h') ! Only the 'parser.y' and
'lexer.l'
in the distribution archive.

Are there (clean) solutions to my problem ?

Thanks,
Anthony PIRON.

HERE ARE  SIMPLES VERSIONS OF MY CONFIGURATIONS FILES !

Makefile.am :

SUBDIRS = src

Configure.in :

dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/mv.c)
AM_INIT_AUTOMAKE(test, 1.0)

dnl Checks for programs.

AC_PROG_CC
AC_STDC_HEADERS
AM_PROG_LEX
AC_PROG_YACC

dnl Checks for libraries.

# Checks for glib
HAVE_GLIB=`glib-config --version >/dev/null 2>/dev/null && echo "yes" ||

echo "no"`
echo "checking for glib... $HAVE_GLIB"
if test $HAVE_GLIB = "no" ; then
  AC_MSG_ERROR([You need GLib installed -- GNOME requires this as
well.])
fi

dnl Checks for header files.

AC_CHECK_HEADERS(stdio.h glib.h errno.h stdarg.h)

dnl Checks for typedefs, structures, and compiler characteristics.

dnl Checks for library functions.

AC_OUTPUT(Makefile src/Makefile)

src/Makefile.am

LIBS = -lglib -ll
YFLAGS = -d
bin_PROGRAMS = test
test_SOURCES = parser.y lexer.l mv.c mv.h test.c error.c error.h




--
Anthony PIRON - Researcher
Universite Libre de Bruxelles, Department of Computer Science
CP 212 - Boulevard du Triomphe, B-1050 Bruxelles, Belgium
Tel. +32 2 650 50 55, Fax +32 2 650 56 09, GSM +32 478 530 022
Email: address@hidden Web: http://www.ulb.ac.be/di/ssd/apiron






reply via email to

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