automake
[Top][All Lists]
Advanced

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

Re: Automake doesn't invoke bison even with BUILT_SOURCES


From: Ralf Wildenhues
Subject: Re: Automake doesn't invoke bison even with BUILT_SOURCES
Date: Tue, 21 Feb 2006 09:39:38 +0100
User-agent: Mutt/1.5.11

Hi Kototama,

* Kototama wrote on Mon, Feb 20, 2006 at 08:23:34PM CET:
> 
> I added the header file generated by automake/bison in BUILT_SOURCES but
> when I type make automake doesn't invoke bison to generate the header
> file from the corresponding .ypp file.

I cannot reproduce this.  This small example, built with help of the
documentation, works for me:

$ cat Makefile.am
BUILT_SOURCES = parser.h
AM_YFLAGS = -d
bin_PROGRAMS = foo
foo_SOURCES = parser.ypp
$ cat configure.ac
AC_INIT([bison-cpp],[1],[devnull])
AM_INIT_AUTOMAKE([foreign])
AC_PROG_CXX
AC_PROG_YACC
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
$ autoreconf -vi
# create parser.ypp
$ ./configure
$ make

Could you modify it so that it fails for you?


Meanwhile I noted that .ypp is not documented.  The patch below (against
CVS Automake) fixes this.

Cheers,
Ralf

        * doc/automake.texi (Yacc and Lex): Document that `.ypp' and
        `.lpp' file extensions are recognized.

Index: doc/automake.texi
===================================================================
RCS file: /cvs/automake/automake/doc/automake.texi,v
retrieving revision 1.127
diff -u -r1.127 automake.texi
--- doc/automake.texi   5 Feb 2006 05:53:38 -0000       1.127
+++ doc/automake.texi   21 Feb 2006 08:29:58 -0000
@@ -4509,11 +4509,12 @@
 The extension of a yacc source file is used to determine the extension
 of the resulting C or C++ file.  Files with the extension @file{.y}
 will be turned into @file{.c} files; likewise, @file{.yy} will become
address@hidden; @file{.y++}, @file{c++}; and @file{.yxx}, @file{.cxx}.
address@hidden; @file{.y++}, @file{c++}; @file{.yxx}, @file{.cxx}; and
address@hidden, @file{.cpp}.

 Likewise, lex source files can be used to generate C or C++; the
-extensions @file{.l}, @file{.ll}, @file{.l++}, and @file{.lxx} are
-recognized.
+extensions @file{.l}, @file{.ll}, @file{.l++}, @file{.lxx}, and
address@hidden are recognized.

 You should never explicitly mention the intermediate (C or C++) file
 in any @code{SOURCES} variable; only list the source file.





reply via email to

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