Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/bison/files/, sys-devel/bison/
Date: Mon, 11 Dec 2017 19:57:26
Message-Id: 1513022208.dc968ed2ef3744cb13305e6003c625ce2108d118.mgorny@gentoo
1 commit: dc968ed2ef3744cb13305e6003c625ce2108d118
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Mon Dec 11 19:51:42 2017 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon Dec 11 19:56:48 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc968ed2
7
8 sys-devel/bison: [QA] Move patches to distfiles
9
10 Closes: https://bugs.gentoo.org/620638
11
12 sys-devel/bison/Manifest | 3 +
13 sys-devel/bison/bison-1.875d.ebuild | 7 +-
14 sys-devel/bison/bison-2.4.3.ebuild | 9 +-
15 sys-devel/bison/bison-3.0.4-r1.ebuild | 9 +-
16 sys-devel/bison/files/bison-1.32-extfix.patch | 28 --
17 sys-devel/bison/files/bison-2.4.3-no-gets.patch | 22 -
18 .../files/bison-2.4.3-uclibc-sched_param-def.patch | 19 -
19 .../files/bison-3.0.4-darwin17-printf-n.patch | 30 --
20 .../bison/files/bison-3.0.4-fix-tests-gcc-7.patch | 151 -------
21 .../bison/files/bison-3.0.4-optional-perl.patch | 500 ---------------------
22 10 files changed, 17 insertions(+), 761 deletions(-)
23
24 diff --git a/sys-devel/bison/Manifest b/sys-devel/bison/Manifest
25 index f1b34ffa424..2a2ef94536f 100644
26 --- a/sys-devel/bison/Manifest
27 +++ b/sys-devel/bison/Manifest
28 @@ -1,4 +1,7 @@
29 +DIST bison-1.875d-patchset.tar.bz2 698 BLAKE2B a68e6009c24437a36c81e7fb97112f8ad721217b65a03531e5375e7310988f81d8c868485bdfc9b4ea99d4285ead91ad8f4670fb358abe92dc206cf6df4c80a1 SHA512 ac650b6f1b2b26057eda0d9ceae6f36604c88a67419b6190e423a08f863c460ded2a58040a71ce79b5e0b85ab3ede1b7a2ebd204c9bd8eb53f6551f39b160beb
30 DIST bison-1.875d.tar.bz2 882745 BLAKE2B c85ce71986ae095e9dcfa24c1a9c7c484b3663994c1e394b7cc78a0ec1cc95df60369ff9878ef82edb4be144298d8648e336e861de98152bf79f6d66369c6dd4 SHA512 f84c6cf41a289ea7e0805cf9b0da6fe2d77f2e03a35c3db7d2e36e5186bba7c0853c3d518bd89f6cfa1030e346e046aa03b33974bb892dbd8f040e5ea2de1126
31 +DIST bison-2.4.3-patchset.tar.bz2 1102 BLAKE2B 3615841400ba984e563933d31e59a4810e17aed48b8314a3ceb66b47b2ad432e287cf9588b632594311f68d28d2bcce3c6a4f2c4be527c676fcbfd2a4480d04a SHA512 a36cf45b475e55e8baae265e43a151d3324026878d4bb4c119b9fccfc7be3c26ed183632bf210fdb587e2741d298df1e9d4ebb6c3d440f6ae33f40a29949f7a0
32 DIST bison-2.4.3.tar.bz2 1652612 BLAKE2B 712444aec9898d2dc5dabd5008363f22f6beeb37e119edbdecb119965652e707d827e621c061b13be2206e29da59d661f1466c976c200ce749cf24062dbb5cf1 SHA512 b789f55d9cb95c1b4fba004691ed9f79b76da55020c9b202e1704a02aab1ba43b9fc1015e29843ed552e6df6165cef9c6ebc8a29d15a21c6e194cad8a42ab055
33 DIST bison-2.7.1.tar.xz 1781068 BLAKE2B bd3161bcf4d2a9f046073280a8d751eb770147f942d48326a9ac869cf31fd8f127759167dced662b826fa54a24cd0cf87b0c096814c84e34afed8078368828a1 SHA512 ac0c7ca57142bcb84af498f606acb86091984a00359294fbf721a4ca8112f9fcf26497f7dd2e65f527e04a6e1de94142ecb76602d407e548475970e5a566d370
34 +DIST bison-3.0.4-patchset.tar.xz 8216 BLAKE2B dd059a7a24faf351fa28bc72b6e183935d4409f91b5dcd8640a14d01b480a3e5b28ddb8f5660f16300a3cf1639d67bd3436d016fa304bb4666c9a43fd7897bd7 SHA512 87b62c5848360fee5b566c664c378ff08bb81d2b6c07b0d385ebd4dfd6b1a687af1da96ed43ca120695877cfc5e30a149ef35424c7a332e9223179dab6665d0b
35 DIST bison-3.0.4.tar.xz 1973796 BLAKE2B 6320424a5fece04734325226981af287e5745c898df7f0f79c26207599227f40e9ef54f93b2e231e20766ab9a19c0b266545bc5d0bfeabbb958e3e2f6686386c SHA512 bbdc23e7772e49da1c7c47e66d4e4efbfbfe9b21dbc59bf3ad9a6e573eecac6c9f52c7f11a64be9897e8deb99ef7ba015164aa8232aa391b901dd7db03632412
36
37 diff --git a/sys-devel/bison/bison-1.875d.ebuild b/sys-devel/bison/bison-1.875d.ebuild
38 index 522e7d85706..4afeb739bc8 100644
39 --- a/sys-devel/bison/bison-1.875d.ebuild
40 +++ b/sys-devel/bison/bison-1.875d.ebuild
41 @@ -1,11 +1,12 @@
42 -# Copyright 1999-2014 Gentoo Foundation
43 +# Copyright 1999-2017 Gentoo Foundation
44 # Distributed under the terms of the GNU General Public License v2
45
46 inherit toolchain-funcs flag-o-matic eutils
47
48 DESCRIPTION="A yacc-compatible parser generator"
49 HOMEPAGE="https://www.gnu.org/software/bison/bison.html"
50 -SRC_URI="ftp://alpha.gnu.org/pub/gnu/bison/${P}.tar.bz2"
51 +SRC_URI="ftp://alpha.gnu.org/pub/gnu/bison/${P}.tar.bz2
52 + https://dev.gentoo.org/~mgorny/dist/${P}-patchset.tar.bz2"
53
54 LICENSE="GPL-2"
55 SLOT="0"
56 @@ -18,7 +19,7 @@ DEPEND="sys-devel/m4
57 src_unpack() {
58 unpack ${A}
59 cd "${S}"
60 - epatch "${FILESDIR}"/${PN}-1.32-extfix.patch
61 + epatch "${WORKDIR}"/${P}-patchset/${PN}-1.32-extfix.patch
62 }
63
64 src_compile() {
65
66 diff --git a/sys-devel/bison/bison-2.4.3.ebuild b/sys-devel/bison/bison-2.4.3.ebuild
67 index fde4389df17..faed48df051 100644
68 --- a/sys-devel/bison/bison-2.4.3.ebuild
69 +++ b/sys-devel/bison/bison-2.4.3.ebuild
70 @@ -1,4 +1,4 @@
71 -# Copyright 1999-2014 Gentoo Foundation
72 +# Copyright 1999-2017 Gentoo Foundation
73 # Distributed under the terms of the GNU General Public License v2
74
75 EAPI="2"
76 @@ -7,7 +7,8 @@ inherit flag-o-matic eutils
77
78 DESCRIPTION="A yacc-compatible parser generator"
79 HOMEPAGE="https://www.gnu.org/software/bison/bison.html"
80 -SRC_URI="mirror://gnu/bison/${P}.tar.bz2"
81 +SRC_URI="mirror://gnu/bison/${P}.tar.bz2
82 + https://dev.gentoo.org/~mgorny/dist/${P}-patchset.tar.bz2"
83
84 LICENSE="GPL-2"
85 SLOT="0"
86 @@ -19,8 +20,8 @@ DEPEND="${RDEPEND}
87 nls? ( sys-devel/gettext )"
88
89 src_prepare() {
90 - epatch "${FILESDIR}"/${P}-uclibc-sched_param-def.patch
91 - epatch "${FILESDIR}"/${P}-no-gets.patch
92 + epatch "${WORKDIR}"/${P}-patchset/${P}-uclibc-sched_param-def.patch
93 + epatch "${WORKDIR}"/${P}-patchset/${P}-no-gets.patch
94 }
95
96 src_configure() {
97
98 diff --git a/sys-devel/bison/bison-3.0.4-r1.ebuild b/sys-devel/bison/bison-3.0.4-r1.ebuild
99 index 3672e2275c1..46bac9ecda7 100644
100 --- a/sys-devel/bison/bison-3.0.4-r1.ebuild
101 +++ b/sys-devel/bison/bison-3.0.4-r1.ebuild
102 @@ -7,7 +7,8 @@ inherit flag-o-matic eutils
103
104 DESCRIPTION="A general-purpose (yacc-compatible) parser generator"
105 HOMEPAGE="https://www.gnu.org/software/bison/"
106 -SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
107 +SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
108 + https://dev.gentoo.org/~mgorny/dist/${P}-patchset.tar.xz"
109
110 LICENSE="GPL-2"
111 SLOT="0"
112 @@ -24,9 +25,9 @@ DEPEND="${RDEPEND}
113 DOCS=( AUTHORS ChangeLog-2012 NEWS README THANKS TODO ) # ChangeLog-1998 PACKAGING README-alpha README-release
114
115 src_prepare() {
116 - epatch "${FILESDIR}"/${P}-optional-perl.patch #538300
117 - epatch "${FILESDIR}"/${P}-darwin17-printf-n.patch #632500
118 - epatch "${FILESDIR}"/${P}-fix-tests-gcc-7.patch #638308
119 + epatch "${WORKDIR}"/${P}-patchset/${P}-optional-perl.patch #538300
120 + epatch "${WORKDIR}"/${P}-patchset/${P}-darwin17-printf-n.patch #632500
121 + epatch "${WORKDIR}"/${P}-patchset/${P}-fix-tests-gcc-7.patch #638308
122 # The makefiles make the man page depend on the configure script
123 # which we patched above. Touch it to prevent regeneration.
124 touch doc/bison.1 #548778 #538300#9
125
126 diff --git a/sys-devel/bison/files/bison-1.32-extfix.patch b/sys-devel/bison/files/bison-1.32-extfix.patch
127 deleted file mode 100644
128 index 363d038d8a5..00000000000
129 --- a/sys-devel/bison/files/bison-1.32-extfix.patch
130 +++ /dev/null
131 @@ -1,28 +0,0 @@
132 -2002-02-15 Gwenole Beauchesne <gbeauchesne@××××××××××××.com>
133 -
134 - * src/files (compute_exts_from_gf, compute_exts_from_src): Handle
135 - the case where header_extension is the same as src_extension, aka
136 - handle -d -o <file> where <file> doesn't have a known EXT to
137 - transform. e.g. if <file> is <something>.yxx, set the
138 - header_extension to <something>.yxx.h, as would do bison 1.28.
139 -
140 ---- bison-1.32/src/files.c.extfix Mon Jan 21 16:41:46 2002
141 -+++ bison-1.32/src/files.c Fri Feb 15 15:40:43 2002
142 -@@ -288,6 +288,8 @@ compute_exts_from_gf (const char *ext)
143 - src_extension = tr (src_extension, 'Y', 'C');
144 - header_extension = tr (ext, 'y', 'h');
145 - header_extension = tr (header_extension, 'Y', 'H');
146 -+ if (!strcmp (header_extension, src_extension))
147 -+ header_extension = concat2 (src_extension, ".h");
148 - }
149 -
150 - /* Computes extensions from the given c source file extension. */
151 -@@ -300,6 +302,8 @@ compute_exts_from_src (const char *ext)
152 - src_extension = xstrdup (ext);
153 - header_extension = tr (ext, 'c', 'h');
154 - header_extension = tr (header_extension, 'C', 'H');
155 -+ if (!strcmp (header_extension, src_extension))
156 -+ header_extension = concat2 (src_extension, ".h");
157 - }
158 -
159 -
160
161 diff --git a/sys-devel/bison/files/bison-2.4.3-no-gets.patch b/sys-devel/bison/files/bison-2.4.3-no-gets.patch
162 deleted file mode 100644
163 index a49a816f476..00000000000
164 --- a/sys-devel/bison/files/bison-2.4.3-no-gets.patch
165 +++ /dev/null
166 @@ -1,22 +0,0 @@
167 -hack until bizon pulls a newer gnulib version
168 -
169 -From 66712c23388e93e5c518ebc8515140fa0c807348 Mon Sep 17 00:00:00 2001
170 -From: Eric Blake <eblake@××××××.com>
171 -Date: Thu, 29 Mar 2012 13:30:41 -0600
172 -Subject: [PATCH] stdio: don't assume gets any more
173 -
174 -Gnulib intentionally does not have a gets module, and now that C11
175 -and glibc have dropped it, we should be more proactive about warning
176 -any user on a platform that still has a declaration of this dangerous
177 -interface.
178 -
179 ---- a/lib/stdio.in.h
180 -+++ b/lib/stdio.in.h
181 -@@ -125,7 +125,6 @@
182 - so any use of gets warrants an unconditional warning. Assume it is
183 - always declared, since it is required by C89. */
184 - #undef gets
185 --_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
186 -
187 - #if @GNULIB_FOPEN@
188 - # if @REPLACE_FOPEN@
189
190 diff --git a/sys-devel/bison/files/bison-2.4.3-uclibc-sched_param-def.patch b/sys-devel/bison/files/bison-2.4.3-uclibc-sched_param-def.patch
191 deleted file mode 100644
192 index 50652d8babc..00000000000
193 --- a/sys-devel/bison/files/bison-2.4.3-uclibc-sched_param-def.patch
194 +++ /dev/null
195 @@ -1,19 +0,0 @@
196 -uclibc defines __GLIBC__ but it does not expose struct shed_param as much as glibc
197 -and is not needed too per standard. gnulib attempts to use it but we have to account
198 -for it because in this case uclibc does not behave like glibc.
199 -
200 --Khem
201 -
202 -http://bugs.gentoo.org/336484
203 -
204 ---- m4-1.4.14/lib/spawn.in.h
205 -+++ m4-1.4.14/lib/spawn.in.h
206 -@@ -31,7 +31,7 @@
207 -
208 - /* Get definitions of 'struct sched_param' and 'sigset_t'.
209 - But avoid namespace pollution on glibc systems. */
210 --#ifndef __GLIBC__
211 -+#if !defined __GLIBC__ || defined __UCLIBC__
212 - # include <sched.h>
213 - # include <signal.h>
214 - #endif
215
216 diff --git a/sys-devel/bison/files/bison-3.0.4-darwin17-printf-n.patch b/sys-devel/bison/files/bison-3.0.4-darwin17-printf-n.patch
217 deleted file mode 100644
218 index 1c77ed773c2..00000000000
219 --- a/sys-devel/bison/files/bison-3.0.4-darwin17-printf-n.patch
220 +++ /dev/null
221 @@ -1,30 +0,0 @@
222 -http://lists.gnu.org/archive/html/bug-gnulib/2017-07/txtmumXtpD69v.txt
223 -
224 -extract of only the relevant hunk to avoid irrelevant conflicts
225 -
226 -From c41f233c4c38e84023a16339782ee306f03e7f59 Mon Sep 17 00:00:00 2001
227 -From: Paul Eggert <address@hidden>
228 -Date: Fri, 7 Jul 2017 14:10:20 -0700
229 -Subject: [PATCH] vasnprintf: port to macOS 10.13
230 -
231 -Problem reported by comex in:
232 -http://lists.gnu.org/archive/html/bug-gnulib/2017-07/msg00056.html
233 -* lib/vasnprintf.c (VASNPRINTF): Don’t use %n on macOS.
234 -
235 -diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c
236 -index 9c2af0e..fecaf27 100644
237 ---- a/lib/vasnprintf.c
238 -+++ b/lib/vasnprintf.c
239 -@@ -4869,7 +4869,11 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
240 - #endif
241 - *fbp = dp->conversion;
242 - #if USE_SNPRINTF
243 --# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
244 -+# if ! (((__GLIBC__ > 2 \
245 -+ || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) \
246 -+ && !defined __UCLIBC__) \
247 -+ || (defined __APPLE__ && defined __MACH__) \
248 -+ || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
249 - fbp[1] = '%';
250 - fbp[2] = 'n';
251 - fbp[3] = '\0';
252
253 diff --git a/sys-devel/bison/files/bison-3.0.4-fix-tests-gcc-7.patch b/sys-devel/bison/files/bison-3.0.4-fix-tests-gcc-7.patch
254 deleted file mode 100644
255 index 89fc5f6c39a..00000000000
256 --- a/sys-devel/bison/files/bison-3.0.4-fix-tests-gcc-7.patch
257 +++ /dev/null
258 @@ -1,151 +0,0 @@
259 -commit 952416114729b95209dccfc4edacfc1ff13b4e82
260 -Author: Akim Demaille <akim@××××××××××.fr>
261 -Date: Mon Jan 26 18:23:12 2015 +0100
262 -
263 - tests: c++: fix symbol lookup issue
264 -
265 - Sun C 5.13 SunOS_sparc 2014/10/20 reports errors on tests 430-432.
266 -
267 - Reported by Dennis Clarke.
268 - <http://lists.gnu.org/archive/html/bug-bison/2015-01/msg00087.html>
269 -
270 - * tests/c++.at (Variants): Be sure to emit operator<< before using it:
271 - use "%code top" rather than "%code".
272 - Prefer std::vector to std::list.
273 - Do not define anything in std::, to avoid undefined behavior.
274 -
275 -diff --git a/tests/c++.at b/tests/c++.at
276 -index 55d7d40..60292f4 100644
277 ---- a/tests/c++.at
278 -+++ b/tests/c++.at
279 -@@ -96,7 +96,7 @@ AT_SETUP([C++ Variant-based Symbols])
280 - AT_KEYWORDS([variant])
281 -
282 - AT_BISON_OPTION_PUSHDEFS([%skeleton "lalr1.cc" %debug $1])
283 --# Store strings and integers in a list of strings.
284 -+# Store strings and integers in a vector of strings.
285 - AT_DATA_GRAMMAR([list.y],
286 - [[%skeleton "lalr1.cc"
287 - %define api.value.type variant
288 -@@ -114,20 +114,20 @@ AT_DATA_GRAMMAR([list.y],
289 - }
290 -
291 - %token <int> INT "int"
292 --%type < std::list<int> > exp
293 -+%type < std::vector<int> > exp
294 -
295 - %printer { yyo << $$; } <int>
296 - %printer
297 - {
298 -- for (std::list<int>::const_iterator i = $$.begin (); i != $$.end (); ++i)
299 -+ for (std::vector<int>::const_iterator i = $$.begin (); i != $$.end (); ++i)
300 - {
301 - if (i != $$.begin ())
302 - yyo << ", ";
303 - yyo << *i;
304 - }
305 -- } < std::list<int> >
306 -+ } < std::vector<int> >
307 -
308 --%code requires { #include <list> }
309 -+%code requires { #include <vector> }
310 - %code { int yylex (yy::parser::semantic_type* yylval); }
311 -
312 - %%
313 -@@ -185,7 +185,7 @@ m4_pushdef([AT_TEST],
314 - [AT_SETUP([Variants $1])
315 -
316 - AT_BISON_OPTION_PUSHDEFS([%debug $1])
317 --# Store strings and integers in a list of strings.
318 -+# Store strings and integers in a vector of strings.
319 - AT_DATA_GRAMMAR([list.y],
320 - [[%debug
321 - %define api.value.type variant
322 -@@ -194,29 +194,25 @@ AT_DATA_GRAMMAR([list.y],
323 -
324 - %code requires // code for the .hh file
325 - {
326 --#include <list>
327 -+#include <vector>
328 - #include <string>
329 --typedef std::list<std::string> strings_type;
330 -+typedef std::vector<std::string> strings_type;
331 - }
332 -
333 --%code // code for the .cc file
334 -+%code top // code for the .cc file.
335 - {
336 - #include <cstdlib> // abort, getenv
337 - #include <iostream>
338 -+#include <vector>
339 - #include <sstream>
340 -+#include <string>
341 -
342 -- namespace yy
343 -- {
344 -- static]AT_TOKEN_CTOR_IF([[
345 -- parser::symbol_type yylex ()]], [[
346 -- parser::token_type yylex (parser::semantic_type* yylval]AT_LOCATION_IF([,
347 -- parser::location_type* yylloc])[)]])[;
348 -- }
349 -
350 -- // Printing a list of strings (for %printer).
351 -- // Koening look up will look into std, since that's an std::list.
352 -- namespace std
353 -+ typedef std::vector<std::string> strings_type;
354 -+
355 -+ namespace yy
356 - {
357 -+ // Must be available early, as is used in %destructor.
358 - std::ostream&
359 - operator<<(std::ostream& o, const strings_type& s)
360 - {
361 -@@ -230,16 +226,27 @@ typedef std::list<std::string> strings_type;
362 - return o << ')';
363 - }
364 - }
365 -+}
366 -
367 -- // Conversion to string.
368 -- template <typename T>
369 -- inline
370 -- std::string
371 -- to_string (const T& t)
372 -+%code // code for the .cc file.
373 -+{
374 -+ namespace yy
375 - {
376 -- std::ostringstream o;
377 -- o << t;
378 -- return o.str ();
379 -+ static]AT_TOKEN_CTOR_IF([[
380 -+ parser::symbol_type yylex ()]], [[
381 -+ parser::token_type yylex (parser::semantic_type* yylval]AT_LOCATION_IF([,
382 -+ parser::location_type* yylloc])[)]])[;
383 -+
384 -+ // Conversion to string.
385 -+ template <typename T>
386 -+ inline
387 -+ std::string
388 -+ to_string (const T& t)
389 -+ {
390 -+ std::ostringstream o;
391 -+ o << t;
392 -+ return o.str ();
393 -+ }
394 - }
395 - }
396 -
397 -@@ -252,10 +259,10 @@ typedef std::list<std::string> strings_type;
398 - // Using the template type to exercize its parsing.
399 - // Starting with :: to ensure we don't output "<::" which starts by the
400 - // digraph for the left square bracket.
401 --%type <::std::list<std::string>> list;
402 -+%type <::std::vector<std::string>> list;
403 -
404 - %printer { yyo << $$; }
405 -- <int> <::std::string> <::std::list<std::string>>;
406 -+ <int> <::std::string> <::std::vector<std::string>>;
407 - %destructor { std::cerr << "Destroy: " << $$ << '\n'; } <*>;
408 - %destructor { std::cerr << "Destroy: \"" << $$ << "\"\n"; } <::std::string>;
409 - %%
410
411 diff --git a/sys-devel/bison/files/bison-3.0.4-optional-perl.patch b/sys-devel/bison/files/bison-3.0.4-optional-perl.patch
412 deleted file mode 100644
413 index ba0bf7b2d5b..00000000000
414 --- a/sys-devel/bison/files/bison-3.0.4-optional-perl.patch
415 +++ /dev/null
416 @@ -1,500 +0,0 @@
417 -https://bugs.gentoo.org/538300
418 -
419 -From 3da25ddd011c169b9857ed2f6a2e82988f059ba5 Mon Sep 17 00:00:00 2001
420 -From: Mike Frysinger <vapier@g.o>
421 -Date: Fri, 3 Apr 2015 02:39:21 -0400
422 -Subject: [PATCH] make perl & examples optional
423 -
424 -The normal bison program does not require perl to build or run, so lets
425 -soften that requirement in the configure script. We now warn if its not
426 -found, and we make the examples logic depend on that.
427 -
428 -* configure.ac: Change AC_MSG_ERROR to AC_MSG_WARN for perl.
429 -Add an --enable-examples flag.
430 -* Makefile.am: Only include examples/local.mk when ENABLE_EXAMPLES.
431 ----
432 - Makefile.am | 2 ++
433 - configure.ac | 21 ++++++++++++++++++++-
434 - 2 files changed, 22 insertions(+), 1 deletion(-)
435 -
436 -diff --git a/Makefile.am b/Makefile.am
437 -index b6135cb..50ea0a0 100644
438 -#--- a/Makefile.am
439 -#+++ b/Makefile.am
440 -@@ -59,7 +59,9 @@ include data/local.mk
441 - include djgpp/local.mk
442 - include doc/local.mk
443 - include etc/local.mk
444 -+if ENABLE_EXAMPLES
445 - include examples/local.mk
446 -+endif
447 - include lib/local.mk
448 - include src/local.mk
449 - include tests/local.mk
450 -diff --git a/configure.ac b/configure.ac
451 -index 6f20040..e67249b 100644
452 -#--- a/configure.ac
453 -#+++ b/configure.ac
454 -@@ -179,12 +179,31 @@ AC_DEFINE_UNQUOTED([M4_GNU_OPTION], ["$M4_GNU"], [Define to "-g" if GNU M4
455 - supports -g, otherwise to "".])
456 - AC_PATH_PROG([PERL], [perl])
457 - if test -z "$PERL"; then
458 -- AC_MSG_ERROR([perl not found])
459 -+ AC_MSG_WARN([perl required for the testsuites])
460 - fi
461 - AM_MISSING_PROG([HELP2MAN], [help2man])
462 - AC_PATH_PROG([XSLTPROC], [xsltproc])
463 - AC_SUBST([XSLTPROC])
464 -
465 -+AC_ARG_ENABLE([examples],
466 -+ [AC_HELP_STRING([--disable-examples],
467 -+ [do not build and install examples])])
468 -+# Enable the examles by default if perl is available.
469 -+case $enable_examples in
470 -+no) ;;
471 -+yes)
472 -+ if test -z "$PERL"; then
473 -+ AC_MSG_ERROR([perl required for the examples])
474 -+ fi
475 -+ ;;
476 -+*)
477 -+ if test -n "$PERL"; then
478 -+ enable_examples=yes
479 -+ fi
480 -+ ;;
481 -+esac
482 -+AM_CONDITIONAL([ENABLE_EXAMPLES], [test "xenable_examples" = xyes])
483 -+
484 - # Checks for header files.
485 - AC_CHECK_HEADERS_ONCE([locale.h])
486 -
487 ---- a/Makefile.in
488 -+++ b/Makefile.in
489 -@@ -248,13 +248,29 @@
490 - POST_UNINSTALL = :
491 - build_triplet = @build@
492 - host_triplet = @host@
493 --check_PROGRAMS = $(am__EXEEXT_1) examples/mfcalc/mfcalc$(EXEEXT) \
494 -- examples/rpcalc/rpcalc$(EXEEXT)
495 -+check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2)
496 - @CROSS_COMPILING_FALSE@am__append_1 = $(top_srcdir)/doc/bison.help
497 --@FLEX_CXX_WORKS_TRUE@am__append_2 = examples/calc++/calc++
498 --@FLEX_CXX_WORKS_TRUE@am__append_3 = examples/calc++/calc++.test
499 --@FLEX_CXX_WORKS_FALSE@am__append_4 = examples/calc++/calc++.test
500 --@LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE@am__append_5 = lib/uniwidth/width.c
501 -+@ENABLE_EXAMPLES_TRUE@am__append_2 = $(extracted) \
502 -+@ENABLE_EXAMPLES_TRUE@ examples/extracted.stamp \
503 -+@ENABLE_EXAMPLES_TRUE@ $(calcxx_sources_generated) \
504 -+@ENABLE_EXAMPLES_TRUE@ examples/calc++/calc++-parser.output \
505 -+@ENABLE_EXAMPLES_TRUE@ examples/calc++/calc++-parser.stamp \
506 -+@ENABLE_EXAMPLES_TRUE@ examples/calc++/calc++-scanner.cc \
507 -+@ENABLE_EXAMPLES_TRUE@ examples/mfcalc/mfcalc.[ch] \
508 -+@ENABLE_EXAMPLES_TRUE@ examples/mfcalc/mfcalc.output \
509 -+@ENABLE_EXAMPLES_TRUE@ examples/rpcalc/rpcalc.[ch] \
510 -+@ENABLE_EXAMPLES_TRUE@ examples/rpcalc/rpcalc.output
511 -+@ENABLE_EXAMPLES_TRUE@am__append_3 = .yy .stamp
512 -+@ENABLE_EXAMPLES_TRUE@@FLEX_CXX_WORKS_TRUE@am__append_4 = examples/calc++/calc++
513 -+@ENABLE_EXAMPLES_TRUE@@FLEX_CXX_WORKS_TRUE@am__append_5 = examples/calc++/calc++.test
514 -+@ENABLE_EXAMPLES_TRUE@@FLEX_CXX_WORKS_FALSE@am__append_6 = examples/calc++/calc++.test
515 -+@ENABLE_EXAMPLES_TRUE@am__append_7 = $(mfcalc_sources) \
516 -+@ENABLE_EXAMPLES_TRUE@ $(rpcalc_sources)
517 -+@ENABLE_EXAMPLES_TRUE@am__append_8 = examples/mfcalc/mfcalc \
518 -+@ENABLE_EXAMPLES_TRUE@ examples/rpcalc/rpcalc
519 -+@ENABLE_EXAMPLES_TRUE@am__append_9 = examples/mfcalc/mfcalc.test \
520 -+@ENABLE_EXAMPLES_TRUE@ examples/rpcalc/rpcalc.test
521 -+@LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE@am__append_10 = lib/uniwidth/width.c
522 - bin_PROGRAMS = src/bison$(EXEEXT)
523 - subdir = .
524 - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
525 -@@ -356,7 +372,7 @@
526 - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
527 - $(ACLOCAL_M4)
528 - DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
529 -- $(am__configure_deps) $(dist_noinst_SCRIPTS) \
530 -+ $(am__configure_deps) $(am__dist_noinst_SCRIPTS_DIST) \
531 - $(srcdir)/doc/version.texi $(srcdir)/doc/stamp-vti \
532 - $(dist_doc_DATA) $(dist_m4sugar_DATA) $(dist_pkgdata_DATA) \
533 - $(dist_xslt_DATA) $(am__DIST_COMMON)
534 -@@ -473,15 +489,18 @@
535 - @ENABLE_YACC_TRUE@am_lib_liby_a_OBJECTS = lib/main.$(OBJEXT) \
536 - @ENABLE_YACC_TRUE@ lib/yyerror.$(OBJEXT)
537 - lib_liby_a_OBJECTS = $(am_lib_liby_a_OBJECTS)
538 --@FLEX_CXX_WORKS_TRUE@am__EXEEXT_1 = examples/calc++/calc++$(EXEEXT)
539 -+@ENABLE_EXAMPLES_TRUE@@FLEX_CXX_WORKS_TRUE@am__EXEEXT_1 = examples/calc++/calc++$(EXEEXT)
540 -+@ENABLE_EXAMPLES_TRUE@am__EXEEXT_2 = examples/mfcalc/mfcalc$(EXEEXT) \
541 -+@ENABLE_EXAMPLES_TRUE@ examples/rpcalc/rpcalc$(EXEEXT)
542 - PROGRAMS = $(bin_PROGRAMS)
543 --am__objects_2 = examples/calc++/examples_calc___calc__-calc++-driver.$(OBJEXT) \
544 -- examples/calc++/examples_calc___calc__-calc++-scanner.$(OBJEXT) \
545 -- examples/calc++/examples_calc___calc__-calc++.$(OBJEXT)
546 --am__objects_3 = examples/calc++/examples_calc___calc__-calc++-parser.$(OBJEXT)
547 --am__objects_4 = $(am__objects_2) $(am__objects_3)
548 --@FLEX_CXX_WORKS_TRUE@nodist_examples_calc___calc___OBJECTS = \
549 --@FLEX_CXX_WORKS_TRUE@ $(am__objects_4)
550 -+@ENABLE_EXAMPLES_TRUE@am__objects_2 = examples/calc++/examples_calc___calc__-calc++-driver.$(OBJEXT) \
551 -+@ENABLE_EXAMPLES_TRUE@ examples/calc++/examples_calc___calc__-calc++-scanner.$(OBJEXT) \
552 -+@ENABLE_EXAMPLES_TRUE@ examples/calc++/examples_calc___calc__-calc++.$(OBJEXT)
553 -+@ENABLE_EXAMPLES_TRUE@am__objects_3 = examples/calc++/examples_calc___calc__-calc++-parser.$(OBJEXT)
554 -+@ENABLE_EXAMPLES_TRUE@am__objects_4 = $(am__objects_2) \
555 -+@ENABLE_EXAMPLES_TRUE@ $(am__objects_3)
556 -+@ENABLE_EXAMPLES_TRUE@@FLEX_CXX_WORKS_TRUE@nodist_examples_calc___calc___OBJECTS = \
557 -+@ENABLE_EXAMPLES_TRUE@@FLEX_CXX_WORKS_TRUE@ $(am__objects_4)
558 - examples_calc___calc___OBJECTS = \
559 - $(nodist_examples_calc___calc___OBJECTS)
560 - examples_calc___calc___LDADD = $(LDADD)
561 -@@ -490,17 +509,17 @@
562 - examples_calc___calc___LINK = $(CXXLD) \
563 - $(examples_calc___calc___CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
564 - $(LDFLAGS) -o $@
565 --am__objects_5 = \
566 -- examples/mfcalc/examples_mfcalc_mfcalc-mfcalc.$(OBJEXT)
567 --am__objects_6 = $(am__objects_5)
568 --nodist_examples_mfcalc_mfcalc_OBJECTS = $(am__objects_6)
569 -+@ENABLE_EXAMPLES_TRUE@am__objects_5 = examples/mfcalc/examples_mfcalc_mfcalc-mfcalc.$(OBJEXT)
570 -+@ENABLE_EXAMPLES_TRUE@am__objects_6 = $(am__objects_5)
571 -+@ENABLE_EXAMPLES_TRUE@nodist_examples_mfcalc_mfcalc_OBJECTS = \
572 -+@ENABLE_EXAMPLES_TRUE@ $(am__objects_6)
573 - examples_mfcalc_mfcalc_OBJECTS = \
574 - $(nodist_examples_mfcalc_mfcalc_OBJECTS)
575 - examples_mfcalc_mfcalc_DEPENDENCIES =
576 --am__objects_7 = \
577 -- examples/rpcalc/examples_rpcalc_rpcalc-rpcalc.$(OBJEXT)
578 --am__objects_8 = $(am__objects_7)
579 --nodist_examples_rpcalc_rpcalc_OBJECTS = $(am__objects_8)
580 -+@ENABLE_EXAMPLES_TRUE@am__objects_7 = examples/rpcalc/examples_rpcalc_rpcalc-rpcalc.$(OBJEXT)
581 -+@ENABLE_EXAMPLES_TRUE@am__objects_8 = $(am__objects_7)
582 -+@ENABLE_EXAMPLES_TRUE@nodist_examples_rpcalc_rpcalc_OBJECTS = \
583 -+@ENABLE_EXAMPLES_TRUE@ $(am__objects_8)
584 - examples_rpcalc_rpcalc_OBJECTS = \
585 - $(nodist_examples_rpcalc_rpcalc_OBJECTS)
586 - examples_rpcalc_rpcalc_DEPENDENCIES =
587 -@@ -528,6 +547,7 @@
588 - src_bison_DEPENDENCIES = lib/libbison.a $(am__DEPENDENCIES_1)
589 - src_bison_LINK = $(CCLD) $(src_bison_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
590 - $(LDFLAGS) -o $@
591 -+am__dist_noinst_SCRIPTS_DIST = examples/extexi examples/test
592 - SCRIPTS = $(bin_SCRIPTS) $(dist_noinst_SCRIPTS) \
593 - $(nodist_noinst_SCRIPTS)
594 - AM_V_P = $(am__v_P_@AM_V@)
595 -@@ -2145,7 +2165,7 @@
596 - djgpp/subpipe.h djgpp/testsuite.sed doc/refcard.tex \
597 - $(top_srcdir)/doc/bison.help $(dist_man_MANS:.1=.x) $(FIGS_GV) \
598 - $(FIGS_GV:.gv=.txt) $(FIGS_GV:.gv=.eps) $(FIGS_GV:.gv=.pdf) \
599 -- $(FIGS_GV:.gv=.png) doc/Doxyfile.in $(am__append_4) \
600 -+ $(FIGS_GV:.gv=.png) doc/Doxyfile.in $(am__append_6) \
601 - lib/alignof.h lib/alloca.in.h \
602 - $(top_srcdir)/build-aux/announce-gen lib/argmatch.h \
603 - lib/c-strcaseeq.h lib/calloc.c lib/cloexec.h lib/close.c \
604 -@@ -2249,27 +2269,20 @@
605 - # a developer might naively reference .version in a test case while the bison
606 - # executable still compiles with VERSION, and so the test case might fail or
607 - # pass incorrectly.
608 --BUILT_SOURCES = $(mfcalc_sources) $(rpcalc_sources) $(ALLOCA_H) \
609 -- lib/configmake.h $(ERRNO_H) lib/fcntl.h $(FLOAT_H) $(GETOPT_H) \
610 -- lib/inttypes.h lib/math.h $(SCHED_H) lib/signal.h \
611 -- lib/arg-nonnull.h lib/c++defs.h lib/warn-on-use.h lib/spawn.h \
612 -- $(STDBOOL_H) $(STDDEF_H) $(STDINT_H) lib/stdio.h lib/stdlib.h \
613 -- lib/string.h lib/sys/stat.h lib/sys/time.h lib/sys/types.h \
614 -- lib/sys/wait.h lib/time.h lib/unistd.h \
615 -- $(LIBUNISTRING_UNITYPES_H) $(LIBUNISTRING_UNIWIDTH_H) \
616 -- lib/wchar.h lib/wctype.h src/parse-gram.c src/parse-gram.h \
617 -- src/scan-code.c src/scan-gram.c src/scan-skel.c \
618 -- $(top_srcdir)/.version
619 -+BUILT_SOURCES = $(am__append_7) $(ALLOCA_H) lib/configmake.h \
620 -+ $(ERRNO_H) lib/fcntl.h $(FLOAT_H) $(GETOPT_H) lib/inttypes.h \
621 -+ lib/math.h $(SCHED_H) lib/signal.h lib/arg-nonnull.h \
622 -+ lib/c++defs.h lib/warn-on-use.h lib/spawn.h $(STDBOOL_H) \
623 -+ $(STDDEF_H) $(STDINT_H) lib/stdio.h lib/stdlib.h lib/string.h \
624 -+ lib/sys/stat.h lib/sys/time.h lib/sys/types.h lib/sys/wait.h \
625 -+ lib/time.h lib/unistd.h $(LIBUNISTRING_UNITYPES_H) \
626 -+ $(LIBUNISTRING_UNIWIDTH_H) lib/wchar.h lib/wctype.h \
627 -+ src/parse-gram.c src/parse-gram.h src/scan-code.c \
628 -+ src/scan-gram.c src/scan-skel.c $(top_srcdir)/.version
629 - CLEANFILES = doc/refcard.pdf $(FIGS_GV:.gv=.eps) $(FIGS_GV:.gv=.pdf) \
630 -- $(FIGS_GV:.gv=.png) doc/Doxyfile $(extracted) \
631 -- examples/extracted.stamp $(calcxx_sources_generated) \
632 -- examples/calc++/calc++-parser.output \
633 -- examples/calc++/calc++-parser.stamp \
634 -- examples/calc++/calc++-scanner.cc examples/mfcalc/mfcalc.[ch] \
635 -- examples/mfcalc/mfcalc.output examples/rpcalc/rpcalc.[ch] \
636 -- examples/rpcalc/rpcalc.output lib/configmake.h \
637 -- lib/configmake.h-t lib/charset.alias lib/ref-add.sed \
638 -- lib/ref-del.sed
639 -+ $(FIGS_GV:.gv=.png) doc/Doxyfile $(am__append_2) \
640 -+ lib/configmake.h lib/configmake.h-t lib/charset.alias \
641 -+ lib/ref-add.sed lib/ref-del.sed
642 - DISTCLEANFILES = tests/atconfig $(check_SCRIPTS)
643 - MOSTLYCLEANDIRS = lib/sys lib/sys
644 - MOSTLYCLEANFILES = $(top_srcdir)/doc/*.t lib/core lib/*.stackdump \
645 -@@ -2289,10 +2302,9 @@
646 - lib/unistd.h-t lib/unitypes.h lib/unitypes.h-t lib/uniwidth.h \
647 - lib/uniwidth.h-t lib/wchar.h lib/wchar.h-t lib/wctype.h \
648 - lib/wctype.h-t src/yacc
649 --SUFFIXES = .gv .eps .pdf .png .yy .stamp
650 -+SUFFIXES = .gv .eps .pdf .png $(am__append_3)
651 - TESTS = $(dist_TESTS)
652 --dist_TESTS = $(am__append_3) examples/mfcalc/mfcalc.test \
653 -- examples/rpcalc/rpcalc.test
654 -+dist_TESTS = $(am__append_5) $(am__append_9)
655 - noinst_LIBRARIES = lib/libbison.a
656 - dist_pkgdata_DATA = \
657 - data/README \
658 -@@ -2364,59 +2376,59 @@
659 - -e 's,@top_srcdir\@,$(top_srcdir),g'
660 -
661 - nodist_noinst_SCRIPTS = etc/bench.pl
662 --dist_noinst_SCRIPTS = examples/extexi examples/test
663 --TEST_LOG_COMPILER = $(top_srcdir)/examples/test
664 --AM_CXXFLAGS = \
665 -- $(WARN_CXXFLAGS) $(WARN_CXXFLAGS_TEST) $(WERROR_CXXFLAGS)
666 --
667 --doc = $(top_srcdir)/doc/bison.texi
668 --extexi = $(top_srcdir)/examples/extexi
669 --@ENABLE_GCC_WARNINGS_TRUE@extexiFLAGS = --synclines
670 --extract = VERSION="$(VERSION)" $(PERL) $(extexi) $(extexiFLAGS) $(doc) --
671 --extracted = $(calcxx_extracted) $(mfcalc_extracted) \
672 -- $(rpcalc_extracted)
673 --calcxx_sources_extracted = \
674 -- examples/calc++/calc++-driver.cc \
675 -- examples/calc++/calc++-driver.hh \
676 -- examples/calc++/calc++-scanner.ll \
677 -- examples/calc++/calc++.cc
678 --
679 --calcxx_extracted = \
680 -- $(calcxx_sources_extracted) \
681 -- examples/calc++/calc++-parser.yy
682 --
683 --calcxx_sources_generated = \
684 -- examples/calc++/calc++-parser.cc \
685 -- examples/calc++/calc++-parser.hh \
686 -- examples/calc++/location.hh \
687 -- examples/calc++/position.hh \
688 -- examples/calc++/stack.hh
689 --
690 --calcxx_sources = \
691 -- $(calcxx_sources_extracted) \
692 -- $(calcxx_sources_generated)
693 --
694 --@FLEX_CXX_WORKS_TRUE@nodist_examples_calc___calc___SOURCES = \
695 --@FLEX_CXX_WORKS_TRUE@ $(calcxx_sources)
696 --
697 --@FLEX_CXX_WORKS_TRUE@examples_calc___calc___CPPFLAGS = -I$(top_builddir)/examples/calc++
698 --@FLEX_CXX_WORKS_TRUE@examples_calc___calc___CXXFLAGS = $(AM_CXXFLAGS) $(FLEX_SCANNER_CXXFLAGS)
699 --calcxxdir = $(docdir)/examples/calc++
700 --calcxx_DATA = $(calcxx_extracted)
701 --mfcalc_extracted = examples/mfcalc/calc.h examples/mfcalc/mfcalc.y
702 --mfcalc_sources = $(mfcalc_extracted)
703 --examples_mfcalc_mfcalc_LDADD = -lm
704 --nodist_examples_mfcalc_mfcalc_SOURCES = $(mfcalc_sources)
705 --examples_mfcalc_mfcalc_CPPFLAGS = -I$(top_builddir)/examples/mfcalc
706 --mfcalcdir = $(docdir)/examples/mfcalc
707 --mfcalc_DATA = $(mfcalc_extracted)
708 --rpcalc_extracted = examples/rpcalc/rpcalc.y
709 --rpcalc_sources = $(rpcalc_extracted)
710 --examples_rpcalc_rpcalc_LDADD = -lm
711 --nodist_examples_rpcalc_rpcalc_SOURCES = $(rpcalc_sources)
712 --examples_rpcalc_rpcalc_CPPFLAGS = -I$(top_builddir)/examples/rpcalc
713 --rpcalcdir = $(docdir)/examples/rpcalc
714 --rpcalc_DATA = $(rpcalc_extracted)
715 -+@ENABLE_EXAMPLES_TRUE@dist_noinst_SCRIPTS = examples/extexi examples/test
716 -+@ENABLE_EXAMPLES_TRUE@TEST_LOG_COMPILER = $(top_srcdir)/examples/test
717 -+@ENABLE_EXAMPLES_TRUE@AM_CXXFLAGS = \
718 -+@ENABLE_EXAMPLES_TRUE@ $(WARN_CXXFLAGS) $(WARN_CXXFLAGS_TEST) $(WERROR_CXXFLAGS)
719 -+
720 -+@ENABLE_EXAMPLES_TRUE@doc = $(top_srcdir)/doc/bison.texi
721 -+@ENABLE_EXAMPLES_TRUE@extexi = $(top_srcdir)/examples/extexi
722 -+@ENABLE_EXAMPLES_TRUE@@ENABLE_GCC_WARNINGS_TRUE@extexiFLAGS = --synclines
723 -+@ENABLE_EXAMPLES_TRUE@extract = VERSION="$(VERSION)" $(PERL) $(extexi) $(extexiFLAGS) $(doc) --
724 -+@ENABLE_EXAMPLES_TRUE@extracted = $(calcxx_extracted) \
725 -+@ENABLE_EXAMPLES_TRUE@ $(mfcalc_extracted) $(rpcalc_extracted)
726 -+@ENABLE_EXAMPLES_TRUE@calcxx_sources_extracted = \
727 -+@ENABLE_EXAMPLES_TRUE@ examples/calc++/calc++-driver.cc \
728 -+@ENABLE_EXAMPLES_TRUE@ examples/calc++/calc++-driver.hh \
729 -+@ENABLE_EXAMPLES_TRUE@ examples/calc++/calc++-scanner.ll \
730 -+@ENABLE_EXAMPLES_TRUE@ examples/calc++/calc++.cc
731 -+
732 -+@ENABLE_EXAMPLES_TRUE@calcxx_extracted = \
733 -+@ENABLE_EXAMPLES_TRUE@ $(calcxx_sources_extracted) \
734 -+@ENABLE_EXAMPLES_TRUE@ examples/calc++/calc++-parser.yy
735 -+
736 -+@ENABLE_EXAMPLES_TRUE@calcxx_sources_generated = \
737 -+@ENABLE_EXAMPLES_TRUE@ examples/calc++/calc++-parser.cc \
738 -+@ENABLE_EXAMPLES_TRUE@ examples/calc++/calc++-parser.hh \
739 -+@ENABLE_EXAMPLES_TRUE@ examples/calc++/location.hh \
740 -+@ENABLE_EXAMPLES_TRUE@ examples/calc++/position.hh \
741 -+@ENABLE_EXAMPLES_TRUE@ examples/calc++/stack.hh
742 -+
743 -+@ENABLE_EXAMPLES_TRUE@calcxx_sources = \
744 -+@ENABLE_EXAMPLES_TRUE@ $(calcxx_sources_extracted) \
745 -+@ENABLE_EXAMPLES_TRUE@ $(calcxx_sources_generated)
746 -+
747 -+@ENABLE_EXAMPLES_TRUE@@FLEX_CXX_WORKS_TRUE@nodist_examples_calc___calc___SOURCES = \
748 -+@ENABLE_EXAMPLES_TRUE@@FLEX_CXX_WORKS_TRUE@ $(calcxx_sources)
749 -+
750 -+@ENABLE_EXAMPLES_TRUE@@FLEX_CXX_WORKS_TRUE@examples_calc___calc___CPPFLAGS = -I$(top_builddir)/examples/calc++
751 -+@ENABLE_EXAMPLES_TRUE@@FLEX_CXX_WORKS_TRUE@examples_calc___calc___CXXFLAGS = $(AM_CXXFLAGS) $(FLEX_SCANNER_CXXFLAGS)
752 -+@ENABLE_EXAMPLES_TRUE@calcxxdir = $(docdir)/examples/calc++
753 -+@ENABLE_EXAMPLES_TRUE@calcxx_DATA = $(calcxx_extracted)
754 -+@ENABLE_EXAMPLES_TRUE@mfcalc_extracted = examples/mfcalc/calc.h examples/mfcalc/mfcalc.y
755 -+@ENABLE_EXAMPLES_TRUE@mfcalc_sources = $(mfcalc_extracted)
756 -+@ENABLE_EXAMPLES_TRUE@examples_mfcalc_mfcalc_LDADD = -lm
757 -+@ENABLE_EXAMPLES_TRUE@nodist_examples_mfcalc_mfcalc_SOURCES = $(mfcalc_sources)
758 -+@ENABLE_EXAMPLES_TRUE@examples_mfcalc_mfcalc_CPPFLAGS = -I$(top_builddir)/examples/mfcalc
759 -+@ENABLE_EXAMPLES_TRUE@mfcalcdir = $(docdir)/examples/mfcalc
760 -+@ENABLE_EXAMPLES_TRUE@mfcalc_DATA = $(mfcalc_extracted)
761 -+@ENABLE_EXAMPLES_TRUE@rpcalc_extracted = examples/rpcalc/rpcalc.y
762 -+@ENABLE_EXAMPLES_TRUE@rpcalc_sources = $(rpcalc_extracted)
763 -+@ENABLE_EXAMPLES_TRUE@examples_rpcalc_rpcalc_LDADD = -lm
764 -+@ENABLE_EXAMPLES_TRUE@nodist_examples_rpcalc_rpcalc_SOURCES = $(rpcalc_sources)
765 -+@ENABLE_EXAMPLES_TRUE@examples_rpcalc_rpcalc_CPPFLAGS = -I$(top_builddir)/examples/rpcalc
766 -+@ENABLE_EXAMPLES_TRUE@rpcalcdir = $(docdir)/examples/rpcalc
767 -+@ENABLE_EXAMPLES_TRUE@rpcalc_DATA = $(rpcalc_extracted)
768 -
769 - # Implementation of bitsets.
770 -
771 -@@ -2441,7 +2453,7 @@
772 - lib/progname.c lib/quotearg.c lib/sig-handler.c lib/size_max.h \
773 - lib/spawn-pipe.h lib/spawn-pipe.c lib/w32spawn.h \
774 - lib/glthread/threadlib.c lib/unistd.c lib/dup-safer.c \
775 -- lib/fd-safer.c lib/pipe-safer.c $(am__append_5) \
776 -+ lib/fd-safer.c lib/pipe-safer.c $(am__append_10) \
777 - lib/wait-process.h lib/wait-process.c lib/wctype-h.c \
778 - lib/xmalloc.c lib/xalloc-die.c lib/xconcat-filename.c \
779 - lib/xsize.h lib/xsize.c lib/xstrndup.h lib/xstrndup.c \
780 -@@ -5328,31 +5340,31 @@
781 - # configure, because the former is way faster than the latter.
782 - doc/Doxyfile: $(top_srcdir)/doc/Doxyfile.in
783 - $(AM_V_GEN) $(edit) $(top_srcdir)/doc/Doxyfile.in >doc/Doxyfile
784 --examples/extracted.stamp: $(doc) $(extexi)
785 -- $(AM_V_GEN)rm -f $@ $@.tmp
786 -- $(AM_V_at)touch $@.tmp
787 -- $(AM_V_at)$(extract) $(extracted)
788 -- $(AM_V_at)mv $@.tmp $@
789 --
790 --$(extracted): examples/extracted.stamp
791 -- @test -f $@ || rm -f examples/extracted.stamp
792 -- @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) examples/extracted.stamp
793 -+@ENABLE_EXAMPLES_TRUE@examples/extracted.stamp: $(doc) $(extexi)
794 -+@ENABLE_EXAMPLES_TRUE@ $(AM_V_GEN)rm -f $@ $@.tmp
795 -+@ENABLE_EXAMPLES_TRUE@ $(AM_V_at)touch $@.tmp
796 -+@ENABLE_EXAMPLES_TRUE@ $(AM_V_at)$(extract) $(extracted)
797 -+@ENABLE_EXAMPLES_TRUE@ $(AM_V_at)mv $@.tmp $@
798 -+
799 -+@ENABLE_EXAMPLES_TRUE@$(extracted): examples/extracted.stamp
800 -+@ENABLE_EXAMPLES_TRUE@ @test -f $@ || rm -f examples/extracted.stamp
801 -+@ENABLE_EXAMPLES_TRUE@ @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) examples/extracted.stamp
802 -
803 - # Don't depend on $(BISON) otherwise we would rebuild these files
804 - # in srcdir, including during distcheck, which is forbidden.
805 --examples/calc++/calc++-parser.stamp: $(BISON_IN)
806 --.yy.stamp:
807 -- $(AM_V_YACC)rm -f $@
808 -- $(AM_V_at)touch $@.tmp
809 -- $(AM_V_at)$(YACCCOMPILE) -o $*.cc $<
810 -- $(AM_V_at)mv -f $@.tmp $@
811 --
812 --$(calcxx_sources_generated): examples/calc++/calc++-parser.stamp
813 -- @test -f $@ || rm -f examples/calc++/calc++-parser.stamp
814 -- @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) examples/calc++/calc++-parser.stamp
815 -+@ENABLE_EXAMPLES_TRUE@examples/calc++/calc++-parser.stamp: $(BISON_IN)
816 -+@ENABLE_EXAMPLES_TRUE@×××.stamp:
817 -+@ENABLE_EXAMPLES_TRUE@ $(AM_V_YACC)rm -f $@
818 -+@ENABLE_EXAMPLES_TRUE@ $(AM_V_at)touch $@.tmp
819 -+@ENABLE_EXAMPLES_TRUE@ $(AM_V_at)$(YACCCOMPILE) -o $*.cc $<
820 -+@ENABLE_EXAMPLES_TRUE@ $(AM_V_at)mv -f $@.tmp $@
821 -+
822 -+@ENABLE_EXAMPLES_TRUE@$(calcxx_sources_generated): examples/calc++/calc++-parser.stamp
823 -+@ENABLE_EXAMPLES_TRUE@ @test -f $@ || rm -f examples/calc++/calc++-parser.stamp
824 -+@ENABLE_EXAMPLES_TRUE@ @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) examples/calc++/calc++-parser.stamp
825 -
826 - # Avoid using BUILT_SOURCES which is too global.
827 --$(examples_calc___calc___OBJECTS): $(calcxx_sources_generated)
828 -+@ENABLE_EXAMPLES_TRUE@$(examples_calc___calc___OBJECTS): $(calcxx_sources_generated)
829 -
830 - # We need the following in order to create <alloca.h> when the system
831 - # doesn't have one that works with the given compiler.
832 ---- a/configure
833 -+++ b/configure
834 -@@ -1693,6 +1693,8 @@
835 - ALLOCA
836 - GL_COND_LIBTOOL_FALSE
837 - GL_COND_LIBTOOL_TRUE
838 -+ENABLE_EXAMPLES_FALSE
839 -+ENABLE_EXAMPLES_TRUE
840 - XSLTPROC
841 - HELP2MAN
842 - PERL
843 -@@ -1837,6 +1839,7 @@
844 - enable_threads
845 - enable_gcc_warnings
846 - enable_yacc
847 -+enable_examples
848 - enable_assert
849 - with_gnu_ld
850 - enable_rpath
851 -@@ -2493,6 +2496,7 @@
852 - Also, issue synclines from the examples/ to
853 - the corresponding source in the Texinfo doc.
854 - --disable-yacc do not build a yacc command or an -ly library
855 -+ --disable-examples do not build and install examples
856 - --disable-assert turn off assertions
857 - --disable-rpath do not hardcode runtime library paths
858 - --disable-nls do not use Native Language Support
859 -@@ -8935,7 +8939,8 @@
860 -
861 -
862 - if test -z "$PERL"; then
863 -- as_fn_error $? "perl not found" "$LINENO" 5
864 -+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: perl required for the testsuites" >&5
865 -+$as_echo "$as_me: WARNING: perl required for the testsuites" >&2;}
866 - fi
867 -
868 - HELP2MAN=${HELP2MAN-"${am_missing_run}help2man"}
869 -@@ -8982,6 +8987,34 @@
870 -
871 -
872 -
873 -+# Check whether --enable-examples was given.
874 -+if test "${enable_examples+set}" = set; then :
875 -+ enableval=$enable_examples;
876 -+fi
877 -+
878 -+# Enable the examles by default if perl is available.
879 -+case $enable_examples in
880 -+no) ;;
881 -+yes)
882 -+ if test -z "$PERL"; then
883 -+ as_fn_error $? "perl required for the examples" "$LINENO" 5
884 -+ fi
885 -+ ;;
886 -+*)
887 -+ if test -n "$PERL"; then
888 -+ enable_examples=yes
889 -+ fi
890 -+ ;;
891 -+esac
892 -+ if test "xenable_examples" = xyes; then
893 -+ ENABLE_EXAMPLES_TRUE=
894 -+ ENABLE_EXAMPLES_FALSE='#'
895 -+else
896 -+ ENABLE_EXAMPLES_TRUE='#'
897 -+ ENABLE_EXAMPLES_FALSE=
898 -+fi
899 -+
900 -+
901 - # Checks for header files.
902 -
903 -
904 -@@ -38129,6 +38162,10 @@
905 - as_fn_error $? "conditional \"FLEX_CXX_WORKS\" was never defined.
906 - Usually this means the macro was only invoked conditionally." "$LINENO" 5
907 - fi
908 -+if test -z "${ENABLE_EXAMPLES_TRUE}" && test -z "${ENABLE_EXAMPLES_FALSE}"; then
909 -+ as_fn_error $? "conditional \"ENABLE_EXAMPLES\" was never defined.
910 -+Usually this means the macro was only invoked conditionally." "$LINENO" 5
911 -+fi
912 - if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
913 - as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
914 - Usually this means the macro was only invoked conditionally." "$LINENO" 5
915 ---
916 -2.3.4