This is the mail archive of the
automake-prs@sources.redhat.com
mailing list for the automake project.
Re: automake/382: including lex and yacc generated header files
- From: William S Fulton <wsf at fultondesigns dot co dot uk>
- To: tromey at redhat dot com
- Cc: automake-prs at sources dot redhat dot com,
- Date: 13 Jan 2003 19:31:01 -0000
- Subject: Re: automake/382: including lex and yacc generated header files
- Reply-to: William S Fulton <wsf at fultondesigns dot co dot uk>
The following reply was made to PR automake/382; it has been noted by GNATS.
From: William S Fulton <wsf@fultondesigns.co.uk>
To: Alexandre Duret-Lutz <duret_g@lrde.epita.fr>
Cc: automake-gnats@sources.redhat.com
Subject: Re: automake/382: including lex and yacc generated header files
Date: Mon, 13 Jan 2003 19:21:51 +0000
Alexandre Duret-Lutz wrote:
>>>>"wsf" == wsf <wsf@fultondesigns.co.uk> writes:
>
>
> [...]
> wsf> Run test case.
> [...]
>
> Could you send it? :)
Doh, sorry!
#! /bin/sh
# Copyright (C) 2002 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
# GNU Automake is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# GNU Automake is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with autoconf; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
# Test for file including yacc generated header file
required="gcc bison"
. ./defs || exit 1
set -e
cat >> configure.in << 'END'
AC_CONFIG_AUX_DIR([.])
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_YACC
AC_OUTPUT
END
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = subdir-objects
bin_PROGRAMS = foo/foo
foo_foo_CFLAGS = -I$(top_builddir)/foo
foo_foo_SOURCES = foo/bar.c foo/parse.y # This does not work
#foo_foo_SOURCES = foo/parse.y foo/bar.c # This works
AM_YFLAGS = -d
END
mkdir foo
cat > foo/bar.c << 'END'
#include "parse.h"
int main () { return 0; }
END
cat > foo/parse.y << 'END'
%{
int yylex () {return 0;}
void yyerror (char *s) {}
%}
%%
foobar : 'f' 'o' 'o' 'b' 'a' 'r' {};
END
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
mkdir sub
cd sub
../configure
$MAKE
exit 0