From da7f6125bd8dffa08c10a0fc7baeb812f8c6aada Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Sat, 9 Apr 2011 10:48:42 +0200 Subject: [PATCH] yacc: update NEWS and docs about yacc-generated headers extensions * doc/automake.texi (Yacc and Lex): Document explicitly that extensions of yacc-generated headers are modelled after the extension of the corresponding sources. * NEWS: Update. --- ChangeLog | 8 ++++++++ NEWS | 10 ++++++++++ doc/automake.texi | 16 ++++++++++------ 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index f81eeafe4..ecc0e1f90 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-04-10 Stefano Lattarini + + yacc: update NEWS and docs about yacc-generated headers extensions + * doc/automake.texi (Yacc and Lex): Document explicitly that + extensions of yacc-generated headers are modelled after the + extension of the corresponding sources. + * NEWS: Update. + 2011-01-28 Stefano Lattarini yacc: extension of headers modelled after extension of sources diff --git a/NEWS b/NEWS index a947af9dc..b0147491f 100644 --- a/NEWS +++ b/NEWS @@ -5,9 +5,19 @@ New in 1.11.0a: - The `lzma' compression scheme and associated automake option `dist-lzma' is obsoleted by `xz' and `dist-xz' due to upstream changes. +* Changes to Yacc support: + - C source and header files derived from non-distributed Yacc sources are now removed by "make clean", not only by "make maintainer-clean". + - Slightly backward-incompatible change, relevant only for use of Yacc + with C++: the extensions of the header files produced by the Yacc + rules are now modelled after extension of the sources corresponding + sources. For example, yacc files named "foo.y++" and "bar.yy" will + produce header files named respectively "foo.h++" and "bar.hh", where + they would have previously produced header files named simply "foo.h" + and "bar.h". This change offers better compatibility with `bison -o'. + Bugs fixed in 1.11.0a: * Bugs introduced by 1.11: diff --git a/doc/automake.texi b/doc/automake.texi index dfd0019f1..701a88801 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -6048,12 +6048,16 @@ cause the intermediate file to be named @file{foo.c} (as opposed to @file{y.tab.c}, which is more traditional). 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 -@file{.cc}; @file{.y++}, @file{c++}; @file{.yxx}, @file{.cxx}; and -@file{.ypp}, @file{.cpp}. - -Likewise, lex source files can be used to generate C or C++; the +of the resulting C or C++ source and header files. Note that header +files are generated only when the @option{-d} Yacc option is used; see +below for more information about this flag, and how to specify it. +Files with the extension @file{.y} will thus be turned into @file{.c} +sources and @file{.h} headers; likewise, @file{.yy} will become +@file{.cc} and @file{.hh}, @file{.y++} will become @file{c++} and +@file{h++}, @file{.yxx} will become @file{.cxx} and @file{.hxx}, +and @file{.ypp} will become @file{.cpp} and @file{.hpp}. + +Similarly, lex source files can be used to generate C or C++; the extensions @file{.l}, @file{.ll}, @file{.l++}, @file{.lxx}, and @file{.lpp} are recognized. -- 2.47.2