mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-08-08 10:15:14 +00:00
Compare commits
81
Commits
8d101c19d4
...
v2.4.3_rc1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d45746a0b7 | ||
|
|
4b07bd01d8 | ||
|
|
e565556458 | ||
|
|
189ba6670f | ||
|
|
c027cccb35 | ||
|
|
a151f354cf | ||
|
|
31f8b787c0 | ||
|
|
b62042d203 | ||
|
|
0100cd629d | ||
|
|
12ff095cad | ||
|
|
67f5d55d7a | ||
|
|
ff1f7871df | ||
|
|
b733bcd00e | ||
|
|
cb76b1f1a3 | ||
|
|
4333ba11c6 | ||
|
|
48f4100a82 | ||
|
|
18493762be | ||
|
|
c7b5c7fd06 | ||
|
|
cf80e9c386 | ||
|
|
311b2e56ea | ||
|
|
895c37a5c7 | ||
|
|
08090fe64c | ||
|
|
c76f5dfb03 | ||
|
|
2ad7e09e96 | ||
|
|
a3d760ef5d | ||
|
|
22cc8d813e | ||
|
|
9398411bfc | ||
|
|
d093cf8cbd | ||
|
|
c412a490ec | ||
|
|
2d2a7d608e | ||
|
|
5ea72c19da | ||
|
|
97d520633b | ||
|
|
af8a609a90 | ||
|
|
73edad9a25 | ||
|
|
9736697d6d | ||
|
|
e2f3fda11a | ||
|
|
3c0be43411 | ||
|
|
d45708d418 | ||
|
|
219c26ea51 | ||
|
|
f1ceed0774 | ||
|
|
d2829fdc04 | ||
|
|
43dc3c8bc4 | ||
|
|
3d04b5673d | ||
|
|
39c2566994 | ||
|
|
1694ac5cf2 | ||
|
|
dfff662817 | ||
|
|
adf1725fdb | ||
|
|
7aaf9ce758 | ||
|
|
2ceb8c617c | ||
|
|
87b9c9bc43 | ||
|
|
dc25ce6bb1 | ||
|
|
ace92a2691 | ||
|
|
397bb3932f | ||
|
|
bbbbe221d7 | ||
|
|
4d7b57b527 | ||
|
|
321fe707f4 | ||
|
|
1266b63674 | ||
|
|
b9ad39c1fb | ||
|
|
b1a4261e6d | ||
|
|
a022ff4186 | ||
|
|
b5b94bd5e6 | ||
|
|
b9e42bb439 | ||
|
|
75ac158b82 | ||
|
|
f23cd66008 | ||
|
|
9874460819 | ||
|
|
915becaa5d | ||
|
|
ae50972393 | ||
|
|
c9e0a88079 | ||
|
|
50bcb22c4c | ||
|
|
cfc9e431c3 | ||
|
|
42f8609bbd | ||
|
|
9e408f848d | ||
|
|
48578d6c12 | ||
|
|
914e713d07 | ||
|
|
94505fb7e2 | ||
|
|
1bcbca4368 | ||
|
|
a17352a9da | ||
|
|
c984dee8d1 | ||
|
|
cefb18280b | ||
|
|
2f3064f08e | ||
|
|
ab3a683f05 |
@@ -26,6 +26,7 @@ conftest*
|
||||
gnulib
|
||||
javacomp.sh
|
||||
javaexec.sh
|
||||
maint.mk
|
||||
patches
|
||||
releases
|
||||
stamp-h*
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
/gnulib
|
||||
/javacomp.sh
|
||||
/javaexec.sh
|
||||
/maint.mk
|
||||
/patches
|
||||
/releases
|
||||
/stamp-h*
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
COPYING
|
||||
^doc/fdl\.texi$
|
||||
^doc/gpl-3\.0\.texi$
|
||||
^doc/yacc\.1\.in$
|
||||
^src/parse-gram\.h$
|
||||
^data/m4sugar/
|
||||
@@ -1,3 +1,729 @@
|
||||
2010-07-28 Joel E. Denny <[email protected]>
|
||||
|
||||
Version 2.4.3_rc1.
|
||||
* NEWS (2.4.3): Rename to...
|
||||
(2.4.3_rc1): ... this for now so we can include translation
|
||||
updates in 2.4.3, and set release date.
|
||||
* configure.ac (AM_INIT_AUTOMAKE): Underscore rather than dash
|
||||
in version string now indicates a release candidate and that we
|
||||
thus cannot enable gnits. Dash confuses git-version-gen.
|
||||
|
||||
2010-07-28 Joel E. Denny <[email protected]>
|
||||
|
||||
i18n: fix for gnulib.
|
||||
* po/POTFILES.in: Add remaining gnulib files that have
|
||||
translatable strings.
|
||||
|
||||
2010-07-25 Joel E. Denny <[email protected]>
|
||||
|
||||
maint: use announce-gen's new --mail-headers.
|
||||
* HACKING (Announce): Update instructions.
|
||||
* cfg.mk (announcement_Cc_): Define.
|
||||
* configure.ac (AM_GNU_GETTEXT_VERSION): Update to 0.18 as
|
||||
required by latest gnulib.
|
||||
* gnulib: Update to latest.
|
||||
|
||||
2009-08-17 Akim Demaille <[email protected]>
|
||||
|
||||
build: require gettext 0.17.
|
||||
|
||||
Suggested by Bruno Haible.
|
||||
http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
|
||||
* configure.ac: require gettext 0.17 to ensure compatibility with
|
||||
gnulib.
|
||||
|
||||
2010-07-24 Joel E. Denny <[email protected]>
|
||||
|
||||
tests: handle Valgrind that complains about >&-.
|
||||
* tests/output.at (AT_CHECK_OUTPUT): Extend to accept pre-tests.
|
||||
(Output files: -dv >&-): Skip test group if running
|
||||
maintainer-check-valgrind.
|
||||
|
||||
2010-07-21 Akim Demaille <[email protected]>
|
||||
|
||||
Pacify gcc warnings.
|
||||
* src/getargs.c (skeleton_arg): Pass "%s" to printf-like functions
|
||||
with variable format and no argument.
|
||||
|
||||
2010-06-17 Paul Eggert <[email protected]>
|
||||
|
||||
Update from GFDL GFDL 1.2 to 1.3.
|
||||
* doc/bison.texinfo: Update GFDL version number.
|
||||
* doc/fdl.texi: Update to version 1.3, taken from:
|
||||
http://www.gnu.org/licenses/fdl.texi
|
||||
|
||||
2010-06-17 Paul Eggert <[email protected]>
|
||||
|
||||
Do not use date ranges in copyright notices.
|
||||
See http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices
|
||||
|
||||
* HACKING, Makefile.am, NEWS, PACKAGING, README, README-alpha:
|
||||
* TODO, bootstrap, bootstrap.conf:
|
||||
* build-aux/update-b4-copyright, cfg.mk, configure.ac:
|
||||
* data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4:
|
||||
* data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc:
|
||||
* data/java-skel.m4, data/java.m4, data/lalr1.cc:
|
||||
* data/lalr1.java, data/location.cc:
|
||||
* data/xslt/bison.xsl:
|
||||
* data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl:
|
||||
* data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint:
|
||||
* djgpp/README.in, djgpp/config.bat, djgpp/config.sed:
|
||||
* djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat:
|
||||
* djgpp/subpipe.c, djgpp/subpipe.h:
|
||||
* djgpp/testsuite.sed, doc/bison.texinfo:
|
||||
* doc/refcard.tex, etc/README, etc/bench.pl.in:
|
||||
* examples/calc++/Makefile.am, examples/extexi:
|
||||
* lib/abitset.c, lib/abitset.h:
|
||||
* lib/bbitset.h, lib/bitset.c, lib/bitset.h:
|
||||
* lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
|
||||
* lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
|
||||
* lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
|
||||
* lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
|
||||
* lib/libiberty.h, lib/main.c, lib/timevar.c:
|
||||
* lib/timevar.def, lib/timevar.h, lib/vbitset.c:
|
||||
* lib/vbitset.h, lib/yyerror.c, m4/bison-i18n.m4:
|
||||
* m4/c-working.m4, m4/cxx.m4, m4/subpipe.m4, m4/timevar.m4:
|
||||
* src/LR0.c:
|
||||
* src/LR0.h, src/assoc.c:
|
||||
* src/assoc.h, src/closure.c, src/closure.h, src/complain.c:
|
||||
* src/complain.h, src/conflicts.c, src/conflicts.h:
|
||||
* src/derives.c, src/derives.h, src/files.c, src/files.h:
|
||||
* src/flex-scanner.h, src/getargs.c, src/getargs.h:
|
||||
* src/gram.c, src/gram.h, src/graphviz.c:
|
||||
* src/lalr.c, src/lalr.h:
|
||||
* src/location.c, src/location.h, src/main.c:
|
||||
* src/nullable.c, src/nullable.h:
|
||||
* src/output.c, src/output.h, src/parse-gram.y:
|
||||
* src/print-xml.c, src/print-xml.h, src/print.c, src/print.h:
|
||||
* src/print_graph.c, src/print_graph.h, src/reader.c:
|
||||
* src/reader.h, src/reduce.c, src/reduce.h, src/relation.c:
|
||||
* src/relation.h, src/scan-code.h, src/scan-code.l:
|
||||
* src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
|
||||
* src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
|
||||
* src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
|
||||
* src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
|
||||
* tests/actions.at, tests/atlocal.in, tests/c++.at:
|
||||
* tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
|
||||
* tests/existing.at, tests/glr-regression.at:
|
||||
* tests/headers.at, tests/input.at, tests/java.at:
|
||||
* tests/local.at:
|
||||
* tests/output.at, tests/push.at, tests/reduce.at:
|
||||
* tests/regression.at, tests/sets.at, tests/skeletons.at:
|
||||
* tests/synclines.at, tests/testsuite.at, tests/torture.at:
|
||||
* data/Makefile.am, data/location.cc, doc/Makefile.am, src/Makefile.am:
|
||||
* tests/Makefile.am, lib/Makefile.am, examples/Makefile.am:
|
||||
* etc/Makefile.am, m4/m4.m4, src/muscle_tab.c, src/muscle_tab.h:
|
||||
Don't use date ranges in copyright notices.
|
||||
|
||||
2010-05-10 Akim Demaille <[email protected]>
|
||||
|
||||
doc: fix lalr1.cc documentation.
|
||||
* doc/bison.texinfo (C++ Scanner Interface): Fix yylex signature.
|
||||
(C++ Bison Interface): Fix lalr1.cc skeleton name.
|
||||
(C++ Parser Interface): Fix semantic_type and location_type names.
|
||||
Document yy::parser::token.
|
||||
Reported by Jerry Quinn.
|
||||
|
||||
2010-05-07 Akim Demaille <[email protected]>
|
||||
|
||||
doc: fix typo.
|
||||
* tests/synclines.at: here.
|
||||
|
||||
2010-05-04 Akim Demaille <[email protected]>
|
||||
|
||||
tests: enhance AT_SYNCLINES_COMPILE.
|
||||
* tests/synclines.at (AT_SYNCLINES_COMPILE): More distcc patterns.
|
||||
(AT_TEST_SYNCLINE): Remove GCC 4.5 protection which is already
|
||||
taken care of in AT_SYNCLINES_COMPILE.
|
||||
|
||||
2010-04-30 Joel E. Denny <[email protected]>
|
||||
|
||||
Document that undefined %prec identifier warnings will remain.
|
||||
* NEWS (2.4.3): Here.
|
||||
(2.4.2): Here.
|
||||
|
||||
2010-04-25 Joel E. Denny <[email protected]>
|
||||
|
||||
build: don't require src/bison during bootstrap.
|
||||
Suggested by Eric Blake at
|
||||
<http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00003.html>.
|
||||
* bootstrap.conf (bootstrap_epilogue): New function to make sure
|
||||
src/parse-gram.[ch] are stamped later than src/parse-gram.y.
|
||||
|
||||
2010-04-11 Joel E. Denny <[email protected]>
|
||||
|
||||
* NEWS (2.4.3): Mention fix for Sun Studio C++.
|
||||
|
||||
2010-04-10 Joel E. Denny <[email protected]>
|
||||
|
||||
tests: fix for newer Sun Studio C++.
|
||||
Reported by Dagobert Michelsen at
|
||||
<http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00023.html>.
|
||||
* THANKS (Dagobert Michelsen): Add.
|
||||
* configure.ac (AC_PREREQ): Set to 2.64 so we get the latest
|
||||
Autoconf macro for handling the restrict keyword.
|
||||
* gnulib: Update to latest, which no longer overrides that macro
|
||||
from Autoconf.
|
||||
|
||||
2010-04-03 Joel E. Denny <[email protected]>
|
||||
|
||||
portability: fix pointer arithmetic to conform to C standard.
|
||||
Reported by Tys Lefering at
|
||||
<http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00035.html>.
|
||||
This fix is already implemented in glr.c and does not apply to
|
||||
lalr1.java.
|
||||
* data/lalr1.cc (yy::parser::parse): Increase size of
|
||||
yyerror_range and adjust subscripting so you don't have to
|
||||
subtract one from the beginning of the array.
|
||||
* data/yacc.c (b4_declare_parser_state_variables,
|
||||
yyparse, yypush_parse): Likewise.
|
||||
|
||||
2010-03-31 Joel E. Denny <[email protected]>
|
||||
|
||||
portability: fix test suite for GCC 4.5's new #error message.
|
||||
Reported by Tys Lefering at
|
||||
<http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00030.html>.
|
||||
* NEWS (2.4.3): Mention.
|
||||
* tests/synclines.at (AT_TEST_SYNCLINE): Implement.
|
||||
|
||||
2010-03-30 Akim Demaille <[email protected]>
|
||||
|
||||
fix comments.
|
||||
* src/graphviz.h: Add missing license notice.
|
||||
Document.
|
||||
|
||||
2010-03-23 Joel E. Denny <[email protected]>
|
||||
|
||||
portability: fix for BSD make.
|
||||
Reported by Johan van Selst at
|
||||
<http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00016.html>.
|
||||
* tests/Makefile.am ($(TESTSUITE)): Qualify package.m4 in
|
||||
this dependency list as in package.m4's target rule.
|
||||
|
||||
2010-03-23 Joel E. Denny <[email protected]>
|
||||
|
||||
portability: fix spawning on at least FreeBSD 8 and FreeBSD 9.
|
||||
Reported by Johan van Selst at
|
||||
<http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00014.html>.
|
||||
* NEWS (2.4.3): New.
|
||||
* THANKS (Johan van Selst): Add.
|
||||
* gnulib: Update to latest.
|
||||
|
||||
2010-03-20 Joel E. Denny <[email protected]>
|
||||
|
||||
maint: update for changes to gnulib's announce-gen.
|
||||
* HACKING (Announce): RELEASE_TYPE=major must now be written
|
||||
RELEASE_TYPE=stable.
|
||||
|
||||
2010-03-20 Joel E. Denny <[email protected]>
|
||||
|
||||
Version 2.4.2.
|
||||
* NEWS (2.4.2): Set version and date. For the recent test suite
|
||||
portability fixes, don't be so optimistic about their success
|
||||
given the lack of feedback on the affected platforms.
|
||||
|
||||
2010-02-22 Joel E. Denny <[email protected]>
|
||||
|
||||
Prepare for 2.4.2 release.
|
||||
* NEWS (2.4.1b): Rename back to...
|
||||
(2.4.2): ... this, and unset date.
|
||||
* configure.ac (AM_INIT_AUTOMAKE): Re-enable gnits.
|
||||
|
||||
2010-02-22 Joel E. Denny <[email protected]>
|
||||
|
||||
Version 2.4.1b.
|
||||
* NEWS (2.4.2): Rename to...
|
||||
(2.4.1b): ... this for now. Set date.
|
||||
* configure.ac (AM_INIT_AUTOMAKE): Disable gnits for now because
|
||||
it does not like this version name.
|
||||
|
||||
2010-02-22 Joel E. Denny <[email protected]>
|
||||
|
||||
tests: fix maintainer-xml-check for recent changes.
|
||||
* tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Use
|
||||
AT_BISON_CHECK_NO_XML rather than AT_BISON_CHECK because an
|
||||
output file whose name conflicts with a previous output file
|
||||
is now never generated.
|
||||
|
||||
2010-02-22 Joel E. Denny <[email protected]>
|
||||
|
||||
portability: fix several issues with M4 subprocess.
|
||||
|
||||
M4's output pipe was not being drained upon fatal errors during
|
||||
scan_skel. As a result, broken-pipe messages from M4 were seen
|
||||
on at least AIX, HP-UX, Solaris, and RHEL4, and this caused a
|
||||
failure in the test suite. The problem was that, on platforms
|
||||
where the default disposition for SIGPIPE is ignore instead of
|
||||
terminate, M4 sometimes saw fwrite fail with errno=EPIPE and
|
||||
then reported it. However, there's some sort of race condition,
|
||||
because the new test group occasionally succeeded.
|
||||
Reported by Albert Chin at
|
||||
<http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00004.html>.
|
||||
|
||||
There were also problems with the test suite livelocking on
|
||||
Tru64 5.1b. Reported by Didier Godefroy at
|
||||
<http://lists.gnu.org/archive/html/bug-bison/2009-05/msg00005.html>.
|
||||
Switching to create_pipe_bidi suggested by Akim Demaille.
|
||||
|
||||
To attempt to solve both of these problems, switch to gnulib's
|
||||
create_pipe_bidi and register M4 process as a slave. Along the
|
||||
way, clean up file name conflict handling, which was affected by
|
||||
the broken-pipe problem before the switch.
|
||||
* NEWS (2.4.2): Document.
|
||||
* THANKS (Didier Godefroy): Add.
|
||||
* bootstrap.conf (gnulib_modules): Add pipe.
|
||||
* gnulib: Update to latest to make sure we have all the latest
|
||||
fixes.
|
||||
* lib/Makefile.am (libbison_a_SOURCES): Remove subpipe.h and
|
||||
subpipe.c.
|
||||
* po/POTFILES.in (lib/subpipe.c): Remove.
|
||||
* src/files.c (compute_output_file_names): Update invocations
|
||||
of output_file_name_check.
|
||||
(output_file_name_check): In the case that the grammar file
|
||||
would be overwritten, use complain instead of fatal, but replace
|
||||
the output file name with /dev/null. Use the /dev/null solution
|
||||
for the case of two conflicting output files as well because it
|
||||
seems safer in case Bison one day tries to open both files at
|
||||
the same time.
|
||||
* src/files.h (output_file_name_check): Update prototype.
|
||||
* src/output.c (output_skeleton): Use create_pipe_bidi and
|
||||
wait_subprocess. Assert that scan_skel completely drains the
|
||||
pipe.
|
||||
* src/scan-skel.l (at_directive_perform): Update
|
||||
output_file_name_check invocation.
|
||||
* tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Check that the
|
||||
grammar file actually isn't overwritten.
|
||||
(Conflicting output files: -o foo.y): Update expected output.
|
||||
* tests/skeletons.at (Fatal errors but M4 continues producing
|
||||
output): New test group.
|
||||
|
||||
2010-02-04 Joel E. Denny <[email protected]>
|
||||
|
||||
Update POTFILES.
|
||||
* HACKING (Release Procedure): Add reminder about keeping
|
||||
POTFILES files up-to-date.
|
||||
* po/POTFILES.in (src/muscle_tab.c, src/scan-skel.l): Add.
|
||||
|
||||
2010-02-01 Joel E. Denny <[email protected]>
|
||||
|
||||
tests: link lib/libbison.a for gnulib.
|
||||
This solves a problem on Solaris 2.7 where the testsuite needs
|
||||
at least gnulib's rpl_fopen. Reported by Albert Chin at
|
||||
<http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00001.html>.
|
||||
* NEWS (2.4.2): Document.
|
||||
* tests/atlocal.in (LIBS): As for LDADD in src/Makefile.am, add
|
||||
lib/libbison.a.
|
||||
|
||||
2010-01-22 Joel E. Denny <[email protected]>
|
||||
|
||||
Prepare for 2.4.2 release.
|
||||
* NEWS (2.4.1a): Rename back to...
|
||||
(2.4.2): ... this, and unset date.
|
||||
* configure.ac (AM_INIT_AUTOMAKE): Re-enable gnits.
|
||||
|
||||
2010-01-22 Joel E. Denny <[email protected]>
|
||||
|
||||
Version 2.4.1a delayed.
|
||||
* NEWS (2.4.1a): Increment release date as there has been a
|
||||
small delay in getting the announcements and tarballs out.
|
||||
|
||||
2010-01-21 Joel E. Denny <[email protected]>
|
||||
|
||||
Version 2.4.1a.
|
||||
* NEWS (2.4.2): Rename to...
|
||||
(2.4.1a): ... this for now. Set date.
|
||||
* configure.ac (AM_INIT_AUTOMAKE): Disable gnits for now because
|
||||
it does not like this version name.
|
||||
|
||||
2010-01-21 Joel E. Denny <[email protected]>
|
||||
|
||||
* cfg.mk (gnulib_dir): Assume gnulib is a subdirectory.
|
||||
|
||||
2010-01-21 Joel E. Denny <[email protected]>
|
||||
|
||||
maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
|
||||
* HACKING (Release Procedure): Update notes on copyright years.
|
||||
* Makefile.am (update-package-copyright-year): New target rule.
|
||||
* build-aux/update-package-copyright-year: New file.
|
||||
* cfg.mk (update-copyright): Add update-package-copyright-year
|
||||
as a dependency.
|
||||
|
||||
2010-01-19 Joel E. Denny <[email protected]>
|
||||
|
||||
* bootstrap: Import improvements from latest gnulib.
|
||||
|
||||
2010-01-19 Joel E. Denny <[email protected]>
|
||||
|
||||
build: require Automake 1.11.1 to avoid a security flaw.
|
||||
* HACKING (Release Procedure): Don't document Automake security
|
||||
flaw here.
|
||||
* configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
|
||||
why here.
|
||||
|
||||
2010-01-19 Joel E. Denny <[email protected]>
|
||||
|
||||
gnulib: update to latest.
|
||||
|
||||
2010-01-19 Joel E. Denny <[email protected]>
|
||||
|
||||
ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
|
||||
|
||||
2010-01-15 Joel E. Denny <[email protected]>
|
||||
|
||||
Thank the developer of the initial push parser implementation.
|
||||
This unfortunate oversight is several years old.
|
||||
* THANKS (Odd Arild Olsen): Add.
|
||||
|
||||
2010-01-04 Joel E. Denny <[email protected]>
|
||||
|
||||
maint: run "make update-copyright"
|
||||
|
||||
2009-12-30 Joel E. Denny <[email protected]>
|
||||
|
||||
POSIX: warn if %prec's token was not defined.
|
||||
Reported by Florian Krohm at
|
||||
<http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
|
||||
* NEWS (2.4.2): Document.
|
||||
* src/reader.c (grammar_rule_check): Implement.
|
||||
(grammar_current_rule_prec_set): Add comments explaining that we
|
||||
here assume a %prec identifier is a token, but we still manage
|
||||
to support POSIX.
|
||||
* tests/input.at (%prec's token must be defined): New test
|
||||
group.
|
||||
|
||||
2009-12-31 Joel E. Denny <[email protected]>
|
||||
|
||||
* HACKING (Release Procedure): Recommend a secure automake.
|
||||
|
||||
2009-12-21 Joel E. Denny <[email protected]>
|
||||
|
||||
YYFAIL: deprecate.
|
||||
* NEWS (2.4.2): Document deprecation and the phase-out plan.
|
||||
* data/lalr1.java (parser::YYStack::YYFAIL): Add comment about
|
||||
deprecation.
|
||||
* data/yacc.c (YYFAIL): Likewise, and suppress warnings about
|
||||
YYFAIL from GCC cpp's -Wunused-macros.
|
||||
* doc/bison.texinfo (Java Action Features): Remove YYFAIL
|
||||
documentation.
|
||||
|
||||
2009-12-16 Joel E. Denny <[email protected]>
|
||||
|
||||
Add gcc's -Wundef to test suite and fix another warning from it.
|
||||
* NEWS (2.4.2): Update description of -Wundef fix.
|
||||
* configure.ac (WARN_CXXFLAGS_TEST): New substitution.
|
||||
(WARN_CFLAGS_TEST): New substitution.
|
||||
* data/glr.c: Avoid warning about __STRICT_ANSI__.
|
||||
* tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
|
||||
WARN_CFLAGS.
|
||||
(CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
|
||||
|
||||
2009-12-16 Joel E. Denny <[email protected]>
|
||||
|
||||
Document gcc -Wundef fix.
|
||||
* NEWS (2.4.2): Here.
|
||||
* THANKS (Jonathan Nieder): Add.
|
||||
|
||||
2009-12-15 Jonathan Nieder <[email protected]> (tiny change)
|
||||
|
||||
Avoid warnings from gcc -Wundef y.tab.c.
|
||||
* data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
|
||||
defined before using them.
|
||||
* data/lalr1.cc: Likewise.
|
||||
* data/yacc.c: Likewise.
|
||||
|
||||
2009-12-15 Joel E. Denny <[email protected]>
|
||||
|
||||
Import M4 detection fix from Autoconf.
|
||||
Reported by Eric Blake.
|
||||
* m4/m4.m4: Copy serial 10.
|
||||
|
||||
2009-12-14 Joel E. Denny <[email protected]>
|
||||
|
||||
Enable assertion output and --disable-assert for configure.
|
||||
* bootstrap.conf (gnulib_modules): Add assert module.
|
||||
* src/system.h (aver): Define as assert, and summarize the
|
||||
discussion on this issue.
|
||||
|
||||
2009-10-11 Joel E. Denny <[email protected]>
|
||||
|
||||
portability: use va_start and va_end in the same function.
|
||||
* src/complain.c (error_message): Move va_end from here...
|
||||
(ERROR_MESSAGE): ... to here.
|
||||
|
||||
2009-10-04 Joel E. Denny <[email protected]>
|
||||
|
||||
tests: skip tests of file names that platform does not support.
|
||||
Reported by Michael Raskin at
|
||||
<http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
|
||||
* THANKS (Michael Raskin): Add.
|
||||
* tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
|
||||
to fail at least for file names containing ":" or "\".
|
||||
|
||||
2009-09-16 Akim Demaille <[email protected]>
|
||||
|
||||
doc: spell checking.
|
||||
* doc/bison.texinfo: here.
|
||||
|
||||
2009-09-13 Joel E. Denny <[email protected]>
|
||||
|
||||
tests: clean up push.at test group titles.
|
||||
* tests/push.at: Remove "Push Parsing: " from test group titles
|
||||
because these are already under the banner "Push Parsing Tests".
|
||||
|
||||
2009-09-03 Akim Demaille <[email protected]>
|
||||
|
||||
* NEWS (2.4.2): Add "Internationalization" item.
|
||||
|
||||
2009-09-03 Akim Demaille <[email protected]>
|
||||
|
||||
bootstrap: fix/improve find_tool.
|
||||
* bootstrap (find_tool): Improve error messages.
|
||||
Fix typo about find_tool_names.
|
||||
|
||||
2009-08-27 Eric Blake <[email protected]>
|
||||
|
||||
scan-gram: avoid portability trap with ctype usage.
|
||||
* src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
|
||||
Avoid compiler warning.
|
||||
|
||||
2009-08-27 Joel E. Denny <[email protected]>
|
||||
|
||||
tests: use perl for printing special sequences to files.
|
||||
And skip tests if perl is not available. This is better than
|
||||
playing tricks with shell portability. Suggested by Akim
|
||||
Demaille.
|
||||
* tests/input.at (Bad character literals): Use it here for
|
||||
omitting final newlines.
|
||||
(Bad escapes in literals): Use it here for special characters.
|
||||
|
||||
2009-08-21 Joel E. Denny <[email protected]>
|
||||
|
||||
Use locale when quoting.
|
||||
* src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
|
||||
quote rather than implementing quoting here.
|
||||
|
||||
2009-08-20 Eric Blake <[email protected]>
|
||||
|
||||
Make previous patch more robust.
|
||||
* src/output.c (ARRAY_CARDINALITY): New macro, copied from
|
||||
argmatch.h.
|
||||
(output_skeleton): Use it.
|
||||
Suggested by Akim Demaille.
|
||||
|
||||
Import latest m4/m4.m4.
|
||||
* m4/m4.m4: Copy from autoconf 2.64.
|
||||
* configure.ac (M4_GNU_OPTION): New define.
|
||||
* src/output.c (output_skeleton): Use it to resolve FIXME.
|
||||
* NEWS: Mention this.
|
||||
|
||||
2009-08-19 Joel E. Denny <[email protected]>
|
||||
|
||||
Fix complaints about escape sequences.
|
||||
Discussed starting at
|
||||
<http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
|
||||
* src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
|
||||
For a \0 and similar escape sequences meaning the null
|
||||
character, report an invalid escape sequence instead of an
|
||||
invalid null character because the latter does not actually
|
||||
appear in the user's input.
|
||||
In all escape sequence complaints, don't escape the initial
|
||||
backslash, and don't quote when the sequence appears at the end
|
||||
of the complaint line unless there's whitespace that quotearg
|
||||
won't escape.
|
||||
Consistently say "invalid" not "unrecognized".
|
||||
* tests/input.at (Bad escapes in literals): New.
|
||||
|
||||
2009-08-19 Akim Demaille <[email protected]>
|
||||
|
||||
doc: %initial-action to initialize yylloc.
|
||||
Reported by Bill Allombert.
|
||||
* doc/bison.texinfo: Set fill-column to 76.
|
||||
(Location Type): Document the use of %initial-action to initialize
|
||||
yylloc.
|
||||
|
||||
2009-08-18 Joel E. Denny <[email protected]>
|
||||
|
||||
maint: update for gnulib's recent update-copyright changes
|
||||
* gnulib: Update.
|
||||
* .x-update-copyright (COPYING): Add as it's no longer implied
|
||||
when .x-update-copyright is present.
|
||||
* cfg.mk (update-copyright-local): Remove, now ignored.
|
||||
(update-copyright): Declare update-b4-copyright as a dependency.
|
||||
|
||||
2009-08-17 Akim Demaille <[email protected]>
|
||||
|
||||
build: lower gettext requirements.
|
||||
|
||||
Bison was uselessly requiring the formatstring macros from
|
||||
gettext, which resulted in mo files not being installed on systems
|
||||
that perfectly supported Bison mo files. Lower the requirement.
|
||||
http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
|
||||
|
||||
* configure.ac: Require need-ngettext instead of
|
||||
need-formatstring-macros.
|
||||
Reported by Martin Jabocs.
|
||||
Suggested by Bruno Haible.
|
||||
* INSTALL: Restructure.
|
||||
(Internationalization): New.
|
||||
|
||||
2009-08-14 Joel E. Denny <[email protected]>
|
||||
|
||||
maint: fix use of copyright year intervals.
|
||||
* gnulib: Update.
|
||||
* bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
|
||||
as now recommended in gnulib/NEWS.
|
||||
* build-aux/update-b4-copyright: Fix.
|
||||
* cfg.mk (update-copyright-env): Configure update-copyright.
|
||||
|
||||
2009-08-12 Akim Demaille <[email protected]>
|
||||
|
||||
distcheck: fix.
|
||||
|
||||
* examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
|
||||
|
||||
2009-08-06 Joel E. Denny <[email protected]>
|
||||
|
||||
maint: run "make update-copyright"
|
||||
But first...
|
||||
* .x-update-copyright (^data/m4sugar/): Add, because these
|
||||
files are from Autoconf.
|
||||
|
||||
2009-08-06 Joel E. Denny <[email protected]>
|
||||
|
||||
maint: make update-b4-copyright easier to use
|
||||
* build-aux/update-b4-copyright: In warnings, report line
|
||||
numbers rather than character positions.
|
||||
* cfg.mk (update-copyright-local): Set to update-b4-copyright so
|
||||
that update-copyright runs it.
|
||||
* gnulib: Update.
|
||||
|
||||
2009-08-05 Joel E. Denny <[email protected]>
|
||||
|
||||
maint: clean up update-b4-copyright code
|
||||
* build-aux/update-b4-copyright: Do not accept 2-digit
|
||||
UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
|
||||
Don't accept a `[' in a b4_copyright argument.
|
||||
Format code more consistently.
|
||||
Don't assume b4*copyright never occurs.
|
||||
|
||||
2009-08-04 Joel E. Denny <[email protected]>
|
||||
|
||||
maint: automate b4_copyright updates.
|
||||
* Makefile.am (update-b4-copyright): New target rule.
|
||||
* build-aux/Makefile.am (EXTRA_DIST): Add update-b4-copyright.
|
||||
* build-aux/update-b4-copyright: New.
|
||||
* data/yacc.c: Remove stray characters around b4_copyright
|
||||
invocations.
|
||||
|
||||
2009-08-04 Joel E. Denny <[email protected]>
|
||||
|
||||
maint: automate annual package-wide copyright-year update.
|
||||
* .x-update-copyright: New.
|
||||
* Makefile.am (EXTRA_DIST): Remove maint.mk.
|
||||
* bootstrap.conf (gnulib_modules): Add maintainer-makefile and
|
||||
update-copyright. Remove gnumakefile, which is implied by
|
||||
maintainer-makefile.
|
||||
* cfg.mk (bootstrap-tools): Copy from old maint.mk.
|
||||
* gnulib: Update.
|
||||
* maint.mk: Remove, now copied from gnulib.
|
||||
* examples/extexi: Add missing "(C)" in copyright statement so
|
||||
update-copyright can recognize it.
|
||||
* src/LR0.h: Likewise.
|
||||
* src/print.h: Likewise.
|
||||
* src/print_graph.h: Likewise.
|
||||
* src/gram.c: Add missing comma in copyright statement.
|
||||
* src/gram.h: Likewise.
|
||||
|
||||
2009-08-04 Joel E. Denny <[email protected]>
|
||||
|
||||
Fix "make distcheck".
|
||||
* examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
|
||||
of just calc.stamp.
|
||||
|
||||
2009-08-01 Joel E. Denny <[email protected]>
|
||||
|
||||
Pacify "gcc -Wunused" for the input function from Flex.
|
||||
Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
|
||||
and later.
|
||||
* src/scan-code.l: Add "%option noinput", which I cannot find in
|
||||
the Flex manual, but which Flex has supported since at least as
|
||||
far back as 2.5.4. However, if any of our developers still use
|
||||
Flex 2.5.4, they'll need to stop configuring with
|
||||
--enable-gcc-warnings because "%option noinput" didn't work
|
||||
correctly until Flex 2.5.6.
|
||||
* src/scan-gram.l: Likewise.
|
||||
* src/scan-skel.l: Likewise.
|
||||
|
||||
2009-06-29 Akim Demaille <[email protected]>
|
||||
|
||||
build: avoid concurrent extraction of calc++.
|
||||
* examples/calc++/Makefile.am (calc.stamp): New.
|
||||
Depend on it to create the sources of calc++ so that concurrent
|
||||
builds don't launch several "extexi" in parallel.
|
||||
Not only this is inefficient, this also builds incorrect sources
|
||||
with several extractions mixed together.
|
||||
|
||||
2009-06-25 Akim Demaille <[email protected]>
|
||||
|
||||
hash: check insertion for memory exhaustion.
|
||||
* src/uniqstr.c (uniqstr_new): New.
|
||||
|
||||
2009-06-11 Akim Demaille <[email protected]>
|
||||
|
||||
hash: check insertion for memory exhaustion.
|
||||
* src/muscle-tab.c (muscle_insert, muscle_grow)
|
||||
* src/state.c (state_hash_insert): Check the return value of
|
||||
hash_insert.
|
||||
|
||||
2009-06-10 Akim Demaille <[email protected]>
|
||||
|
||||
gnulib: update.
|
||||
* gnulib: Update to latest.
|
||||
* lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
|
||||
* m4/.gitignore: Regen.
|
||||
* src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
|
||||
Call xalloc_die on hash_insert failures.
|
||||
Requested by the new __warn_unused_result__ attribute of
|
||||
hash_insert.
|
||||
|
||||
2009-05-22 Joel E. Denny <[email protected]>
|
||||
|
||||
* data/c++.m4: Update copyright year.
|
||||
|
||||
2009-05-19 Joel E. Denny <[email protected]>
|
||||
|
||||
Handle a trailing `:' in a user-supplied C++ namespace better.
|
||||
* data/c++.m4 (b4_namespace_close): Don't let it be printed
|
||||
among the closing braces here. This fix might make the
|
||||
generated code easier to debug, but otherwise it should be
|
||||
insignificant because a trailing `:' is a C++ error already.
|
||||
|
||||
2009-05-11 Akim Demaille <[email protected]>
|
||||
|
||||
doc: use C++ headers.
|
||||
* doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
|
||||
headers.
|
||||
|
||||
2009-05-01 Joel E. Denny <[email protected]>
|
||||
|
||||
Declare %code to be a permanent feature.
|
||||
* NEWS (2.4.2): Here.
|
||||
* doc/bison.texinfo (Prologue Alternatives): Don't say it's
|
||||
experimental.
|
||||
(Decl Summary): Likewise.
|
||||
|
||||
2009-04-14 Akim Demaille <[email protected]>
|
||||
|
||||
doc: minor fixes.
|
||||
* doc/bison.texinfo (Decl Summary): Fix entry about %debug.
|
||||
(Table of Symbols): Remove duplicate entry for %debug.
|
||||
|
||||
2009-04-06 Eric Blake <[email protected]>
|
||||
|
||||
Work around autoconf 2.63b bug in testsuite.
|
||||
* tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
|
||||
autoconf bug related to # in test.
|
||||
|
||||
2009-04-06 Joel E. Denny <[email protected]>
|
||||
|
||||
Fix options documentation.
|
||||
@@ -4064,9 +4790,12 @@
|
||||
|
||||
2006-09-15 Bob Rossi <[email protected]>
|
||||
|
||||
Add support for push parsing. Based on the original work of
|
||||
Odd Arild Olsen <[email protected]>.
|
||||
* data/Makefile.am (dist_pkgdata_DATA): Add push.c.
|
||||
* data/c.m4 (YYPUSH): New.
|
||||
(b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
|
||||
* data/push.c: New file.
|
||||
* src/getargs.c (push_parser): New var.
|
||||
* src/getargs.h (push_parser): New declaration.
|
||||
* src/output.c (prepare): Add macro insertion of `push_flag'.
|
||||
@@ -21240,8 +21969,8 @@
|
||||
-----
|
||||
|
||||
Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
|
||||
1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
||||
2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
|
||||
2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file, with or without
|
||||
modification, are permitted provided the copyright notice and this
|
||||
|
||||
@@ -197,8 +197,11 @@ release:
|
||||
|
||||
* Release Procedure
|
||||
|
||||
** Try to get the *.pot files to the Translation Project at least one week
|
||||
before a stable release, to give them time to translate them.
|
||||
** Try to get the *.pot files to the Translation Project at least one
|
||||
week before a stable release, to give them time to translate them.
|
||||
Before generating the *.pot files, make sure that po/POTFILES.in and
|
||||
runtime-po/POTFILES.in list all files with translatable strings.
|
||||
This helps: grep -l '\<_(' *
|
||||
|
||||
** Tests
|
||||
See above.
|
||||
@@ -210,9 +213,17 @@ causes it to be rejected by recent Gettext releases; please report
|
||||
these to the Translation Project.
|
||||
|
||||
** Update README
|
||||
Make sure the information in this file is current. Most notably, make sure it
|
||||
recommends a version of GNU M4 that is compatible with the latest Bison
|
||||
sources.
|
||||
Make sure the information in README is current. Most notably, make sure
|
||||
it recommends a version of GNU M4 that is compatible with the latest
|
||||
Bison sources.
|
||||
|
||||
** Check copyright years.
|
||||
We update years in copyright statements throughout Bison once at the
|
||||
start of every year by running `make update-copyright'. However, before
|
||||
a release, it's good to verify that it's actually been run. Besides the
|
||||
copyright statement for each Bison file, check the copyright statements
|
||||
that the skeletons insert into generated parsers, and check all
|
||||
occurrences of PACKAGE_COPYRIGHT_YEAR in configure.ac.
|
||||
|
||||
** Update NEWS
|
||||
The version number, *and* the date of the release (including for
|
||||
@@ -221,9 +232,6 @@ betas).
|
||||
** Update ChangeLog
|
||||
Should have an entry similar to `Version 1.49b.'.
|
||||
|
||||
** Update configure.ac
|
||||
Be sure PACKAGE_COPYRIGHT_YEAR is up-to-date.
|
||||
|
||||
** Tag the release
|
||||
Before Bison will build with the right version number, you must tag the release
|
||||
in git. Do this after all other changes. The command is similar to:
|
||||
@@ -329,19 +337,21 @@ To generate a template announcement file:
|
||||
|
||||
make RELEASE_TYPE=alpha gpg_key_ID=F125BDF3 announcement
|
||||
|
||||
where alpha can be replaced by beta or major and F125BDF3 should be replaced
|
||||
with your key ID. For an example of how to fill out the template, search the
|
||||
mailing list archives for the most recent release announcement.
|
||||
where alpha can be replaced by beta or stable and F125BDF3 should be
|
||||
replaced with your key ID.
|
||||
|
||||
Complete/fix the announcement file, and send it at least to
|
||||
[email protected] (if a real release, or a ``serious beta''),
|
||||
bug-bison@gnu.org, [email protected], [email protected],
|
||||
and [email protected].
|
||||
Complete/fix the announcement file. The generated list of recipients
|
||||
([email protected], [email protected], [email protected],
|
||||
bison[email protected], and [email protected]) is
|
||||
appropriate for a stable release or a ``serious beta''. For any other
|
||||
release, drop at least [email protected]. For an example of how to fill
|
||||
out the rest of the template, search the mailing list archives for the
|
||||
most recent release announcement.
|
||||
|
||||
Send the same announcement on the comp.compilers newsgroup by sending
|
||||
email to [email protected]. Do not make any Cc as the moderator will
|
||||
throw away anything cross-posted or Cc'ed. It really needs to be a
|
||||
separate message.
|
||||
For a stable release, send the same announcement on the comp.compilers
|
||||
newsgroup by sending email to [email protected]. Do not make any Cc as
|
||||
the moderator will throw away anything cross-posted or Cc'ed. It really
|
||||
needs to be a separate message.
|
||||
|
||||
** Bump the version number
|
||||
In configure.ac. Run `make'. So that developers don't accidentally add new
|
||||
@@ -354,8 +364,8 @@ Push these changes.
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008, 2009
|
||||
Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free
|
||||
Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bison.
|
||||
|
||||
|
||||
+13
-3
@@ -1,6 +1,7 @@
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||
## Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software
|
||||
## Foundation, Inc.
|
||||
|
||||
## Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
||||
## 2010 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -23,7 +24,7 @@ SUBDIRS = build-aux po runtime-po lib data src doc examples tests etc
|
||||
aclocaldir = @aclocaldir@
|
||||
aclocal_DATA = m4/bison-i18n.m4
|
||||
|
||||
EXTRA_DIST = .prev-version .version cfg.mk maint.mk \
|
||||
EXTRA_DIST = .prev-version .version cfg.mk \
|
||||
OChangeLog PACKAGING \
|
||||
djgpp/Makefile.maint djgpp/README.in djgpp/config.bat \
|
||||
djgpp/config.sed djgpp/config.site djgpp/config_h.sed \
|
||||
@@ -57,3 +58,12 @@ $(top_srcdir)/.version: configure
|
||||
echo $(VERSION) > $@-t && mv $@-t $@
|
||||
dist-hook:
|
||||
echo $(VERSION) > $(distdir)/.tarball-version
|
||||
|
||||
.PHONY: update-b4-copyright update-package-copyright-year
|
||||
update-b4-copyright:
|
||||
find data -type f \
|
||||
| grep -v -E '^data/bison.m4$$' \
|
||||
| xargs $(build_aux)/$@
|
||||
@echo 'warning: src/parse-gram.[hc] may need to be regenerated.'
|
||||
update-package-copyright-year:
|
||||
$(build_aux)/$@ configure.ac
|
||||
|
||||
@@ -1,7 +1,114 @@
|
||||
Bison News
|
||||
----------
|
||||
|
||||
* Changes in version 2.4.2 (????-??-??):
|
||||
* Changes in version 2.4.3_rc1 (2010-07-29):
|
||||
|
||||
** Problems with spawning M4 on at least FreeBSD 8 and FreeBSD 9 have
|
||||
been fixed.
|
||||
|
||||
** Failures in the test suite for GCC 4.5 have been fixed.
|
||||
|
||||
** Failures in the test suite for some versions of Sun Studio C++ have
|
||||
been fixed.
|
||||
|
||||
** Contrary to Bison 2.4.2's NEWS entry, it has been decided that
|
||||
warnings about undefined %prec identifiers will not be converted to
|
||||
errors in Bison 2.5. They will remain warnings, which should be
|
||||
sufficient for POSIX while avoiding backward compatibility issues.
|
||||
|
||||
* Changes in version 2.4.2 (2010-03-20):
|
||||
|
||||
** Some portability problems that resulted in failures and livelocks
|
||||
in the test suite on some versions of at least Solaris, AIX, HP-UX,
|
||||
RHEL4, and Tru64 have been addressed. As a result, fatal Bison
|
||||
errors should no longer cause M4 to report a broken pipe on the
|
||||
affected platforms.
|
||||
|
||||
** `%prec IDENTIFIER' requires IDENTIFIER to be defined separately.
|
||||
|
||||
POSIX specifies that an error be reported for any identifier that does
|
||||
not appear on the LHS of a grammar rule and that is not defined by
|
||||
%token, %left, %right, or %nonassoc. Bison 2.3b and later lost this
|
||||
error report for the case when an identifier appears only after a
|
||||
%prec directive. It is now restored. However, for backward
|
||||
compatibility with recent Bison releases, it is only a warning for
|
||||
now. In Bison 2.5 and later, it will return to being an error.
|
||||
[Between the 2.4.2 and 2.4.3 releases, it was decided that this
|
||||
warning will not be converted to an error in Bison 2.5.]
|
||||
|
||||
** Detection of GNU M4 1.4.6 or newer during configure is improved.
|
||||
|
||||
** Warnings from gcc's -Wundef option about undefined YYENABLE_NLS,
|
||||
YYLTYPE_IS_TRIVIAL, and __STRICT_ANSI__ in C/C++ parsers are now
|
||||
avoided.
|
||||
|
||||
** %code is now a permanent feature.
|
||||
|
||||
A traditional Yacc prologue directive is written in the form:
|
||||
|
||||
%{CODE%}
|
||||
|
||||
To provide a more flexible alternative, Bison 2.3b introduced the
|
||||
%code directive with the following forms for C/C++:
|
||||
|
||||
%code {CODE}
|
||||
%code requires {CODE}
|
||||
%code provides {CODE}
|
||||
%code top {CODE}
|
||||
|
||||
These forms are now considered permanent features of Bison. See the
|
||||
%code entries in the section "Bison Declaration Summary" in the Bison
|
||||
manual for a summary of their functionality. See the section
|
||||
"Prologue Alternatives" for a detailed discussion including the
|
||||
advantages of %code over the traditional Yacc prologue directive.
|
||||
|
||||
Bison's Java feature as a whole including its current usage of %code
|
||||
is still considered experimental.
|
||||
|
||||
** YYFAIL is deprecated and will eventually be removed.
|
||||
|
||||
YYFAIL has existed for many years as an undocumented feature of
|
||||
deterministic parsers in C generated by Bison. Previously, it was
|
||||
documented for Bison's experimental Java parsers. YYFAIL is no longer
|
||||
documented for Java parsers and is formally deprecated in both cases.
|
||||
Users are strongly encouraged to migrate to YYERROR, which is
|
||||
specified by POSIX.
|
||||
|
||||
Like YYERROR, you can invoke YYFAIL from a semantic action in order to
|
||||
induce a syntax error. The most obvious difference from YYERROR is
|
||||
that YYFAIL will automatically invoke yyerror to report the syntax
|
||||
error so that you don't have to. However, there are several other
|
||||
subtle differences between YYERROR and YYFAIL, and YYFAIL suffers from
|
||||
inherent flaws when %error-verbose or `#define YYERROR_VERBOSE' is
|
||||
used. For a more detailed discussion, see:
|
||||
|
||||
http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html
|
||||
|
||||
The upcoming Bison 2.5 will remove YYFAIL from Java parsers, but
|
||||
deterministic parsers in C will continue to implement it. However,
|
||||
because YYFAIL is already flawed, it seems futile to try to make new
|
||||
Bison features compatible with it. Thus, during parser generation,
|
||||
Bison 2.5 will produce a warning whenever it discovers YYFAIL in a
|
||||
rule action. In a later release, YYFAIL will be disabled for
|
||||
%error-verbose and `#define YYERROR_VERBOSE'. Eventually, YYFAIL will
|
||||
be removed altogether.
|
||||
|
||||
There exists at least one case where Bison 2.5's YYFAIL warning will
|
||||
be a false positive. Some projects add phony uses of YYFAIL and other
|
||||
Bison-defined macros for the sole purpose of suppressing C
|
||||
preprocessor warnings (from GCC cpp's -Wunused-macros, for example).
|
||||
To avoid Bison's future warning, such YYFAIL uses can be moved to the
|
||||
epilogue (that is, after the second `%%') in the Bison input file. In
|
||||
this release (2.4.2), Bison already generates its own code to suppress
|
||||
C preprocessor warnings for YYFAIL, so projects can remove their own
|
||||
phony uses of YYFAIL if compatibility with Bison releases prior to
|
||||
2.4.2 is not necessary.
|
||||
|
||||
** Internationalization.
|
||||
|
||||
Fix a regression introduced in Bison 2.4: Under some circumstances,
|
||||
message translations were not installed although supported by the
|
||||
host system.
|
||||
|
||||
* Changes in version 2.4.1 (2008-12-11):
|
||||
|
||||
@@ -1051,7 +1158,8 @@ End:
|
||||
-----
|
||||
|
||||
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
|
||||
2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
|
||||
Inc.
|
||||
|
||||
This file is part of Bison, the GNU Parser Generator.
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ to the bison package.
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2002, 2005 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2005, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
|
||||
@@ -1,31 +1,47 @@
|
||||
This package contains the GNU Bison parser generator.
|
||||
|
||||
See the file INSTALL for generic compilation and installation instructions.
|
||||
* Installation
|
||||
** Build
|
||||
See the file INSTALL for generic compilation and installation
|
||||
instructions.
|
||||
|
||||
Bison requires GNU m4 1.4.6 or later. See:
|
||||
|
||||
ftp://ftp.gnu.org/gnu/m4/m4-1.4.6.tar.gz
|
||||
|
||||
** Internationalization
|
||||
Bison supports two catalogues: one for Bison itself (i.e., for the
|
||||
maintainer-side parser generation), and one for the generated parsers
|
||||
(i.e., for the user-side parser execution). The requirements between
|
||||
both differ: bison needs ngettext, the generated parsers do not. To
|
||||
simplify the build system, neither are installed if ngettext is not
|
||||
supported, even if generated parsers could have been localized. See
|
||||
http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html for
|
||||
more details.
|
||||
|
||||
* Questions
|
||||
See the section FAQ in the documentation (doc/bison.info) for
|
||||
frequently asked questions. The documentation is also available in
|
||||
PDF and HTML, provided you have a recent version of Texinfo installed:
|
||||
run "make pdf" or "make html".
|
||||
|
||||
Bison requires GNU m4 1.4.6 or later. See:
|
||||
|
||||
ftp://ftp.gnu.org/gnu/m4/m4-1.4.6.tar.gz
|
||||
|
||||
Bison can work with pre-1.4.6 distributions of GNU m4 if they are
|
||||
sufficiently patched, but if you encounter a bug with an older
|
||||
distribution and report a bug we will probably suggest that you
|
||||
upgrade to 1.4.6 as the first step in trying to fix it.
|
||||
If you have questions about using Bison and the documentation does
|
||||
not answer them, please send mail to <[email protected]>.
|
||||
|
||||
* Bug reports
|
||||
Please send bug reports to <[email protected]>. Please include the
|
||||
version number from `bison --version', and a complete, self-contained
|
||||
test case in each bug report.
|
||||
|
||||
If you have questions about using Bison and the documentation does
|
||||
not answer them, please send mail to <[email protected]>.
|
||||
|
||||
Local Variables:
|
||||
mode: outline
|
||||
End:
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 1992, 1998, 1999, 2003, 2004, 2005, 2008 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992, 1998, 1999, 2003, 2004, 2005, 2008, 2009, 2010
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ the problems you encounter.
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2004, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bison.
|
||||
|
||||
|
||||
@@ -290,8 +290,8 @@ Equip the parser with a means to create the (visual) parse tree.
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2001, 2002, 2003, 2004, 2006 Free Software Foundation,
|
||||
Inc.
|
||||
Copyright (C) 2001, 2002, 2003, 2004, 2006, 2008, 2009, 2010 Free
|
||||
Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
# Bootstrap this package from checked-out sources.
|
||||
|
||||
# Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
# Free Software Foundation, Inc.
|
||||
# Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
|
||||
# Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -42,20 +42,21 @@ Bootstrap this package from the checked-out sources.
|
||||
|
||||
Options:
|
||||
--gnulib-srcdir=DIRNAME Specify the local directory where gnulib
|
||||
sources reside. Use this if you already
|
||||
have gnulib sources on your machine, and
|
||||
do not want to waste your bandwidth downloading
|
||||
them again.
|
||||
sources reside. Use this if you already
|
||||
have gnulib sources on your machine, and
|
||||
do not want to waste your bandwidth downloading
|
||||
them again.
|
||||
--copy Copy files instead of creating symbolic links.
|
||||
--force Attempt to bootstrap even if the sources seem
|
||||
not to have been checked out.
|
||||
not to have been checked out.
|
||||
--skip-po Do not download po files.
|
||||
--cvs-user=USERNAME Set the username to use when checking out
|
||||
sources from the gnulib repository.
|
||||
|
||||
If the file bootstrap.conf exists in the current working directory, its
|
||||
If the file $0.conf exists in the same directory as this script, its
|
||||
contents are read as shell variables to configure the bootstrap.
|
||||
|
||||
For build prerequisites, environment variables like \$AUTOCONF and \$AMTAR
|
||||
are honored.
|
||||
|
||||
Running without arguments will suffice in most cases.
|
||||
EOF
|
||||
}
|
||||
@@ -71,6 +72,10 @@ gnulib_modules=
|
||||
# Any gnulib files needed that are not in modules.
|
||||
gnulib_files=
|
||||
|
||||
# A function to be called after everything else in this script.
|
||||
# Override it via your own definition in bootstrap.conf.
|
||||
bootstrap_epilogue() { :; }
|
||||
|
||||
# The command to download all .po files for a specified domain into
|
||||
# a specified directory. Fill in the first %s is the domain name, and
|
||||
# the second with the destination directory. Use rsync's -L and -r
|
||||
@@ -81,9 +86,10 @@ po_download_command_format=\
|
||||
|
||||
extract_package_name='
|
||||
/^AC_INIT(/{
|
||||
/.*,.*,.*,/{
|
||||
/.*,.*,.*, */{
|
||||
s///
|
||||
s/[][]//g
|
||||
s/)$//
|
||||
p
|
||||
q
|
||||
}
|
||||
@@ -99,16 +105,21 @@ package=`sed -n "$extract_package_name" configure.ac` || exit
|
||||
gnulib_name=lib$package
|
||||
|
||||
build_aux=build-aux
|
||||
source_base=lib
|
||||
m4_base=m4
|
||||
doc_base=doc
|
||||
tests_base=tests
|
||||
|
||||
# Extra files from gnulib, which override files from other sources.
|
||||
gnulib_extra_files="
|
||||
$build_aux/install-sh
|
||||
$build_aux/missing
|
||||
$build_aux/mdate-sh
|
||||
$build_aux/texinfo.tex
|
||||
$build_aux/depcomp
|
||||
$build_aux/config.guess
|
||||
$build_aux/config.sub
|
||||
doc/INSTALL
|
||||
$build_aux/install-sh
|
||||
$build_aux/missing
|
||||
$build_aux/mdate-sh
|
||||
$build_aux/texinfo.tex
|
||||
$build_aux/depcomp
|
||||
$build_aux/config.guess
|
||||
$build_aux/config.sub
|
||||
doc/INSTALL
|
||||
"
|
||||
|
||||
# Additional gnulib-tool options to use. Use "\newline" to break lines.
|
||||
@@ -124,6 +135,9 @@ XGETTEXT_OPTIONS='\\\
|
||||
--flag=error:3:c-format --flag=error_at_line:5:c-format\\\
|
||||
'
|
||||
|
||||
# Package bug report address for gettext files
|
||||
[email protected]
|
||||
|
||||
# Files we don't want to import.
|
||||
excluded_files=
|
||||
|
||||
@@ -142,29 +156,37 @@ vc_ignore=auto
|
||||
|
||||
# find_tool ENVVAR NAMES...
|
||||
# -------------------------
|
||||
# Search for a required program. Use the value of ENVVAR, if set,
|
||||
# otherwise find the first of the NAMES that can be run (i.e.,
|
||||
# supports --version). If found, set ENVVAR to the program name,
|
||||
# die otherwise.
|
||||
find_tool ()
|
||||
{
|
||||
# Find sha1sum, named gsha1sum on MacPorts.
|
||||
find_tool_envvar=$1
|
||||
shift
|
||||
if eval test x"\$$find_tool_envvar" = x; then
|
||||
find_tool_names=$@
|
||||
eval "find_tool_res=\$$find_tool_envvar"
|
||||
if test x"$find_tool_res" = x; then
|
||||
for i
|
||||
do
|
||||
if ($i --version </dev/null) >/dev/null 2>&1; then
|
||||
find_tool_res=$i
|
||||
break
|
||||
find_tool_res=$i
|
||||
break
|
||||
fi
|
||||
done
|
||||
else
|
||||
find_tool_error_prefix="\$$find_tool_envvar: "
|
||||
fi
|
||||
if test x"$find_tool_res" = x; then
|
||||
echo >&2 "$0: $find_tool_name is required"
|
||||
echo >&2 "$0: one of these is required: $find_tool_names"
|
||||
exit 1
|
||||
fi
|
||||
($find_tool_res --version </dev/null) >/dev/null 2>&1 || {
|
||||
echo >&2 "$0: cannot run $find_tool_res --version"
|
||||
echo >&2 "$0: ${find_tool_error_prefix}cannot run $find_tool_res --version"
|
||||
exit 1
|
||||
}
|
||||
eval "$find_tool_envvar=\"$find_tool_res\""
|
||||
eval "$find_tool_envvar=\$find_tool_res"
|
||||
eval "export $find_tool_envvar"
|
||||
}
|
||||
|
||||
@@ -172,7 +194,13 @@ find_tool ()
|
||||
find_tool SHA1SUM sha1sum gsha1sum
|
||||
|
||||
# Override the default configuration, if necessary.
|
||||
test -r bootstrap.conf && . ./bootstrap.conf
|
||||
# Make sure that bootstrap.conf is sourced from the current directory
|
||||
# if we were invoked as "sh bootstrap".
|
||||
case "$0" in
|
||||
*/*) test -r "$0.conf" && . "$0.conf" ;;
|
||||
*) test -r "$0.conf" && . ./"$0.conf" ;;
|
||||
esac
|
||||
|
||||
|
||||
if test "$vc_ignore" = auto; then
|
||||
vc_ignore=
|
||||
@@ -191,9 +219,7 @@ do
|
||||
usage
|
||||
exit;;
|
||||
--gnulib-srcdir=*)
|
||||
GNULIB_SRCDIR=`expr "$option" : '--gnulib-srcdir=\(.*\)'`;;
|
||||
--cvs-user=*)
|
||||
CVS_USER=`expr "$option" : '--cvs-user=\(.*\)'`;;
|
||||
GNULIB_SRCDIR=`expr "X$option" : 'X--gnulib-srcdir=\(.*\)'`;;
|
||||
--skip-po)
|
||||
SKIP_PO=t;;
|
||||
--force)
|
||||
@@ -211,13 +237,13 @@ if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# If each line in $STR is not already on a line by itself in $FILE, insert it,
|
||||
# If $STR is not already on a line by itself in $FILE, insert it,
|
||||
# sorting the new contents of the file and replacing $FILE with the result.
|
||||
insert_sorted_if_absent() {
|
||||
file=$1
|
||||
str=$2
|
||||
test -f $file || touch $file
|
||||
echo "$str" | sort -u - $file | cmp -s - $file \
|
||||
echo "$str" | sort -u - $file | cmp - $file > /dev/null \
|
||||
|| echo "$str" | sort -u - $file -o $file \
|
||||
|| exit 1
|
||||
}
|
||||
@@ -259,16 +285,113 @@ if test ! -d $build_aux; then
|
||||
done
|
||||
fi
|
||||
|
||||
echo "$0: Bootstrapping from checked-out $package sources..."
|
||||
# Note this deviates from the version comparison in automake
|
||||
# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a
|
||||
# but this should suffice as we won't be specifying old
|
||||
# version formats or redundant trailing .0 in bootstrap.conf.
|
||||
# If we did want full compatibility then we should probably
|
||||
# use m4_version_compare from autoconf.
|
||||
sort_ver() { # sort -V is not generally available
|
||||
ver1="$1"
|
||||
ver2="$2"
|
||||
|
||||
cleanup_gnulib() {
|
||||
status=$?
|
||||
rm -fr gnulib
|
||||
exit $status
|
||||
# split on '.' and compare each component
|
||||
i=1
|
||||
while : ; do
|
||||
p1=$(echo "$ver1" | cut -d. -f$i)
|
||||
p2=$(echo "$ver2" | cut -d. -f$i)
|
||||
if [ ! "$p1" ]; then
|
||||
echo "$1 $2"
|
||||
break
|
||||
elif [ ! "$p2" ]; then
|
||||
echo "$2 $1"
|
||||
break
|
||||
elif [ ! "$p1" = "$p2" ]; then
|
||||
if [ "$p1" -gt "$p2" ] 2>/dev/null; then # numeric comparison
|
||||
echo "$2 $1"
|
||||
elif [ "$p2" -gt "$p1" ] 2>/dev/null; then # numeric comparison
|
||||
echo "$1 $2"
|
||||
else # numeric, then lexicographic comparison
|
||||
lp=$(printf "$p1\n$p2\n" | LANG=C sort -n | tail -n1)
|
||||
if [ "$lp" = "$p2" ]; then
|
||||
echo "$1 $2"
|
||||
else
|
||||
echo "$2 $1"
|
||||
fi
|
||||
fi
|
||||
break
|
||||
fi
|
||||
i=$(($i+1))
|
||||
done
|
||||
}
|
||||
|
||||
# See if we can use gnulib's git-merge-changelog merge driver.
|
||||
get_version() {
|
||||
app=$1
|
||||
|
||||
$app --version >/dev/null 2>&1 || return 1
|
||||
|
||||
$app --version 2>&1 |
|
||||
sed -n '# extract version within line
|
||||
s/.*[v ]\{1,\}\([0-9]\{1,\}\.[.a-z0-9-]*\).*/\1/
|
||||
t done
|
||||
|
||||
# extract version at start of line
|
||||
s/^\([0-9]\{1,\}\.[.a-z0-9-]*\).*/\1/
|
||||
t done
|
||||
|
||||
d
|
||||
|
||||
:done
|
||||
#the following essentially does s/5.005/5.5/
|
||||
s/\.0*\([1-9]\)/.\1/g
|
||||
p
|
||||
q'
|
||||
}
|
||||
|
||||
check_versions() {
|
||||
ret=0
|
||||
|
||||
while read app req_ver; do
|
||||
# Honor $APP variables ($TAR, $AUTOCONF, etc.)
|
||||
appvar=`echo $app | tr '[a-z]' '[A-Z]'`
|
||||
test "$appvar" = TAR && appvar=AMTAR
|
||||
eval "app=\${$appvar-$app}"
|
||||
inst_ver=$(get_version $app)
|
||||
if [ ! "$inst_ver" ]; then
|
||||
echo "Error: '$app' not found" >&2
|
||||
ret=1
|
||||
elif [ ! "$req_ver" = "-" ]; then
|
||||
latest_ver=$(sort_ver $req_ver $inst_ver | cut -d' ' -f2)
|
||||
if [ ! "$latest_ver" = "$inst_ver" ]; then
|
||||
echo "Error: '$app' version == $inst_ver is too old" >&2
|
||||
echo " '$app' version >= $req_ver is required" >&2
|
||||
ret=1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
return $ret
|
||||
}
|
||||
|
||||
print_versions() {
|
||||
echo "Program Min_version"
|
||||
echo "----------------------"
|
||||
printf "$buildreq"
|
||||
echo "----------------------"
|
||||
# can't depend on column -t
|
||||
}
|
||||
|
||||
if ! printf "$buildreq" | check_versions; then
|
||||
test -f README-prereq &&
|
||||
echo "See README-prereq for notes on obtaining these prerequisite programs:" >&2
|
||||
echo
|
||||
print_versions
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "$0: Bootstrapping from checked-out $package sources..."
|
||||
|
||||
# See if we can use gnulib's git-merge-changelog merge driver.
|
||||
if test -d .git && (git --version) >/dev/null 2>/dev/null ; then
|
||||
if git config merge.merge-changelog.driver >/dev/null ; then
|
||||
:
|
||||
@@ -281,35 +404,52 @@ if test -d .git && (git --version) >/dev/null 2>/dev/null ; then
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
cleanup_gnulib() {
|
||||
status=$?
|
||||
rm -fr gnulib
|
||||
exit $status
|
||||
}
|
||||
|
||||
git_modules_config () {
|
||||
test -f .gitmodules && git config --file .gitmodules "$@"
|
||||
}
|
||||
|
||||
# Get gnulib files.
|
||||
|
||||
case ${GNULIB_SRCDIR--} in
|
||||
-)
|
||||
if [ ! -d gnulib ]; then
|
||||
if git_modules_config submodule.gnulib.url >/dev/null; then
|
||||
echo "$0: getting gnulib files..."
|
||||
git submodule init || exit $?
|
||||
git submodule update || exit $?
|
||||
|
||||
case ${CVS_AUTH-pserver} in
|
||||
pserver)
|
||||
CVS_PREFIX=':pserver:anonymous@';;
|
||||
ssh)
|
||||
CVS_PREFIX="$CVS_USER${CVS_USER+@}";;
|
||||
*)
|
||||
echo "$0: $CVS_AUTH: Unknown CVS access method" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
|
||||
case $CVS_RSH in
|
||||
'') CVS_RSH=ssh; export CVS_RSH;;
|
||||
esac
|
||||
elif [ ! -d gnulib ]; then
|
||||
echo "$0: getting gnulib files..."
|
||||
|
||||
trap cleanup_gnulib 1 2 13 15
|
||||
|
||||
cvs -z3 -q -d ${CVS_PREFIX}pserver.git.sv.gnu.org:/gnulib.git co -d gnulib HEAD ||
|
||||
git clone --help|grep depth > /dev/null && shallow='--depth 2' || shallow=
|
||||
git clone $shallow git://git.sv.gnu.org/gnulib ||
|
||||
cleanup_gnulib
|
||||
|
||||
trap - 1 2 13 15
|
||||
fi
|
||||
GNULIB_SRCDIR=gnulib
|
||||
;;
|
||||
*)
|
||||
# Redirect the gnulib submodule to the directory on the command line
|
||||
# if possible.
|
||||
if test -d "$GNULIB_SRCDIR"/.git && \
|
||||
git_modules_config submodule.gnulib.url >/dev/null; then
|
||||
git submodule init
|
||||
GNULIB_SRCDIR=`cd $GNULIB_SRCDIR && pwd`
|
||||
git_modules_config --replace-all submodule.gnulib.url $GNULIB_SRCDIR
|
||||
echo "$0: getting gnulib files..."
|
||||
git submodule update || exit $?
|
||||
GNULIB_SRCDIR=gnulib
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
|
||||
@@ -342,13 +482,20 @@ update_po_files() {
|
||||
&& ls "$ref_po_dir"/*.po 2>/dev/null |
|
||||
sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS"
|
||||
|
||||
for po in `cd $ref_po_dir && echo *.po|sed 's/\.po//g'`; do
|
||||
new_po="$ref_po_dir/$po.po"
|
||||
cksum_file="$ref_po_dir/$po.s1"
|
||||
if ! "$SHA1SUM" -c --status "$cksum_file" < "$new_po" > /dev/null; then
|
||||
echo "updated $po_dir/$po.po..."
|
||||
cp "$new_po" "$po_dir/$po.po" && "$SHA1SUM" < "$new_po" > "$cksum_file"
|
||||
fi
|
||||
langs=`cd $ref_po_dir && echo *.po|sed 's/\.po//g'`
|
||||
test "$langs" = '*' && langs=x
|
||||
for po in $langs; do
|
||||
case $po in x) continue;; esac
|
||||
new_po="$ref_po_dir/$po.po"
|
||||
cksum_file="$ref_po_dir/$po.s1"
|
||||
if ! test -f "$cksum_file" ||
|
||||
! test -f "$po_dir/$po.po" ||
|
||||
! $SHA1SUM -c --status "$cksum_file" \
|
||||
< "$new_po" > /dev/null; then
|
||||
echo "updated $po_dir/$po.po..."
|
||||
cp "$new_po" "$po_dir/$po.po" \
|
||||
&& $SHA1SUM < "$new_po" > "$cksum_file"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
@@ -395,37 +542,37 @@ symlink_to_dir()
|
||||
|
||||
if $copy; then
|
||||
{
|
||||
test ! -h "$dst" || {
|
||||
echo "$0: rm -f $dst" &&
|
||||
rm -f "$dst"
|
||||
}
|
||||
test ! -h "$dst" || {
|
||||
echo "$0: rm -f $dst" &&
|
||||
rm -f "$dst"
|
||||
}
|
||||
} &&
|
||||
test -f "$dst" &&
|
||||
cmp -s "$src" "$dst" || {
|
||||
echo "$0: cp -fp $src $dst" &&
|
||||
cp -fp "$src" "$dst"
|
||||
echo "$0: cp -fp $src $dst" &&
|
||||
cp -fp "$src" "$dst"
|
||||
}
|
||||
else
|
||||
test -h "$dst" &&
|
||||
src_ls=`ls -diL "$src" 2>/dev/null` && set $src_ls && src_i=$1 &&
|
||||
dst_ls=`ls -diL "$dst" 2>/dev/null` && set $dst_ls && dst_i=$1 &&
|
||||
test "$src_i" = "$dst_i" || {
|
||||
dot_dots=
|
||||
case $src in
|
||||
/*) ;;
|
||||
*)
|
||||
case /$dst/ in
|
||||
*//* | */../* | */./* | /*/*/*/*/*/)
|
||||
echo >&2 "$0: invalid symlink calculation: $src -> $dst"
|
||||
exit 1;;
|
||||
/*/*/*/*/) dot_dots=../../../;;
|
||||
/*/*/*/) dot_dots=../../;;
|
||||
/*/*/) dot_dots=../;;
|
||||
esac;;
|
||||
esac
|
||||
dot_dots=
|
||||
case $src in
|
||||
/*) ;;
|
||||
*)
|
||||
case /$dst/ in
|
||||
*//* | */../* | */./* | /*/*/*/*/*/)
|
||||
echo >&2 "$0: invalid symlink calculation: $src -> $dst"
|
||||
exit 1;;
|
||||
/*/*/*/*/) dot_dots=../../../;;
|
||||
/*/*/*/) dot_dots=../../;;
|
||||
/*/*/) dot_dots=../;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
echo "$0: ln -fs $dot_dots$src $dst" &&
|
||||
ln -fs "$dot_dots$src" "$dst"
|
||||
echo "$0: ln -fs $dot_dots$src $dst" &&
|
||||
ln -fs "$dot_dots$src" "$dst"
|
||||
}
|
||||
fi
|
||||
}
|
||||
@@ -450,9 +597,13 @@ cp_mark_as_generated()
|
||||
|
||||
if test -z "$c1"; then
|
||||
cmp -s "$cp_src" "$cp_dst" || {
|
||||
echo "$0: cp -f $cp_src $cp_dst" &&
|
||||
rm -f "$cp_dst" &&
|
||||
sed "s!$bt_regex/!!g" "$cp_src" > "$cp_dst"
|
||||
# Copy the file first to get proper permissions if it
|
||||
# doesn't already exist. Then overwrite the copy.
|
||||
echo "$0: cp -f $cp_src $cp_dst" &&
|
||||
rm -f "$cp_dst" &&
|
||||
cp "$cp_src" "$cp_dst-t" &&
|
||||
sed "s!$bt_regex/!!g" "$cp_src" > "$cp_dst-t" &&
|
||||
mv -f "$cp_dst-t" "$cp_dst"
|
||||
}
|
||||
else
|
||||
check_dst_dir "$cp_dst"
|
||||
@@ -460,15 +611,15 @@ cp_mark_as_generated()
|
||||
# doesn't already exist. Then overwrite the copy.
|
||||
cp "$cp_src" "$cp_dst-t" &&
|
||||
(
|
||||
echo "$c1-*- buffer-read-only: t -*- vi: set ro:$c2" &&
|
||||
echo "${c1}DO NOT EDIT! GENERATED AUTOMATICALLY!$c2" &&
|
||||
sed "s!$bt_regex/!!g" "$cp_src"
|
||||
echo "$c1-*- buffer-read-only: t -*- vi: set ro:$c2" &&
|
||||
echo "${c1}DO NOT EDIT! GENERATED AUTOMATICALLY!$c2" &&
|
||||
sed "s!$bt_regex/!!g" "$cp_src"
|
||||
) > $cp_dst-t &&
|
||||
if cmp -s "$cp_dst-t" "$cp_dst"; then
|
||||
rm -f "$cp_dst-t"
|
||||
rm -f "$cp_dst-t"
|
||||
else
|
||||
echo "$0: cp $cp_src $cp_dst # with edits" &&
|
||||
mv -f "$cp_dst-t" "$cp_dst"
|
||||
echo "$0: cp $cp_src $cp_dst # with edits" &&
|
||||
mv -f "$cp_dst-t" "$cp_dst"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -480,9 +631,11 @@ version_controlled_file() {
|
||||
found=no
|
||||
if test -d CVS; then
|
||||
grep -F "/$file/" $dir/CVS/Entries 2>/dev/null |
|
||||
grep '^/[^/]*/[0-9]' > /dev/null && found=yes
|
||||
grep '^/[^/]*/[0-9]' > /dev/null && found=yes
|
||||
elif test -d .git; then
|
||||
git-rm -n "$dir/$file" > /dev/null 2>&1 && found=yes
|
||||
git rm -n "$dir/$file" > /dev/null 2>&1 && found=yes
|
||||
elif test -d .svn; then
|
||||
svn log -r HEAD "$dir/$file" > /dev/null 2>&1 && found=yes
|
||||
else
|
||||
echo "$0: no version control for $dir/$file?" >&2
|
||||
fi
|
||||
@@ -500,35 +653,35 @@ slurp() {
|
||||
esac
|
||||
test -d $1/$dir/$file && continue
|
||||
for excluded_file in $excluded_files; do
|
||||
test "$dir/$file" = "$excluded_file" && continue 2
|
||||
test "$dir/$file" = "$excluded_file" && continue 2
|
||||
done
|
||||
if test $file = Makefile.am; then
|
||||
copied=$copied${sep}$gnulib_mk; sep=$nl
|
||||
remove_intl='/^[^#].*\/intl/s/^/#/;'"s!$bt_regex/!!g"
|
||||
sed "$remove_intl" $1/$dir/$file | cmp -s - $dir/$gnulib_mk || {
|
||||
echo "$0: Copying $1/$dir/$file to $dir/$gnulib_mk ..." &&
|
||||
rm -f $dir/$gnulib_mk &&
|
||||
sed "$remove_intl" $1/$dir/$file >$dir/$gnulib_mk
|
||||
}
|
||||
copied=$copied${sep}$gnulib_mk; sep=$nl
|
||||
remove_intl='/^[^#].*\/intl/s/^/#/;'"s!$bt_regex/!!g"
|
||||
sed "$remove_intl" $1/$dir/$file | cmp - $dir/$gnulib_mk > /dev/null || {
|
||||
echo "$0: Copying $1/$dir/$file to $dir/$gnulib_mk ..." &&
|
||||
rm -f $dir/$gnulib_mk &&
|
||||
sed "$remove_intl" $1/$dir/$file >$dir/$gnulib_mk
|
||||
}
|
||||
elif { test "${2+set}" = set && test -r $2/$dir/$file; } ||
|
||||
version_controlled_file $dir $file; then
|
||||
echo "$0: $dir/$file overrides $1/$dir/$file"
|
||||
version_controlled_file $dir $file; then
|
||||
echo "$0: $dir/$file overrides $1/$dir/$file"
|
||||
else
|
||||
copied=$copied$sep$file; sep=$nl
|
||||
if test $file = gettext.m4; then
|
||||
echo "$0: patching m4/gettext.m4 to remove need for intl/* ..."
|
||||
rm -f $dir/$file
|
||||
sed '
|
||||
/^AC_DEFUN(\[AM_INTL_SUBDIR],/,/^]/c\
|
||||
AC_DEFUN([AM_INTL_SUBDIR], [
|
||||
/^AC_DEFUN(\[gt_INTL_SUBDIR_CORE],/,/^]/c\
|
||||
AC_DEFUN([gt_INTL_SUBDIR_CORE], [])
|
||||
$a\
|
||||
AC_DEFUN([gl_LOCK_EARLY], [])
|
||||
' $1/$dir/$file >$dir/$file
|
||||
else
|
||||
cp_mark_as_generated $1/$dir/$file $dir/$file
|
||||
fi
|
||||
copied=$copied$sep$file; sep=$nl
|
||||
if test $file = gettext.m4; then
|
||||
echo "$0: patching m4/gettext.m4 to remove need for intl/* ..."
|
||||
rm -f $dir/$file
|
||||
sed '
|
||||
/^AC_DEFUN(\[AM_INTL_SUBDIR],/,/^]/c\
|
||||
AC_DEFUN([AM_INTL_SUBDIR], [
|
||||
/^AC_DEFUN(\[gt_INTL_SUBDIR_CORE],/,/^]/c\
|
||||
AC_DEFUN([gt_INTL_SUBDIR_CORE], [])
|
||||
$a\
|
||||
AC_DEFUN([gl_LOCK_EARLY], [])
|
||||
' $1/$dir/$file >$dir/$file
|
||||
else
|
||||
cp_mark_as_generated $1/$dir/$file $dir/$file
|
||||
fi
|
||||
fi || exit
|
||||
done
|
||||
|
||||
@@ -536,18 +689,18 @@ slurp() {
|
||||
test $dot_ig = x && continue
|
||||
ig=$dir/$dot_ig
|
||||
if test -n "$copied"; then
|
||||
insert_vc_ignore $ig "$copied"
|
||||
# If an ignored file name ends with _.h, then also add
|
||||
# the name with just ".h". Many gnulib headers are generated,
|
||||
# e.g., stdint_.h -> stdint.h, dirent_.h ->..., etc.
|
||||
# Likewise for .gperf -> .h, .y -> .c, and .sin -> .sed
|
||||
f=`echo "$copied"|sed 's/_\.h$/.h/;s/\.sin$/.sed/;s/\.y$/.c/;s/\.gperf$/.h/'`
|
||||
insert_vc_ignore $ig "$f"
|
||||
insert_vc_ignore $ig "$copied"
|
||||
# If an ignored file name ends with .in.h, then also add
|
||||
# the name with just ".h". Many gnulib headers are generated,
|
||||
# e.g., stdint.in.h -> stdint.h, dirent.in.h ->..., etc.
|
||||
# Likewise for .gperf -> .h, .y -> .c, and .sin -> .sed
|
||||
f=`echo "$copied"|sed 's/\.in\.h$/.h/;s/\.sin$/.sed/;s/\.y$/.c/;s/\.gperf$/.h/'`
|
||||
insert_vc_ignore $ig "$f"
|
||||
|
||||
# For files like sys_stat_.h and sys_time_.h, record as
|
||||
# ignorable the directory we might eventually create: sys/.
|
||||
f=`echo "$copied"|sed 's/sys_.*_\.h$/sys/'`
|
||||
insert_vc_ignore $ig "$f"
|
||||
# For files like sys_stat.in.h and sys_time.in.h, record as
|
||||
# ignorable the directory we might eventually create: sys/.
|
||||
f=`echo "$copied"|sed 's/sys_.*\.in\.h$/sys/'`
|
||||
insert_vc_ignore $ig "$f"
|
||||
fi
|
||||
done
|
||||
done
|
||||
@@ -564,13 +717,13 @@ gnulib_tool_options="\
|
||||
--import\
|
||||
--no-changelog\
|
||||
--aux-dir $bt/$build_aux\
|
||||
--doc-base $bt/doc\
|
||||
--doc-base $bt/$doc_base\
|
||||
--lib $gnulib_name\
|
||||
--m4-base $bt/m4/\
|
||||
--source-base $bt/lib/\
|
||||
--tests-base $bt/tests\
|
||||
--m4-base $bt/$m4_base/\
|
||||
--source-base $bt/$source_base/\
|
||||
--tests-base $bt/$tests_base\
|
||||
--local-dir $local_gl_dir\
|
||||
$gnulib_tool_option_extras\
|
||||
$gnulib_tool_option_extras\
|
||||
"
|
||||
echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
|
||||
$gnulib_tool $gnulib_tool_options --import $gnulib_modules &&
|
||||
@@ -587,46 +740,50 @@ grep '^[ ]*AM_GNU_GETTEXT_VERSION(' configure.ac >/dev/null || \
|
||||
with_gettext=no
|
||||
|
||||
if test $with_gettext = yes; then
|
||||
echo "$0: (cd $bt2; autopoint) ..."
|
||||
echo "$0: (cd $bt2; ${AUTOPOINT-autopoint}) ..."
|
||||
cp configure.ac $bt2 &&
|
||||
(cd $bt2 && autopoint && rm configure.ac) &&
|
||||
(cd $bt2 && ${AUTOPOINT-autopoint} && rm configure.ac) &&
|
||||
slurp $bt2 $bt || exit
|
||||
|
||||
rm -fr $bt $bt2 || exit
|
||||
fi
|
||||
rm -fr $bt $bt2 || exit
|
||||
|
||||
# Coreutils is unusual in that it generates some of its test-related
|
||||
# Makefile.am files. That must be done before invoking automake.
|
||||
mam_template=tests/Makefile.am.in
|
||||
if test -f $mam_template; then
|
||||
PERL=perl
|
||||
for tool in cut head join pr sort tac tail test tr uniq wc; do
|
||||
m=tests/$tool/Makefile.am
|
||||
t=${m}t
|
||||
rm -f $m $t
|
||||
sed -n '1,/^##test-files-begin/p' $mam_template > $t
|
||||
echo "x = $tool" >> $t
|
||||
srcdir=tests/$tool
|
||||
$PERL -I$srcdir -w -- tests/mk-script $srcdir --list >> $t
|
||||
sed -n '/^##test-files-end/,$p' $mam_template >> $t
|
||||
chmod -w $t
|
||||
mv $t $m
|
||||
done
|
||||
fi
|
||||
# Remove any dangling symlink matching "*.m4" or "*.[ch]" in some
|
||||
# gnulib-populated directories. Such .m4 files would cause aclocal to fail.
|
||||
# The following requires GNU find 4.2.3 or newer. Considering the usual
|
||||
# portability constraints of this script, that may seem a very demanding
|
||||
# requirement, but it should be ok. Ignore any failure, which is fine,
|
||||
# since this is only a convenience to help developers avoid the relatively
|
||||
# unusual case in which a symlinked-to .m4 file is git-removed from gnulib
|
||||
# between successive runs of this script.
|
||||
find "$m4_base" "$source_base" \
|
||||
-depth \( -name '*.m4' -o -name '*.[ch]' \) \
|
||||
-type l -xtype l -delete > /dev/null 2>&1
|
||||
|
||||
# Reconfigure, getting other files.
|
||||
|
||||
# Skip autoheader if it's not needed.
|
||||
grep -E '^[ ]*AC_CONFIG_HEADERS?\>' configure.ac >/dev/null ||
|
||||
AUTOHEADER=true
|
||||
|
||||
for command in \
|
||||
libtool \
|
||||
'aclocal --force -I m4' \
|
||||
'autoconf --force' \
|
||||
'autoheader --force' \
|
||||
'automake --add-missing --copy --force-missing';
|
||||
"${ACLOCAL-aclocal} --force -I m4" \
|
||||
"${AUTOCONF-autoconf} --force" \
|
||||
"${AUTOHEADER-autoheader} --force" \
|
||||
"${AUTOMAKE-automake} --add-missing --copy --force-missing"
|
||||
do
|
||||
if test "$command" = libtool; then
|
||||
grep '^[ ]*AM_PROG_LIBTOOL\>' configure.ac >/dev/null ||
|
||||
continue
|
||||
command='libtoolize -c -f'
|
||||
use_libtool=0
|
||||
# We'd like to use grep -E, to see if any of LT_INIT,
|
||||
# AC_PROG_LIBTOOL, AM_PROG_LIBTOOL is used in configure.ac,
|
||||
# but that's not portable enough (e.g., for Solaris).
|
||||
grep '^[ ]*A[CM]_PROG_LIBTOOL' configure.ac >/dev/null \
|
||||
&& use_libtool=1
|
||||
grep '^[ ]*LT_INIT' configure.ac >/dev/null \
|
||||
&& use_libtool=1
|
||||
test $use_libtool = 0 \
|
||||
&& continue
|
||||
command="${LIBTOOLIZE-libtoolize} -c -f"
|
||||
fi
|
||||
echo "$0: $command ..."
|
||||
$command || exit
|
||||
@@ -649,11 +806,11 @@ if test $with_gettext = yes; then
|
||||
rm -f po/Makevars
|
||||
sed '
|
||||
/^EXTRA_LOCALE_CATEGORIES *=/s/=.*/= '"$EXTRA_LOCALE_CATEGORIES"'/
|
||||
/^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'"$package"'@gnu.org/
|
||||
/^MSGID_BUGS_ADDRESS *=/s/=.*/= '"$MSGID_BUGS_ADDRESS"'/
|
||||
/^XGETTEXT_OPTIONS *=/{
|
||||
s/$/ \\/
|
||||
a\
|
||||
'"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+}
|
||||
'"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+}
|
||||
}
|
||||
' po/Makevars.template >po/Makevars
|
||||
|
||||
@@ -665,9 +822,9 @@ if test $with_gettext = yes; then
|
||||
/^subdir *=.*/s/=.*/= runtime-po/
|
||||
/^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'"$package"'@gnu.org/
|
||||
/^XGETTEXT_OPTIONS *=/{
|
||||
s/$/ \\/
|
||||
a\
|
||||
'"$XGETTEXT_OPTIONS_RUNTIME"' $${end_of_xgettext_options+}
|
||||
s/$/ \\/
|
||||
a\
|
||||
'"$XGETTEXT_OPTIONS_RUNTIME"' $${end_of_xgettext_options+}
|
||||
}
|
||||
' <po/Makevars.template >runtime-po/Makevars
|
||||
|
||||
@@ -676,4 +833,10 @@ if test $with_gettext = yes; then
|
||||
fi
|
||||
fi
|
||||
|
||||
bootstrap_epilogue
|
||||
|
||||
echo "$0: done. Now you can run './configure'."
|
||||
|
||||
# Local Variables:
|
||||
# indent-tabs-mode: nil
|
||||
# End:
|
||||
|
||||
+15
-7
@@ -1,6 +1,6 @@
|
||||
# Bootstrap configuration.
|
||||
|
||||
# Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -17,12 +17,13 @@
|
||||
|
||||
# gnulib modules used by this package.
|
||||
gnulib_modules='
|
||||
announce-gen argmatch config-h c-strcase configmake dirname error
|
||||
extensions fopen-safer gendocs getopt gettext git-version-gen
|
||||
gnumakefile hash inttypes javacomp-script javaexec-script malloc
|
||||
mbswidth obstack quote quotearg stdbool stpcpy strerror strtoul
|
||||
strverscmp unistd unistd-safer unlocked-io unsetenv verify warnings
|
||||
xalloc xalloc-die xstrndup
|
||||
announce-gen argmatch assert config-h c-strcase configmake dirname
|
||||
error extensions fopen-safer gendocs getopt-gnu gettext
|
||||
git-version-gen hash inttypes javacomp-script javaexec-script
|
||||
maintainer-makefile malloc mbswidth obstack pipe quote quotearg
|
||||
stdbool stpcpy strerror strtoul strverscmp unistd unistd-safer
|
||||
unlocked-io update-copyright unsetenv verify warnings xalloc
|
||||
xalloc-die xstrndup
|
||||
'
|
||||
|
||||
# Additional xgettext options to use. Use "\\\newline" to break lines.
|
||||
@@ -64,3 +65,10 @@ excluded_files='
|
||||
# In directories like lib/, m4/, and po/, generate both these files because we
|
||||
# still try to support CVS emulation.
|
||||
vc_ignore='.cvsignore .gitignore'
|
||||
|
||||
bootstrap_epilogue()
|
||||
{
|
||||
# Make sure we don't need src/bison, which usually doesn't exist at
|
||||
# the time of a bootstrap.
|
||||
touch src/parse-gram.[ch]
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
announce-gen
|
||||
arg-nonnull.h
|
||||
c++defs.h
|
||||
compile
|
||||
config.guess
|
||||
config.rpath
|
||||
@@ -15,4 +17,8 @@ link-warning.h
|
||||
mdate-sh
|
||||
missing
|
||||
texinfo.tex
|
||||
update-copyright
|
||||
useless-if-before-free
|
||||
vc-list-files
|
||||
warn-on-use.h
|
||||
ylwrap
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
/Makefile
|
||||
/Makefile.in
|
||||
/announce-gen
|
||||
/arg-nonnull.h
|
||||
/c++defs.h
|
||||
/compile
|
||||
/config.guess
|
||||
/config.rpath
|
||||
@@ -15,4 +17,8 @@
|
||||
/mdate-sh
|
||||
/missing
|
||||
/texinfo.tex
|
||||
/update-copyright
|
||||
/useless-if-before-free
|
||||
/vc-list-files
|
||||
/warn-on-use.h
|
||||
/ylwrap
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||
EXTRA_DIST = prev-version.txt cross-options.pl
|
||||
EXTRA_DIST = prev-version.txt cross-options.pl update-b4-copyright
|
||||
|
||||
Executable
+143
@@ -0,0 +1,143 @@
|
||||
#!/usr/bin/perl -0777 -pi
|
||||
|
||||
# Update b4_copyright invocations or b4_copyright_years definitions to
|
||||
# include the current year.
|
||||
|
||||
# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
# This program 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 3, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my $margin = 72;
|
||||
|
||||
my $this_year = $ENV{UPDATE_COPYRIGHT_YEAR};
|
||||
if (!$this_year || $this_year !~ m/^\d{4}$/)
|
||||
{
|
||||
my ($sec, $min, $hour, $mday, $month, $year) = localtime (time ());
|
||||
$this_year = $year + 1900;
|
||||
}
|
||||
my $old_re = <<'EOF'
|
||||
(
|
||||
(?:^|\n)
|
||||
#BEFORE
|
||||
(?:
|
||||
b4_copyright\(\[[^][]*]
|
||||
| m4_(?:push|pop)def\(\[b4_copyright_years]
|
||||
)
|
||||
#AFTER
|
||||
)
|
||||
(?:
|
||||
,\s*
|
||||
(
|
||||
\[\s* (?:\d{4}(?:,\s*|-))* (\d{4}) \s*]
|
||||
)
|
||||
)?
|
||||
\)
|
||||
EOF
|
||||
;
|
||||
|
||||
while (/($old_re)/gx)
|
||||
{
|
||||
my $start = pos() - length ($1);
|
||||
my $b4_copyright_line = $2;
|
||||
my $year_lines = $3;
|
||||
my $final_year = $4;
|
||||
$year_lines .= ')';
|
||||
|
||||
# If there was a second argument, it contains years, so update them.
|
||||
if ($final_year)
|
||||
{
|
||||
$b4_copyright_line .= ',';
|
||||
if ($final_year != $this_year)
|
||||
{
|
||||
# Update the year.
|
||||
$year_lines =~ s/$final_year/$final_year, $this_year/;
|
||||
}
|
||||
|
||||
# Normalize all whitespace.
|
||||
$year_lines =~ s/\s+/ /g;
|
||||
|
||||
# Put spaces after commas.
|
||||
$year_lines =~ s/, ?/, /g;
|
||||
|
||||
# Do not compress to intervals; for example, do not replace
|
||||
# "2008, 2009, 2010" with "2008-2010". See the Copyright
|
||||
# Notices section in Information for Maintainers of GNU Software, at:
|
||||
# http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices
|
||||
|
||||
# Format within margin.
|
||||
my $year_lines_new;
|
||||
my $indent = index ($b4_copyright_line, '[');
|
||||
--$indent if ($b4_copyright_line =~ m/^\n/);
|
||||
while (length $year_lines)
|
||||
{
|
||||
my $text_margin = $margin - $indent;
|
||||
if (($year_lines =~ s/^(.{1,$text_margin})(?: |$)//)
|
||||
|| ($year_lines =~ s/^([\S]+)(?: |$)//))
|
||||
{
|
||||
my $line = "\n" . (' 'x$indent) . $1;
|
||||
++$indent if (!$year_lines_new);
|
||||
$year_lines_new .= $line;
|
||||
}
|
||||
else
|
||||
{
|
||||
# Should be unreachable, but we don't want an infinite
|
||||
# loop if it can be reached.
|
||||
die;
|
||||
}
|
||||
}
|
||||
|
||||
# Replace the old invocation. Should never die.
|
||||
die if (!s/$old_re\G/$b4_copyright_line$year_lines_new/x);
|
||||
|
||||
# Prepare for the next search.
|
||||
pos () = $start + length ("$b4_copyright_line$year_lines_new");
|
||||
}
|
||||
}
|
||||
|
||||
while (/(\bb4_copyright\()/g)
|
||||
{
|
||||
my $start = pos () - length ($1);
|
||||
my $end = pos ();
|
||||
my $re = $old_re;
|
||||
pos () = $start;
|
||||
$re =~ s/\#BEFORE/\\G/;
|
||||
if (!/$re/x)
|
||||
{
|
||||
my $line = (substr ($_, 0, $start) =~ s/\n/\n/g) + 1;
|
||||
print STDERR
|
||||
"$ARGV:$line: warning: failed to update a b4_copyright\n";
|
||||
}
|
||||
pos () = $end;
|
||||
}
|
||||
|
||||
while (/(\[b4_copyright_years])/g)
|
||||
{
|
||||
my $start = pos () - length ($1);
|
||||
my $end = pos ();
|
||||
my $re = $old_re;
|
||||
$re =~ s/\#AFTER/\\G/;
|
||||
if (!/$re/x)
|
||||
{
|
||||
# The substr operation blows away pos (), so restoring pos ()
|
||||
# at the end is necessary.
|
||||
my $line = (substr ($_, 0, $start) =~ s/\n/\n/g) + 1;
|
||||
print STDERR
|
||||
"$ARGV:$line: warning: failed to update a"
|
||||
. " b4_copyright_years\n";
|
||||
}
|
||||
pos () = $end;
|
||||
}
|
||||
Executable
+49
@@ -0,0 +1,49 @@
|
||||
#!/usr/bin/perl -0777 -pi
|
||||
|
||||
# In configure.ac, update PACKAGE_COPYRIGHT_YEAR to the current year.
|
||||
|
||||
# Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program 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 3, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my $this_year = $ENV{UPDATE_COPYRIGHT_YEAR};
|
||||
if (!$this_year || $this_year !~ m/^\d{4}$/)
|
||||
{
|
||||
my ($sec, $min, $hour, $mday, $month, $year) = localtime (time ());
|
||||
$this_year = $year + 1900;
|
||||
}
|
||||
my $old_re = <<'EOF'
|
||||
(
|
||||
MACRO\(
|
||||
\[PACKAGE_COPYRIGHT_YEAR],
|
||||
\s*\[
|
||||
)
|
||||
(\d{4})
|
||||
(?=])
|
||||
EOF
|
||||
;
|
||||
foreach my $macro ("AC_DEFINE", "AC_SUBST")
|
||||
{
|
||||
my $this_old_re = $old_re;
|
||||
$this_old_re =~ s/MACRO/$macro/;
|
||||
if (!s/$this_old_re/$1$this_year/x)
|
||||
{
|
||||
print STDERR
|
||||
"$ARGV: warning: failed to update PACKAGE_COPYRIGHT_YEAR in"
|
||||
. " $macro.\n";
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
# Customize maint.mk -*- makefile -*-
|
||||
# Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
|
||||
# Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -39,4 +40,14 @@ local-checks-to-skip = changelog-check
|
||||
|
||||
# The local directory containing the checked-out copy of gnulib used in
|
||||
# this release. Used solely to get a date for the "announcement" target.
|
||||
gnulib_dir = $(srcdir)/../../gnulib
|
||||
gnulib_dir = $(srcdir)/gnulib
|
||||
|
||||
bootstrap-tools = autoconf,automake,flex,gnulib
|
||||
|
||||
announcement_Cc_ = \
|
||||
[email protected], [email protected], [email protected], \
|
||||
[email protected]
|
||||
|
||||
update-copyright: update-b4-copyright update-package-copyright-year
|
||||
update-copyright-env = \
|
||||
UPDATE_COPYRIGHT_FORCE=1
|
||||
|
||||
+28
-12
@@ -1,7 +1,7 @@
|
||||
# Configure template for GNU Bison. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
# Free Software Foundation, Inc.
|
||||
# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
||||
# 2010 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -16,25 +16,32 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# We have strange test case titles, so we need Autoconf 2.61 or better.
|
||||
AC_PREREQ(2.61)
|
||||
# In order for some versions of Sun Studio to compile our C++ test cases
|
||||
# correctly, we need Autoconf 2.64 or better to handle the restrict
|
||||
# keyword in at least string.h from gnulib.
|
||||
AC_PREREQ(2.64)
|
||||
|
||||
AC_INIT([GNU Bison],
|
||||
m4_esyscmd([build-aux/git-version-gen .tarball-version]),
|
||||
[[email protected]])
|
||||
AC_DEFINE([PACKAGE_COPYRIGHT_YEAR], [2008],
|
||||
AC_DEFINE([PACKAGE_COPYRIGHT_YEAR], [2010],
|
||||
[The copyright year for this package])
|
||||
AC_SUBST([PACKAGE_COPYRIGHT_YEAR], [2008])
|
||||
AC_SUBST([PACKAGE_COPYRIGHT_YEAR], [2010])
|
||||
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
# We don't have a file m4/Makefile.am, so we need Automake 1.8 or later.
|
||||
# Automake 1.10.3 and 1.11.1 fix a security flaw discussed here:
|
||||
#
|
||||
# http://thread.gmane.org/gmane.comp.sysutils.autotools.announce/131
|
||||
#
|
||||
# To avoid 1.11, we make 1.11.1 the minimum version.
|
||||
#
|
||||
# We want gnits strictness only when rolling a formal release so that we can,
|
||||
# for example, run make dist at other times without being required to add a
|
||||
# bogus NEWS entry.
|
||||
AM_INIT_AUTOMAKE([1.8 dist-bzip2]
|
||||
m4_bmatch(m4_defn([AC_PACKAGE_VERSION]), [-], [gnu], [gnits]))
|
||||
AM_INIT_AUTOMAKE([1.11.1 dist-bzip2]
|
||||
m4_bmatch(m4_defn([AC_PACKAGE_VERSION]), [_], [gnu], [gnits]))
|
||||
AC_CONFIG_HEADERS([lib/config.h:lib/config.hin])
|
||||
|
||||
# Checks for the compiler.
|
||||
@@ -68,6 +75,12 @@ if test "${enableval}" = yes; then
|
||||
gl_WARN_ADD([-Wshadow])
|
||||
gl_WARN_ADD([-Wstrict-prototypes])
|
||||
AC_SUBST([WARN_CFLAGS])
|
||||
# Warnings for the test suite only.
|
||||
gl_WARN_ADD([-Wundef], [WARN_CFLAGS_TEST])
|
||||
WARN_CXXFLAGS_TEST="$WARN_CXXFLAGS $WARN_CFLAGS_TEST"
|
||||
WARN_CFLAGS_TEST="$WARN_CFLAGS $WARN_CFLAGS_TEST"
|
||||
AC_SUBST([WARN_CXXFLAGS_TEST])
|
||||
AC_SUBST([WARN_CFLAGS_TEST])
|
||||
AC_DEFINE([lint], 1, [Define to 1 if the compiler is checking for lint.])
|
||||
fi
|
||||
|
||||
@@ -94,6 +107,8 @@ AC_PROG_YACC
|
||||
AC_PROG_RANLIB
|
||||
AC_PROG_GNU_M4
|
||||
AC_DEFINE_UNQUOTED([M4], ["$M4"], [Define to the GNU M4 executable name.])
|
||||
AC_DEFINE_UNQUOTED([M4_GNU_OPTION], ["$M4_GNU"], [Define to "-g" if GNU M4
|
||||
supports -g, otherwise to "".])
|
||||
AM_MISSING_PROG([HELP2MAN], [help2man])
|
||||
AC_PATH_PROG([XSLTPROC], [xsltproc])
|
||||
AC_SUBST([XSLTPROC])
|
||||
@@ -115,9 +130,10 @@ BISON_PREREQ_SUBPIPE
|
||||
BISON_PREREQ_TIMEVAR
|
||||
|
||||
# Gettext.
|
||||
# We've never tested with gettext versions before 0.15, so play it safe.
|
||||
AM_GNU_GETTEXT([external], [need-formatstring-macros])
|
||||
AM_GNU_GETTEXT_VERSION([0.15])
|
||||
# We use gnulib, which is only guaranteed to work properly with the
|
||||
# latest Gettext.
|
||||
AM_GNU_GETTEXT([external], [need-ngettext])
|
||||
AM_GNU_GETTEXT_VERSION([0.18])
|
||||
BISON_I18N
|
||||
|
||||
# Internationalized parsers.
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
## Copyright (C) 2002, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2002, 2005, 2006, 2007, 2008, 2009, 2010 Free
|
||||
## Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ into various formats.
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2002, 2008 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bison.
|
||||
|
||||
|
||||
+3
-2
@@ -1,8 +1,9 @@
|
||||
-*- Autoconf -*-
|
||||
|
||||
# Language-independent M4 Macros for Bison.
|
||||
# Copyright (C) 2002, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
|
||||
# Foundation, Inc.
|
||||
|
||||
# Copyright (C) 2002, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
|
||||
# Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
-*- Autoconf -*-
|
||||
|
||||
# C++ skeleton dispatching for Bison.
|
||||
# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
# Copyright (C) 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
+3
-3
@@ -2,8 +2,8 @@
|
||||
|
||||
# C++ skeleton for Bison
|
||||
|
||||
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation,
|
||||
# Inc.
|
||||
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
|
||||
# Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -74,7 +74,7 @@ m4_define([b4_namespace_open],
|
||||
|
||||
m4_define([b4_namespace_close],
|
||||
[b4_user_code([b4_percent_define_get_syncline([[namespace]])
|
||||
m4_bpatsubst(m4_dquote(m4_bpatsubst(m4_dquote(b4_namespace_ref),
|
||||
m4_bpatsubst(m4_dquote(m4_bpatsubst(m4_dquote(b4_namespace_ref[ ]),
|
||||
[^\(.\)[ ]*\(::\)?\([^][:]\|:[^][:]\)*],
|
||||
[\1])),
|
||||
[::\([^][:]\|:[^][:]\)*], [} ])[} // ]b4_namespace_ref])])
|
||||
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
-*- Autoconf -*-
|
||||
|
||||
# C skeleton dispatching for Bison.
|
||||
# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
# Copyright (C) 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
-*- Autoconf -*-
|
||||
|
||||
# C M4 Macros for Bison.
|
||||
# Copyright (C) 2002, 2004, 2005, 2006, 2007, 2008 Free Software
|
||||
# Foundation, Inc.
|
||||
|
||||
# Copyright (C) 2002, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
|
||||
# Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
+9
-7
@@ -1,8 +1,9 @@
|
||||
-*- C -*-
|
||||
|
||||
# GLR skeleton for Bison
|
||||
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software
|
||||
# Foundation, Inc.
|
||||
|
||||
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
||||
# 2010 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -150,7 +151,7 @@ m4_changecom()
|
||||
m4_divert_push(0)dnl
|
||||
@output(b4_parser_file_name@)@
|
||||
b4_copyright([Skeleton implementation for Bison GLR parsers in C],
|
||||
[2002, 2003, 2004, 2005, 2006])
|
||||
[2002, 2003, 2004, 2005, 2006, 2009, 2010])
|
||||
[
|
||||
/* C GLR parser skeleton written by Paul Hilfinger. */
|
||||
|
||||
@@ -248,7 +249,7 @@ b4_percent_code_get[]dnl
|
||||
#include <string.h>
|
||||
|
||||
#ifndef YY_
|
||||
# if YYENABLE_NLS
|
||||
# if defined YYENABLE_NLS && YYENABLE_NLS
|
||||
# if ENABLE_NLS
|
||||
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
|
||||
# define YY_(msgid) dgettext ("bison-runtime", msgid)
|
||||
@@ -310,7 +311,8 @@ b4_percent_code_get[]dnl
|
||||
#ifndef __attribute__
|
||||
/* This feature is available in gcc versions 2.5 and later. */
|
||||
# if (! defined __GNUC__ || __GNUC__ < 2 \
|
||||
|| (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__)
|
||||
|| (__GNUC__ == 2 && __GNUC_MINOR__ < 5) \
|
||||
|| (defined __STRICT_ANSI__ && __STRICT_ANSI__))
|
||||
# define __attribute__(Spec) /* empty */
|
||||
# endif
|
||||
#endif
|
||||
@@ -2323,7 +2325,7 @@ yyrecoverSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
|
||||
yychar = YYEMPTY;
|
||||
yylval = yyval_default;
|
||||
]b4_locations_if([
|
||||
#if YYLTYPE_IS_TRIVIAL
|
||||
#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
|
||||
yylloc.first_line = yylloc.last_line = ]b4_location_initial_line[;
|
||||
yylloc.first_column = yylloc.last_column = ]b4_location_initial_column[;
|
||||
#endif
|
||||
@@ -2639,7 +2641,7 @@ m4_if(b4_skeleton, ["glr.c"],
|
||||
[b4_defines_if(
|
||||
[@output(b4_spec_defines_file@)@
|
||||
b4_copyright([Skeleton interface for Bison GLR parsers in C],
|
||||
[2002, 2003, 2004, 2005, 2006])
|
||||
[2002, 2003, 2004, 2005, 2006, 2009, 2010])
|
||||
|
||||
b4_shared_declarations
|
||||
|
||||
|
||||
+4
-3
@@ -1,8 +1,9 @@
|
||||
-*- C -*-
|
||||
|
||||
# C++ GLR skeleton for Bison
|
||||
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation,
|
||||
# Inc.
|
||||
|
||||
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
||||
# 2010 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -219,7 +220,7 @@ m4_popdef([b4_parse_param])
|
||||
m4_divert_push(0)
|
||||
@output(b4_spec_defines_file@)@
|
||||
b4_copyright([Skeleton interface for Bison GLR parsers in C++],
|
||||
[2002, 2003, 2004, 2005, 2006])[
|
||||
[2002, 2003, 2004, 2005, 2006, 2009, 2010])[
|
||||
|
||||
/* C++ GLR parser skeleton written by Akim Demaille. */
|
||||
|
||||
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
-*- Autoconf -*-
|
||||
|
||||
# Java skeleton dispatching for Bison.
|
||||
# Copyright (C) 2007 Free Software Foundation, Inc.
|
||||
|
||||
# Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
# Java language support for Bison
|
||||
|
||||
# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
+12
-12
@@ -1,7 +1,7 @@
|
||||
# C++ skeleton for Bison
|
||||
|
||||
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
||||
# Free Software Foundation, Inc.
|
||||
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
||||
# 2010 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -35,7 +35,7 @@ m4_divert_push(0)dnl
|
||||
b4_defines_if(
|
||||
[@output(b4_spec_defines_file@)@
|
||||
b4_copyright([Skeleton interface for Bison LALR(1) parsers in C++],
|
||||
[2002, 2003, 2004, 2005, 2006, 2007, 2008])
|
||||
[2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010])
|
||||
dnl FIXME: This is wrong, we want computed header guards.
|
||||
[
|
||||
/* C++ LALR(1) parser skeleton written by Akim Demaille. */
|
||||
@@ -300,7 +300,7 @@ b4_percent_code_get([[provides]])[]dnl
|
||||
])dnl
|
||||
@output(b4_parser_file_name@)@
|
||||
b4_copyright([Skeleton implementation for Bison LALR(1) parsers in C++],
|
||||
[2002, 2003, 2004, 2005, 2006, 2007, 2008])
|
||||
[2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010])
|
||||
b4_percent_code_get([[top]])[]dnl
|
||||
m4_if(b4_prefix, [yy], [],
|
||||
[
|
||||
@@ -318,7 +318,7 @@ b4_defines_if([[
|
||||
b4_percent_code_get[]dnl
|
||||
|
||||
[#ifndef YY_
|
||||
# if YYENABLE_NLS
|
||||
# if defined YYENABLE_NLS && YYENABLE_NLS
|
||||
# if ENABLE_NLS
|
||||
# include <libintl.h> /* FIXME: INFRINGES ON USER NAME SPACE */
|
||||
# define YY_(msgid) dgettext ("bison-runtime", msgid)
|
||||
@@ -539,7 +539,7 @@ do { \
|
||||
/// Location of the lookahead.
|
||||
location_type yylloc;
|
||||
/// The locations where the error started and ended.
|
||||
location_type yyerror_range[2];
|
||||
location_type yyerror_range[3];
|
||||
|
||||
/// $$.
|
||||
semantic_type yyval;
|
||||
@@ -710,7 +710,7 @@ m4_ifdef([b4_lex_param], [, ]b4_lex_param))[;
|
||||
b4_error_verbose_if([, yytoken])[));
|
||||
}
|
||||
|
||||
yyerror_range[0] = yylloc;
|
||||
yyerror_range[1] = yylloc;
|
||||
if (yyerrstatus_ == 3)
|
||||
{
|
||||
/* If just tried and failed to reuse lookahead token after an
|
||||
@@ -745,7 +745,7 @@ b4_error_verbose_if([, yytoken])[));
|
||||
if (false)
|
||||
goto yyerrorlab;
|
||||
|
||||
yyerror_range[0] = yylocation_stack_[yylen - 1];
|
||||
yyerror_range[1] = yylocation_stack_[yylen - 1];
|
||||
/* Do not reclaim the symbols of the rule which action triggered
|
||||
this YYERROR. */
|
||||
yypop_ (yylen);
|
||||
@@ -777,7 +777,7 @@ b4_error_verbose_if([, yytoken])[));
|
||||
if (yystate_stack_.height () == 1)
|
||||
YYABORT;
|
||||
|
||||
yyerror_range[0] = yylocation_stack_[0];
|
||||
yyerror_range[1] = yylocation_stack_[0];
|
||||
yydestruct_ ("Error: popping",
|
||||
yystos_[yystate],
|
||||
&yysemantic_stack_[0], &yylocation_stack_[0]);
|
||||
@@ -786,10 +786,10 @@ b4_error_verbose_if([, yytoken])[));
|
||||
YY_STACK_PRINT ();
|
||||
}
|
||||
|
||||
yyerror_range[1] = yylloc;
|
||||
yyerror_range[2] = yylloc;
|
||||
// Using YYLLOC is tempting, but would change the location of
|
||||
// the lookahead. YYLOC is available though.
|
||||
YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
|
||||
YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
|
||||
yysemantic_stack_.push (yylval);
|
||||
yylocation_stack_.push (yyloc);
|
||||
|
||||
@@ -1057,7 +1057,7 @@ b4_error_verbose_if([, int tok])[)
|
||||
dnl
|
||||
@output(b4_dir_prefix[]stack.hh@)@
|
||||
b4_copyright([Stack handling for Bison parsers in C++],
|
||||
[2002, 2003, 2004, 2005, 2006, 2007, 2008])[
|
||||
[2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010])[
|
||||
|
||||
#ifndef BISON_STACK_HH
|
||||
# define BISON_STACK_HH
|
||||
|
||||
+4
-3
@@ -1,6 +1,6 @@
|
||||
# Java skeleton for Bison -*- autoconf -*-
|
||||
|
||||
# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -25,7 +25,7 @@ m4_ifval(m4_defn([b4_symbol_destructors]),
|
||||
m4_divert_push(0)dnl
|
||||
@output(b4_parser_file_name@)@
|
||||
b4_copyright([Skeleton implementation for Bison LALR(1) parsers in Java],
|
||||
[2007, 2008])
|
||||
[2007, 2008, 2009, 2010])
|
||||
|
||||
b4_percent_define_ifdef([package], [package b4_percent_define_get([package]);
|
||||
])[/* First part of user declarations. */
|
||||
@@ -310,7 +310,8 @@ b4_lexer_if([[
|
||||
|
||||
/**
|
||||
* Returned by a Bison action in order to print an error message and start
|
||||
* error recovery. */
|
||||
* error recovery. Formally deprecated in Bison 2.4.2's NEWS entry, where
|
||||
* a plan to phase it out is discussed. */
|
||||
public static final int YYFAIL = 3;
|
||||
|
||||
private static final int YYNEWSTATE = 4;
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
# C++ skeleton for Bison
|
||||
|
||||
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2009
|
||||
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010
|
||||
# Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
@@ -21,7 +21,7 @@ m4_changecom()
|
||||
m4_divert_push(0)dnl
|
||||
@output(b4_dir_prefix[]position.hh@)@
|
||||
b4_copyright([Positions for Bison parsers in C++],
|
||||
[2002, 2003, 2004, 2005, 2006, 2007, 2009])[
|
||||
[2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010])[
|
||||
|
||||
/**
|
||||
** \file position.hh
|
||||
@@ -146,7 +146,7 @@ b4_copyright([Positions for Bison parsers in C++],
|
||||
#endif // not BISON_POSITION_HH]
|
||||
@output(b4_dir_prefix[]location.hh@)@
|
||||
b4_copyright([Locations for Bison parsers in C++],
|
||||
[2002, 2003, 2004, 2005, 2006, 2007, 2009])[
|
||||
[2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010])[
|
||||
|
||||
/**
|
||||
** \file location.hh
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
<!--
|
||||
bison.xsl - common templates for Bison XSLT.
|
||||
|
||||
Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
||||
Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<!--
|
||||
xml2dot.xsl - transform Bison XML Report into DOT.
|
||||
|
||||
Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
||||
Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<!--
|
||||
xml2text.xsl - transform Bison XML Report into plain text.
|
||||
|
||||
Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
||||
Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<!--
|
||||
xml2html.xsl - transform Bison XML Report into XHTML.
|
||||
|
||||
Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
||||
Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
|
||||
+25
-16
@@ -2,8 +2,8 @@
|
||||
|
||||
# Yacc compatible skeleton for Bison
|
||||
|
||||
# Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
||||
# 2007, 2008 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005,
|
||||
# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -154,8 +154,8 @@ m4_define([b4_rhs_location],
|
||||
m4_changecom()
|
||||
m4_divert_push(0)dnl
|
||||
@output(b4_parser_file_name@)@
|
||||
b4_copyright([Skeleton implementation for Bison's Yacc-like parsers in C],dnl '
|
||||
[1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006])[
|
||||
b4_copyright([Skeleton implementation for Bison's Yacc-like parsers in C],
|
||||
[1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, 2010])[
|
||||
|
||||
/* C LALR(1) parser skeleton written by Richard Stallman, by
|
||||
simplifying the original so-called "semantic" parser. */
|
||||
@@ -310,7 +310,7 @@ typedef short int yytype_int16;
|
||||
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
|
||||
|
||||
#ifndef YY_
|
||||
# if YYENABLE_NLS
|
||||
# if defined YYENABLE_NLS && YYENABLE_NLS
|
||||
# if ENABLE_NLS
|
||||
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
|
||||
# define YY_(msgid) dgettext ("bison-runtime", msgid)
|
||||
@@ -609,9 +609,18 @@ static const ]b4_int_type_for([b4_stos])[ yystos[] =
|
||||
|
||||
/* Like YYERROR except do call yyerror. This remains here temporarily
|
||||
to ease the transition to the new meaning of YYERROR, for GCC.
|
||||
Once GCC version 2 has supplanted version 1, this can go. */
|
||||
Once GCC version 2 has supplanted version 1, this can go. However,
|
||||
YYFAIL appears to be in use. Nevertheless, it is formally deprecated
|
||||
in Bison 2.4.2's NEWS entry, where a plan to phase it out is
|
||||
discussed. */
|
||||
|
||||
#define YYFAIL goto yyerrlab
|
||||
#if defined YYFAIL
|
||||
/* This is here to suppress warnings from the GCC cpp's
|
||||
-Wunused-macros. Normally we don't worry about that warning, but
|
||||
some users do, and we want to make it easy for users to remove
|
||||
YYFAIL uses, which will produce warnings from Bison 2.5. */
|
||||
#endif
|
||||
|
||||
#define YYRECOVERING() (!!yyerrstatus)
|
||||
|
||||
@@ -668,7 +677,7 @@ while (YYID (0))
|
||||
we won't break user code: when these are the locations we know. */
|
||||
|
||||
#ifndef YY_LOCATION_PRINT
|
||||
# if YYLTYPE_IS_TRIVIAL
|
||||
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
|
||||
# define YY_LOCATION_PRINT(File, Loc) \
|
||||
fprintf (File, "%d.%d-%d.%d", \
|
||||
(Loc).first_line, (Loc).first_column, \
|
||||
@@ -1063,7 +1072,7 @@ m4_define([b4_declare_parser_state_variables],
|
||||
YYLTYPE *yylsp;
|
||||
|
||||
/* The locations where the error started and ended. */
|
||||
YYLTYPE yyerror_range[2];
|
||||
YYLTYPE yyerror_range[3];
|
||||
]])[
|
||||
YYSIZE_T yystacksize;
|
||||
]])
|
||||
@@ -1234,7 +1243,7 @@ b4_push_if([b4_pure_if([], [[ int yypushed_char = yychar;
|
||||
yyvsp = yyvs;]b4_locations_if([[
|
||||
yylsp = yyls;
|
||||
|
||||
#if YYLTYPE_IS_TRIVIAL
|
||||
#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
|
||||
/* Initialize the default location before parsing starts. */
|
||||
yylloc.first_line = yylloc.last_line = ]b4_location_initial_line[;
|
||||
yylloc.first_column = yylloc.last_column = ]b4_location_initial_column[;
|
||||
@@ -1524,7 +1533,7 @@ yyerrlab:
|
||||
#endif
|
||||
}
|
||||
|
||||
]b4_locations_if([[ yyerror_range[0] = yylloc;]])[
|
||||
]b4_locations_if([[ yyerror_range[1] = yylloc;]])[
|
||||
|
||||
if (yyerrstatus == 3)
|
||||
{
|
||||
@@ -1561,7 +1570,7 @@ yyerrorlab:
|
||||
if (/*CONSTCOND*/ 0)
|
||||
goto yyerrorlab;
|
||||
|
||||
]b4_locations_if([[ yyerror_range[0] = yylsp[1-yylen];
|
||||
]b4_locations_if([[ yyerror_range[1] = yylsp[1-yylen];
|
||||
]])[ /* Do not reclaim the symbols of the rule which action triggered
|
||||
this YYERROR. */
|
||||
YYPOPSTACK (yylen);
|
||||
@@ -1595,7 +1604,7 @@ yyerrlab1:
|
||||
if (yyssp == yyss)
|
||||
YYABORT;
|
||||
|
||||
]b4_locations_if([[ yyerror_range[0] = *yylsp;]])[
|
||||
]b4_locations_if([[ yyerror_range[1] = *yylsp;]])[
|
||||
yydestruct ("Error: popping",
|
||||
yystos[yystate], yyvsp]b4_locations_if([, yylsp])[]b4_user_args[);
|
||||
YYPOPSTACK (1);
|
||||
@@ -1605,10 +1614,10 @@ yyerrlab1:
|
||||
|
||||
*++yyvsp = yylval;
|
||||
]b4_locations_if([[
|
||||
yyerror_range[1] = yylloc;
|
||||
yyerror_range[2] = yylloc;
|
||||
/* Using YYLLOC is tempting, but would change the location of
|
||||
the lookahead. YYLOC is available though. */
|
||||
YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
|
||||
YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
|
||||
*++yylsp = yyloc;]])[
|
||||
|
||||
/* Shift the error token. */
|
||||
@@ -1675,8 +1684,8 @@ yypushreturn:
|
||||
]b4_epilogue
|
||||
b4_defines_if(
|
||||
[@output(b4_spec_defines_file@)@
|
||||
b4_copyright([Skeleton interface for Bison's Yacc-like parsers in C],dnl '
|
||||
[1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006])
|
||||
b4_copyright([Skeleton interface for Bison's Yacc-like parsers in C],
|
||||
[1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, 2010])
|
||||
|
||||
b4_percent_code_get([[requires]])[]dnl
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
# DJGPP Maintainer's Makefile -*-Makefile-*-
|
||||
# Requires GNU sed
|
||||
|
||||
## Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software
|
||||
## Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
This is a port of GNU Bison @VERSION@ to MSDOS/DJGPP.
|
||||
|
||||
Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
+2
-1
@@ -4,7 +4,8 @@ Rem Configure Bison for DJGPP.
|
||||
Rem WARNING WARNING WARNING: This file needs to have DOS CRLF end-of-line
|
||||
Rem format, or else stock DOS/Windows shells will refuse to run it.
|
||||
|
||||
Rem Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
Rem Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software
|
||||
Rem Foundation, Inc.
|
||||
|
||||
Rem This program is free software: you can redistribute it and/or modify
|
||||
Rem it under the terms of the GNU General Public License as published by
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@
|
||||
# Sed script for additional DJGPP specific editing
|
||||
# of the configure script generated by autoconf 2.62.
|
||||
|
||||
|
||||
# Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software
|
||||
# Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
+2
-1
@@ -3,7 +3,8 @@
|
||||
# This is the config.site file for configuring GNU packages
|
||||
# which are to be built with DJGPP tools.
|
||||
|
||||
# Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software
|
||||
# Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
# sed script for DJGPP specific editing of config.hin
|
||||
|
||||
# Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software
|
||||
# Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
+2
-1
@@ -7,7 +7,8 @@ Rem This batch file unpacks the Bison distribution while simultaneously
|
||||
Rem renaming some of the files whose names are invalid on DOS or conflict
|
||||
Rem with other file names after truncation to DOS 8+3 namespace.
|
||||
Rem
|
||||
Rem Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
Rem Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software
|
||||
Rem Foundation, Inc.
|
||||
Rem
|
||||
Rem This program is free software: you can redistribute it and/or modify
|
||||
Rem it under the terms of the GNU General Public License as published by
|
||||
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
/* Subprocesses with pipes.
|
||||
|
||||
Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
+3
-1
@@ -1,5 +1,7 @@
|
||||
/* Subprocesses with pipes.
|
||||
Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
|
||||
Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-2
@@ -2,8 +2,7 @@
|
||||
# Sed script for additional DJGPP specific editing
|
||||
# of the testsuite script generated by autoconf 2.61.
|
||||
|
||||
|
||||
# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
+3
-2
@@ -1,6 +1,7 @@
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||
## Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007, 2008 Free Software
|
||||
## Foundation, Inc.
|
||||
|
||||
## Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010
|
||||
## Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
+37
-42
@@ -33,14 +33,14 @@
|
||||
This manual (@value{UPDATED}) is for @acronym{GNU} Bison (version
|
||||
@value{VERSION}), the @acronym{GNU} parser generator.
|
||||
|
||||
Copyright @copyright{} 1988, 1989, 1990, 1991, 1992, 1993, 1995, 1998,
|
||||
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free
|
||||
Copyright @copyright{} 1988, 1989, 1990, 1991, 1992, 1993, 1995, 1998, 1999,
|
||||
2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
|
||||
Software Foundation, Inc.
|
||||
|
||||
@quotation
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the @acronym{GNU} Free Documentation License,
|
||||
Version 1.2 or any later version published by the Free Software
|
||||
Version 1.3 or any later version published by the Free Software
|
||||
Foundation; with no Invariant Sections, with the Front-Cover texts
|
||||
being ``A @acronym{GNU} Manual,'' and with the Back-Cover Texts as in
|
||||
(a) below. A copy of the license is included in the section entitled
|
||||
@@ -2704,9 +2704,6 @@ feature test macros can affect the behavior of Bison-generated
|
||||
@findex %code requires
|
||||
@findex %code provides
|
||||
@findex %code top
|
||||
(The prologue alternatives described here are experimental.
|
||||
More user feedback will help to determine whether they should become permanent
|
||||
features.)
|
||||
|
||||
The functionality of @var{Prologue} sections can often be subtle and
|
||||
inflexible.
|
||||
@@ -3803,8 +3800,11 @@ typedef struct YYLTYPE
|
||||
@} YYLTYPE;
|
||||
@end example
|
||||
|
||||
At the beginning of the parsing, Bison initializes all these fields to 1
|
||||
for @code{yylloc}.
|
||||
When @code{YYLTYPE} is not defined, at the beginning of the parsing, Bison
|
||||
initializes all these fields to 1 for @code{yylloc}. To initialize
|
||||
@code{yylloc} with a custom location type (or to chose a different
|
||||
initialization), use the @code{%initial-action} directive. @xref{Initial
|
||||
Action Decl, , Performing Actions before Parsing}.
|
||||
|
||||
@node Actions and Locations
|
||||
@subsection Actions and Locations
|
||||
@@ -4741,10 +4741,6 @@ Thus, @code{%code} replaces the traditional Yacc prologue,
|
||||
For a detailed discussion, see @ref{Prologue Alternatives}.
|
||||
|
||||
For Java, the default location is inside the parser class.
|
||||
|
||||
(Like all the Yacc prologue alternatives, this directive is experimental.
|
||||
More user feedback will help to determine whether it should become a permanent
|
||||
feature.)
|
||||
@end deffn
|
||||
|
||||
@deffn {Directive} %code @var{qualifier} @{@var{code}@}
|
||||
@@ -4822,10 +4818,6 @@ before any class definitions.
|
||||
@end itemize
|
||||
@end itemize
|
||||
|
||||
(Like all the Yacc prologue alternatives, this directive is experimental.
|
||||
More user feedback will help to determine whether it should become a permanent
|
||||
feature.)
|
||||
|
||||
@cindex Prologue
|
||||
For a detailed discussion of how to use @code{%code} in place of the
|
||||
traditional Yacc prologue for C/C++, see @ref{Prologue Alternatives}.
|
||||
@@ -4834,8 +4826,8 @@ traditional Yacc prologue for C/C++, see @ref{Prologue Alternatives}.
|
||||
@deffn {Directive} %debug
|
||||
In the parser file, define the macro @code{YYDEBUG} to 1 if it is not
|
||||
already defined, so that the debugging facilities are compiled.
|
||||
@end deffn
|
||||
@xref{Tracing, ,Tracing Your Parser}.
|
||||
@end deffn
|
||||
|
||||
@deffn {Directive} %define @var{variable}
|
||||
@deffnx {Directive} %define @var{variable} "@var{value}"
|
||||
@@ -5359,7 +5351,7 @@ This function is available if either the @code{%define api.push_pull "push"} or
|
||||
@xref{Push Decl, ,A Push Parser}.
|
||||
|
||||
@deftypefun yypstate *yypstate_new (void)
|
||||
The fuction will return a valid parser instance if there was memory available
|
||||
The function will return a valid parser instance if there was memory available
|
||||
or 0 if no memory was available.
|
||||
In impure mode, it will also return 0 if a parser instance is currently
|
||||
allocated.
|
||||
@@ -6816,7 +6808,7 @@ that allows variable-length arrays. The default is 200.
|
||||
Do not allow @code{YYINITDEPTH} to be greater than @code{YYMAXDEPTH}.
|
||||
|
||||
@c FIXME: C++ output.
|
||||
Because of semantical differences between C and C++, the
|
||||
Because of semantic differences between C and C++, the
|
||||
@acronym{LALR}(1) parsers in C produced by Bison cannot grow when compiled
|
||||
by C++ compilers. In this precise case (compiling a C parser as C++) you are
|
||||
suggested to grow @code{YYINITDEPTH}. The Bison maintainers hope to fix
|
||||
@@ -8022,8 +8014,8 @@ int yyparse (void);
|
||||
@c - initial action
|
||||
|
||||
The C++ @acronym{LALR}(1) parser is selected using the skeleton directive,
|
||||
@samp{%skeleton "lalr1.c"}, or the synonymous command-line option
|
||||
@option{--skeleton=lalr1.c}.
|
||||
@samp{%skeleton "lalr1.cc"}, or the synonymous command-line option
|
||||
@option{--skeleton=lalr1.cc}.
|
||||
@xref{Decl Summary}.
|
||||
|
||||
When run, @command{bison} will create several entities in the @samp{yy}
|
||||
@@ -8172,11 +8164,19 @@ this class is detailed below. It can be extended using the
|
||||
it describes an additional member of the parser class, and an
|
||||
additional argument for its constructor.
|
||||
|
||||
@defcv {Type} {parser} {semantic_value_type}
|
||||
@defcvx {Type} {parser} {location_value_type}
|
||||
@defcv {Type} {parser} {semantic_type}
|
||||
@defcvx {Type} {parser} {location_type}
|
||||
The types for semantics value and locations.
|
||||
@end defcv
|
||||
|
||||
@defcv {Type} {parser} {token}
|
||||
A structure that contains (only) the definition of the tokens as the
|
||||
@code{yytokentype} enumeration. To refer to the token @code{FOO}, the
|
||||
scanner should use @code{yy::parser::token::FOO}. The scanner can use
|
||||
@samp{typedef yy::parser::token token;} to ``import'' the token enumeration
|
||||
(@pxref{Calc++ Scanner}).
|
||||
@end defcv
|
||||
|
||||
@deftypemethod {parser} {} parser (@var{type1} @var{arg1}, ...)
|
||||
Build a new parser object. There are no arguments by default, unless
|
||||
@samp{%parse-param @{@var{type1} @var{arg1}@}} was used.
|
||||
@@ -8215,7 +8215,7 @@ The parser invokes the scanner by calling @code{yylex}. Contrary to C
|
||||
parsers, C++ parsers are always pure: there is no point in using the
|
||||
@code{%define api.pure} directive. Therefore the interface is as follows.
|
||||
|
||||
@deftypemethod {parser} {int} yylex (semantic_value_type& @var{yylval}, location_type& @var{yylloc}, @var{type1} @var{arg1}, ...)
|
||||
@deftypemethod {parser} {int} yylex (semantic_type* @var{yylval}, location_type* @var{yylloc}, @var{type1} @var{arg1}, ...)
|
||||
Return the next token. Its type is the return value, its semantic
|
||||
value and location being @var{yylval} and @var{yylloc}. Invocations of
|
||||
@samp{%lex-param @{@var{type1} @var{arg1}@}} yield additional arguments.
|
||||
@@ -8455,7 +8455,7 @@ global variables.
|
||||
|
||||
@noindent
|
||||
Then we request the location tracking feature, and initialize the
|
||||
first location's file name. Afterwards new locations are computed
|
||||
first location's file name. Afterward new locations are computed
|
||||
relatively to the previous locations: the file name will be
|
||||
automatically propagated.
|
||||
|
||||
@@ -8586,8 +8586,8 @@ parser's to get the set of defined tokens.
|
||||
@example
|
||||
%@{ /* -*- C++ -*- */
|
||||
# include <cstdlib>
|
||||
# include <errno.h>
|
||||
# include <limits.h>
|
||||
# include <cerrno>
|
||||
# include <climits>
|
||||
# include <string>
|
||||
# include "calc++-driver.hh"
|
||||
# include "calc++-parser.hh"
|
||||
@@ -8859,7 +8859,7 @@ The first, inclusive, position of the range, and the first beyond.
|
||||
@end deftypeivar
|
||||
|
||||
@deftypeop {Constructor} {Location} {} Location (Position @var{loc})
|
||||
Create a @code{Location} denoting an empty range located at a given point.
|
||||
Create a @code{Location} denoting an empty range located at a given point.
|
||||
@end deftypeop
|
||||
|
||||
@deftypeop {Constructor} {Location} {} Location (Position @var{begin}, Position @var{end})
|
||||
@@ -8989,7 +8989,7 @@ changed using @code{%define location_type "@var{class-name}".}
|
||||
|
||||
@deftypemethod {Lexer} {int} yylex ()
|
||||
Return the next token. Its type is the return value, its semantic
|
||||
value and location are saved and returned by the ther methods in the
|
||||
value and location are saved and returned by the their methods in the
|
||||
interface.
|
||||
|
||||
Use @code{%define lex_throws} to specify any uncaught exceptions.
|
||||
@@ -9007,7 +9007,7 @@ The return type can be changed using @code{%define position_type
|
||||
@end deftypemethod
|
||||
|
||||
@deftypemethod {Lexer} {Object} getLVal ()
|
||||
Return the semantical value of the last token that yylex returned.
|
||||
Return the semantic value of the last token that yylex returned.
|
||||
|
||||
The return type can be changed using @code{%define stype
|
||||
"@var{class-name}".}
|
||||
@@ -9073,12 +9073,7 @@ Return immediately from the parser, indicating success.
|
||||
@end deffn
|
||||
|
||||
@deffn {Statement} {return YYERROR;}
|
||||
Start error recovery without printing an error message.
|
||||
@xref{Error Recovery}.
|
||||
@end deffn
|
||||
|
||||
@deffn {Statement} {return YYFAIL;}
|
||||
Print an error message and start error recovery.
|
||||
Start error recovery without printing an error message.
|
||||
@xref{Error Recovery}.
|
||||
@end deffn
|
||||
|
||||
@@ -9123,7 +9118,7 @@ corresponds to these C macros.}.
|
||||
@item
|
||||
Java lacks unions, so @code{%union} has no effect. Instead, semantic
|
||||
values have a common base type: @code{Object} or as specified by
|
||||
@code{%define stype}. Angle backets on @code{%token}, @code{type},
|
||||
@samp{%define stype}. Angle brackets on @code{%token}, @code{type},
|
||||
@code{$@var{n}} and @code{$$} specify subtypes rather than fields of
|
||||
an union. The type of @code{$$}, even with angle brackets, is the base
|
||||
type since Java casts are not allow on the left-hand side of assignments.
|
||||
@@ -9132,7 +9127,7 @@ left-hand side of assignments. See @pxref{Java Semantic Values} and
|
||||
@pxref{Java Action Features}.
|
||||
|
||||
@item
|
||||
The prolog declarations have a different meaning than in C/C++ code.
|
||||
The prologue declarations have a different meaning than in C/C++ code.
|
||||
@table @asis
|
||||
@item @code{%code imports}
|
||||
blocks are placed at the beginning of the Java source code. They may
|
||||
@@ -9778,10 +9773,6 @@ Insert @var{code} verbatim into output parser source.
|
||||
Equip the parser for debugging. @xref{Decl Summary}.
|
||||
@end deffn
|
||||
|
||||
@deffn {Directive} %debug
|
||||
Equip the parser for debugging. @xref{Decl Summary}.
|
||||
@end deffn
|
||||
|
||||
@ifset defaultprec
|
||||
@deffn {Directive} %default-prec
|
||||
Assign a precedence to rules that lack an explicit @samp{%prec}
|
||||
@@ -10354,6 +10345,10 @@ grammatically indivisible. The piece of text it represents is a token.
|
||||
|
||||
@bye
|
||||
|
||||
@c Local Variables:
|
||||
@c fill-column: 76
|
||||
@c End:
|
||||
|
||||
@c LocalWords: texinfo setfilename settitle setchapternewpage finalout
|
||||
@c LocalWords: ifinfo smallbook shorttitlepage titlepage GPL FIXME iftex
|
||||
@c LocalWords: akim fn cp syncodeindex vr tp synindex dircategory direntry
|
||||
|
||||
+68
-13
@@ -1,12 +1,12 @@
|
||||
@c The GNU Free Documentation License.
|
||||
@center Version 1.2, November 2002
|
||||
@center Version 1.3, 3 November 2008
|
||||
|
||||
@c This file is intended to be included within another document,
|
||||
@c hence no sectioning command or @node.
|
||||
@c hence no sectioning command or @node.
|
||||
|
||||
@display
|
||||
Copyright @copyright{} 2000,2001,2002 Free Software Foundation, Inc.
|
||||
51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
|
||||
@uref{http://fsf.org/}
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
@@ -111,6 +111,9 @@ formats which do not have any title page as such, ``Title Page'' means
|
||||
the text near the most prominent appearance of the work's title,
|
||||
preceding the beginning of the body of the text.
|
||||
|
||||
The ``publisher'' means any person or entity that distributes copies
|
||||
of the Document to the public.
|
||||
|
||||
A section ``Entitled XYZ'' means a named subunit of the Document whose
|
||||
title either is precisely XYZ or contains XYZ in parentheses following
|
||||
text that translates XYZ in another language. (Here XYZ stands for a
|
||||
@@ -379,13 +382,30 @@ title.
|
||||
@item
|
||||
TERMINATION
|
||||
|
||||
You may not copy, modify, sublicense, or distribute the Document except
|
||||
as expressly provided for under this License. Any other attempt to
|
||||
copy, modify, sublicense or distribute the Document is void, and will
|
||||
automatically terminate your rights under this License. However,
|
||||
parties who have received copies, or rights, from you under this
|
||||
License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
You may not copy, modify, sublicense, or distribute the Document
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense, or distribute it is void, and
|
||||
will automatically terminate your rights under this License.
|
||||
|
||||
However, if you cease all violation of this License, then your license
|
||||
from a particular copyright holder is reinstated (a) provisionally,
|
||||
unless and until the copyright holder explicitly and finally
|
||||
terminates your license, and (b) permanently, if the copyright holder
|
||||
fails to notify you of the violation by some reasonable means prior to
|
||||
60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, receipt of a copy of some or all of the same material does
|
||||
not give you any rights to use it.
|
||||
|
||||
@item
|
||||
FUTURE REVISIONS OF THIS LICENSE
|
||||
@@ -403,7 +423,42 @@ following the terms and conditions either of that specified version or
|
||||
of any later version that has been published (not as a draft) by the
|
||||
Free Software Foundation. If the Document does not specify a version
|
||||
number of this License, you may choose any version ever published (not
|
||||
as a draft) by the Free Software Foundation.
|
||||
as a draft) by the Free Software Foundation. If the Document
|
||||
specifies that a proxy can decide which future versions of this
|
||||
License can be used, that proxy's public statement of acceptance of a
|
||||
version permanently authorizes you to choose that version for the
|
||||
Document.
|
||||
|
||||
@item
|
||||
RELICENSING
|
||||
|
||||
``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any
|
||||
World Wide Web server that publishes copyrightable works and also
|
||||
provides prominent facilities for anybody to edit those works. A
|
||||
public wiki that anybody can edit is an example of such a server. A
|
||||
``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the
|
||||
site means any set of copyrightable works thus published on the MMC
|
||||
site.
|
||||
|
||||
``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0
|
||||
license published by Creative Commons Corporation, a not-for-profit
|
||||
corporation with a principal place of business in San Francisco,
|
||||
California, as well as future copyleft versions of that license
|
||||
published by that same organization.
|
||||
|
||||
``Incorporate'' means to publish or republish a Document, in whole or
|
||||
in part, as part of another Document.
|
||||
|
||||
An MMC is ``eligible for relicensing'' if it is licensed under this
|
||||
License, and if all works that were first published under this License
|
||||
somewhere other than this MMC, and subsequently incorporated in whole
|
||||
or in part into the MMC, (1) had no cover texts or invariant sections,
|
||||
and (2) were thus incorporated prior to November 1, 2008.
|
||||
|
||||
The operator of an MMC Site may republish an MMC contained in the site
|
||||
under CC-BY-SA on the same site at any time before August 1, 2009,
|
||||
provided the MMC is eligible for relicensing.
|
||||
|
||||
@end enumerate
|
||||
|
||||
@page
|
||||
@@ -417,7 +472,7 @@ license notices just after the title page:
|
||||
@group
|
||||
Copyright (C) @var{year} @var{your name}.
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.2
|
||||
under the terms of the GNU Free Documentation License, Version 1.3
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
|
||||
Texts. A copy of the license is included in the section entitled ``GNU
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
\def\finalout{\overfullrule=0pt}
|
||||
%\finalout
|
||||
|
||||
% Copyright (c) 1998, 2001 Free Software Foundation, Inc.
|
||||
% Copyright (c) 1998, 2001, 2009, 2010 Free Software Foundation, Inc.
|
||||
%
|
||||
% This file is part of Bison.
|
||||
%
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
## Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ straightforward use of _build/src/bison would.)
|
||||
|
||||
--
|
||||
|
||||
Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
#! /usr/bin/perl -w
|
||||
|
||||
# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is part of Bison, the GNU Compiler Compiler.
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||
## Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2005, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||
## Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -31,12 +31,16 @@ $(BISON): $(BISON_IN)
|
||||
doc = $(top_srcdir)/doc/bison.texinfo
|
||||
extexi = $(top_srcdir)/examples/extexi
|
||||
# Extract in src.
|
||||
$(calc_extracted): $(doc) $(extexi)
|
||||
$(srcdir)/calc.stamp: $(doc) $(extexi)
|
||||
rm -f $@ $@.tmp
|
||||
touch $@.tmp
|
||||
cd $(srcdir) && \
|
||||
$(AWK) -f ../extexi -v VERSION="$(VERSION)" \
|
||||
../../doc/bison.texinfo -- calc++-parser.yy \
|
||||
calc++-scanner.ll calc++.cc calc++-driver.hh calc++-driver.cc
|
||||
mv $@.tmp $@
|
||||
|
||||
$(calc_extracted): $(srcdir)/calc.stamp
|
||||
|
||||
## ------------------- ##
|
||||
## Parser generation. ##
|
||||
@@ -50,7 +54,10 @@ MAINTAINERCLEANFILES = $(srcdir)/*.stamp $(BUILT_SOURCES)
|
||||
# Compile the parser and save cycles.
|
||||
# This code comes from "Handling Tools that Produce Many Outputs",
|
||||
# from the Automake documentation.
|
||||
EXTRA_DIST = $(srcdir)/calc++-parser.stamp $(srcdir)/calc++-parser.yy
|
||||
EXTRA_DIST = \
|
||||
$(srcdir)/calc++-parser.stamp \
|
||||
$(srcdir)/calc++-parser.yy \
|
||||
$(srcdir)/calc.stamp
|
||||
# Don't depend on $(BISON) otherwise we would rebuild these files
|
||||
# in srcdir, including during distcheck, which is forbidden.
|
||||
$(srcdir)/calc++-parser.stamp: $(srcdir)/calc++-parser.yy $(BISON_IN)
|
||||
|
||||
+3
-1
@@ -1,7 +1,9 @@
|
||||
# Extract all examples from the manual source. -*- AWK -*-
|
||||
|
||||
# This file is part of GNU Bison
|
||||
# Copyright 1992, 2000, 2001, 2005, 2006 Free Software Foundation, Inc.
|
||||
|
||||
# Copyright (C) 1992, 2000, 2001, 2005, 2006, 2009, 2010 Free Software
|
||||
# Foundation, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
Submodule gnulib updated: 5a1286a9f8...b48afd89ec
@@ -1,35 +1,55 @@
|
||||
.deps
|
||||
Makefile
|
||||
Makefile.in
|
||||
alloca.h
|
||||
alloca.in.h
|
||||
argmatch.c
|
||||
argmatch.h
|
||||
basename-lgpl.c
|
||||
basename.c
|
||||
binary-io.h
|
||||
bitrotate.h
|
||||
c-ctype.c
|
||||
c-ctype.h
|
||||
c-strcase.h
|
||||
c-strcasecmp.c
|
||||
c-strncasecmp.c
|
||||
charset.alias
|
||||
cloexec.c
|
||||
cloexec.h
|
||||
config.charset
|
||||
config.h
|
||||
config.hin
|
||||
configmake.h
|
||||
dirname-lgpl.c
|
||||
dirname.c
|
||||
dirname.h
|
||||
dup-safer-flag.c
|
||||
dup-safer.c
|
||||
dup2.c
|
||||
errno.h
|
||||
errno.in.h
|
||||
error.c
|
||||
error.h
|
||||
exitfail.c
|
||||
exitfail.h
|
||||
fatal-signal.c
|
||||
fatal-signal.h
|
||||
fcntl.c
|
||||
fcntl.h
|
||||
fcntl.in.h
|
||||
fd-safer-flag.c
|
||||
fd-safer.c
|
||||
fopen-safer.c
|
||||
fopen.c
|
||||
getdtablesize.c
|
||||
getopt.c
|
||||
getopt.h
|
||||
getopt.in.h
|
||||
getopt1.c
|
||||
getopt_.h
|
||||
getopt_int.h
|
||||
getpagesize.c
|
||||
gettext.h
|
||||
gnulib.mk
|
||||
hash.c
|
||||
@@ -45,30 +65,68 @@ mbrtowc.c
|
||||
mbsinit.c
|
||||
mbswidth.c
|
||||
mbswidth.h
|
||||
memchr.c
|
||||
memchr.valgrind
|
||||
obstack.c
|
||||
obstack.h
|
||||
open.c
|
||||
pipe-safer.c
|
||||
pipe.c
|
||||
pipe.h
|
||||
pipe2-safer.c
|
||||
pipe2.c
|
||||
quote.c
|
||||
quote.h
|
||||
quotearg.c
|
||||
quotearg.h
|
||||
rawmemchr.c
|
||||
rawmemchr.valgrind
|
||||
ref-add.sed
|
||||
ref-add.sin
|
||||
ref-del.sed
|
||||
ref-del.sin
|
||||
sched.h
|
||||
sched.in.h
|
||||
sig-handler.h
|
||||
sigaction.c
|
||||
signal.h
|
||||
signal.in.h
|
||||
sigprocmask.c
|
||||
spawn.h
|
||||
spawn.in.h
|
||||
spawn_faction_addclose.c
|
||||
spawn_faction_adddup2.c
|
||||
spawn_faction_addopen.c
|
||||
spawn_faction_destroy.c
|
||||
spawn_faction_init.c
|
||||
spawn_int.h
|
||||
spawnattr_destroy.c
|
||||
spawnattr_init.c
|
||||
spawnattr_setflags.c
|
||||
spawnattr_setsigmask.c
|
||||
spawni.c
|
||||
spawnp.c
|
||||
stamp-h1
|
||||
stat.c
|
||||
stdbool.h
|
||||
stdbool.in.h
|
||||
stdbool_.h
|
||||
stddef.h
|
||||
stddef.in.h
|
||||
stdint.h
|
||||
stdint.in.h
|
||||
stdint_.h
|
||||
stdio--.h
|
||||
stdio-safer.h
|
||||
stdio-write.c
|
||||
stdio.h
|
||||
stdio.in.h
|
||||
stdlib.h
|
||||
stdlib.in.h
|
||||
stdlib_.h
|
||||
stpcpy.c
|
||||
strchrnul.c
|
||||
strchrnul.valgrind
|
||||
streq.h
|
||||
strerror.c
|
||||
string.h
|
||||
@@ -81,17 +139,29 @@ strtol.c
|
||||
strtoul.c
|
||||
strverscmp.c
|
||||
strverscmp.h
|
||||
sys
|
||||
sys_stat.h
|
||||
sys_stat.in.h
|
||||
sys_wait.h
|
||||
sys_wait.in.h
|
||||
time.h
|
||||
time.in.h
|
||||
unistd--.h
|
||||
unistd-safer.h
|
||||
unistd.h
|
||||
unistd.in.h
|
||||
unistd_.h
|
||||
unitypes.h
|
||||
unitypes.in.h
|
||||
uniwidth
|
||||
uniwidth.h
|
||||
uniwidth.in.h
|
||||
unlocked-io.h
|
||||
unsetenv.c
|
||||
verify.h
|
||||
w32spawn.h
|
||||
wait-process.c
|
||||
wait-process.h
|
||||
wchar.h
|
||||
wchar.in.h
|
||||
wchar_.h
|
||||
|
||||
@@ -4,35 +4,55 @@
|
||||
/.deps
|
||||
/Makefile
|
||||
/Makefile.in
|
||||
/alloca.h
|
||||
/alloca.in.h
|
||||
/argmatch.c
|
||||
/argmatch.h
|
||||
/basename-lgpl.c
|
||||
/basename.c
|
||||
/binary-io.h
|
||||
/bitrotate.h
|
||||
/c-ctype.c
|
||||
/c-ctype.h
|
||||
/c-strcase.h
|
||||
/c-strcasecmp.c
|
||||
/c-strncasecmp.c
|
||||
/charset.alias
|
||||
/cloexec.c
|
||||
/cloexec.h
|
||||
/config.charset
|
||||
/config.h
|
||||
/config.hin
|
||||
/configmake.h
|
||||
/dirname-lgpl.c
|
||||
/dirname.c
|
||||
/dirname.h
|
||||
/dup-safer-flag.c
|
||||
/dup-safer.c
|
||||
/dup2.c
|
||||
/errno.h
|
||||
/errno.in.h
|
||||
/error.c
|
||||
/error.h
|
||||
/exitfail.c
|
||||
/exitfail.h
|
||||
/fatal-signal.c
|
||||
/fatal-signal.h
|
||||
/fcntl.c
|
||||
/fcntl.h
|
||||
/fcntl.in.h
|
||||
/fd-safer-flag.c
|
||||
/fd-safer.c
|
||||
/fopen-safer.c
|
||||
/fopen.c
|
||||
/getdtablesize.c
|
||||
/getopt.c
|
||||
/getopt.h
|
||||
/getopt.in.h
|
||||
/getopt1.c
|
||||
/getopt_.h
|
||||
/getopt_int.h
|
||||
/getpagesize.c
|
||||
/gettext.h
|
||||
/gnulib.mk
|
||||
/hash.c
|
||||
@@ -48,30 +68,68 @@
|
||||
/mbsinit.c
|
||||
/mbswidth.c
|
||||
/mbswidth.h
|
||||
/memchr.c
|
||||
/memchr.valgrind
|
||||
/obstack.c
|
||||
/obstack.h
|
||||
/open.c
|
||||
/pipe-safer.c
|
||||
/pipe.c
|
||||
/pipe.h
|
||||
/pipe2-safer.c
|
||||
/pipe2.c
|
||||
/quote.c
|
||||
/quote.h
|
||||
/quotearg.c
|
||||
/quotearg.h
|
||||
/rawmemchr.c
|
||||
/rawmemchr.valgrind
|
||||
/ref-add.sed
|
||||
/ref-add.sin
|
||||
/ref-del.sed
|
||||
/ref-del.sin
|
||||
/sched.h
|
||||
/sched.in.h
|
||||
/sig-handler.h
|
||||
/sigaction.c
|
||||
/signal.h
|
||||
/signal.in.h
|
||||
/sigprocmask.c
|
||||
/spawn.h
|
||||
/spawn.in.h
|
||||
/spawn_faction_addclose.c
|
||||
/spawn_faction_adddup2.c
|
||||
/spawn_faction_addopen.c
|
||||
/spawn_faction_destroy.c
|
||||
/spawn_faction_init.c
|
||||
/spawn_int.h
|
||||
/spawnattr_destroy.c
|
||||
/spawnattr_init.c
|
||||
/spawnattr_setflags.c
|
||||
/spawnattr_setsigmask.c
|
||||
/spawni.c
|
||||
/spawnp.c
|
||||
/stamp-h1
|
||||
/stat.c
|
||||
/stdbool.h
|
||||
/stdbool.in.h
|
||||
/stdbool_.h
|
||||
/stddef.h
|
||||
/stddef.in.h
|
||||
/stdint.h
|
||||
/stdint.in.h
|
||||
/stdint_.h
|
||||
/stdio--.h
|
||||
/stdio-safer.h
|
||||
/stdio-write.c
|
||||
/stdio.h
|
||||
/stdio.in.h
|
||||
/stdlib.h
|
||||
/stdlib.in.h
|
||||
/stdlib_.h
|
||||
/stpcpy.c
|
||||
/strchrnul.c
|
||||
/strchrnul.valgrind
|
||||
/streq.h
|
||||
/strerror.c
|
||||
/string.h
|
||||
@@ -84,17 +142,29 @@
|
||||
/strtoul.c
|
||||
/strverscmp.c
|
||||
/strverscmp.h
|
||||
/sys
|
||||
/sys_stat.h
|
||||
/sys_stat.in.h
|
||||
/sys_wait.h
|
||||
/sys_wait.in.h
|
||||
/time.h
|
||||
/time.in.h
|
||||
/unistd--.h
|
||||
/unistd-safer.h
|
||||
/unistd.h
|
||||
/unistd.in.h
|
||||
/unistd_.h
|
||||
/unitypes.h
|
||||
/unitypes.in.h
|
||||
/uniwidth
|
||||
/uniwidth.h
|
||||
/uniwidth.in.h
|
||||
/unlocked-io.h
|
||||
/unsetenv.c
|
||||
/verify.h
|
||||
/w32spawn.h
|
||||
/wait-process.c
|
||||
/wait-process.h
|
||||
/wchar.h
|
||||
/wchar.in.h
|
||||
/wchar_.h
|
||||
|
||||
+2
-3
@@ -1,7 +1,7 @@
|
||||
# Make bison/lib.
|
||||
|
||||
# Copyright (C) 2001, 2002, 2003, 2004, 2006, 2008, 2009
|
||||
# Free Software Foundation, Inc.
|
||||
# Copyright (C) 2001, 2002, 2003, 2004, 2006, 2008, 2009, 2010 Free
|
||||
# Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -37,7 +37,6 @@ timevars_sources = \
|
||||
# Non-gnulib sources in Bison's internal library.
|
||||
libbison_a_SOURCES += \
|
||||
get-errno.h get-errno.c \
|
||||
subpipe.h subpipe.c \
|
||||
$(bitsets_sources) $(additional_bitsets_sources) $(timevars_sources)
|
||||
|
||||
# The Yacc compatibility library.
|
||||
|
||||
+4
-1
@@ -1,5 +1,8 @@
|
||||
/* Array bitsets.
|
||||
Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
|
||||
|
||||
Copyright (C) 2002, 2003, 2006, 2009, 2010 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+3
-1
@@ -1,5 +1,7 @@
|
||||
/* Functions to support abitsets.
|
||||
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
||||
|
||||
Copyright (C) 2002, 2004, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+4
-1
@@ -1,5 +1,8 @@
|
||||
/* Base bitset stuff.
|
||||
Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
|
||||
|
||||
Copyright (C) 2002, 2003, 2004, 2006, 2009, 2010 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+4
-1
@@ -1,5 +1,8 @@
|
||||
/* General bitsets.
|
||||
Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
|
||||
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009, 2010 Free
|
||||
Software Foundation, Inc.
|
||||
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+4
-1
@@ -1,5 +1,8 @@
|
||||
/* Generic bitsets.
|
||||
Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
|
||||
Copyright (C) 2002, 2003, 2004, 2009, 2010 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+4
-1
@@ -1,5 +1,8 @@
|
||||
/* Bitset statistics.
|
||||
Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
|
||||
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009, 2010 Free
|
||||
Software Foundation, Inc.
|
||||
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+4
-1
@@ -1,5 +1,8 @@
|
||||
/* Functions to support bitset statistics.
|
||||
Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
|
||||
Copyright (C) 2002, 2003, 2004, 2009, 2010 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+3
-1
@@ -1,5 +1,7 @@
|
||||
/* Bitset vectors.
|
||||
Copyright (C) 2001, 2002, 2004, 2006 Free Software Foundation, Inc.
|
||||
|
||||
Copyright (C) 2001, 2002, 2004, 2006, 2009, 2010 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
+3
-1
@@ -1,5 +1,7 @@
|
||||
/* Bitset vectors.
|
||||
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
||||
|
||||
Copyright (C) 2002, 2004, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
Contributed by Akim Demaille (akim@freefriends.org).
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+3
-1
@@ -1,5 +1,7 @@
|
||||
/* Bitset vectors.
|
||||
Copyright (C) 2001, 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
|
||||
Copyright (C) 2001, 2002, 2004, 2005, 2006, 2009, 2010 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
+3
-1
@@ -1,5 +1,7 @@
|
||||
/* Bitset vectors.
|
||||
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
||||
|
||||
Copyright (C) 2002, 2004, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+4
-1
@@ -1,5 +1,8 @@
|
||||
/* Functions to support expandable bitsets.
|
||||
Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
|
||||
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009, 2010 Free
|
||||
Software Foundation, Inc.
|
||||
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+3
-1
@@ -1,5 +1,7 @@
|
||||
/* Functions to support ebitsets.
|
||||
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
||||
|
||||
Copyright (C) 2002, 2004, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* get-errno.c - get and set errno.
|
||||
|
||||
Copyright (C) 2002, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2006, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* get-errno.h - get and set errno.
|
||||
|
||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
+4
-1
@@ -1,5 +1,8 @@
|
||||
/* Functions to support link list bitsets.
|
||||
Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
|
||||
|
||||
Copyright (C) 2002, 2003, 2004, 2006, 2009, 2010 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+3
-1
@@ -1,5 +1,7 @@
|
||||
/* Functions to support lbitsets.
|
||||
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
||||
|
||||
Copyright (C) 2002, 2004, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
/* Fake libiberty.h for Bison.
|
||||
Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
|
||||
Copyright (C) 2002, 2003, 2004, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* Yacc library main function.
|
||||
|
||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
|
||||
-176
@@ -1,176 +0,0 @@
|
||||
/* Subprocesses with pipes.
|
||||
|
||||
Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
|
||||
This program 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program 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 this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Paul Eggert <[email protected]>
|
||||
and Florian Krohm <florian@edamail.fishkill.ibm.com>. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "subpipe.h"
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include <signal.h>
|
||||
#if ! defined SIGCHLD && defined SIGCLD
|
||||
# define SIGCHLD SIGCLD
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#ifndef STDIN_FILENO
|
||||
# define STDIN_FILENO 0
|
||||
#endif
|
||||
#ifndef STDOUT_FILENO
|
||||
# define STDOUT_FILENO 1
|
||||
#endif
|
||||
#if ! HAVE_DUP2 && ! defined dup2
|
||||
# include <fcntl.h>
|
||||
# define dup2(f, t) (close (t), fcntl (f, F_DUPFD, t))
|
||||
#endif
|
||||
|
||||
#if HAVE_SYS_WAIT_H
|
||||
# include <sys/wait.h>
|
||||
#endif
|
||||
#ifndef WEXITSTATUS
|
||||
# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
|
||||
#endif
|
||||
#ifndef WIFEXITED
|
||||
# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
|
||||
#endif
|
||||
|
||||
#if HAVE_VFORK_H
|
||||
# include <vfork.h>
|
||||
#endif
|
||||
#if ! HAVE_WORKING_VFORK
|
||||
# define vfork fork
|
||||
#endif
|
||||
|
||||
#include "error.h"
|
||||
#include "unistd-safer.h"
|
||||
|
||||
#include "gettext.h"
|
||||
#define _(Msgid) gettext (Msgid)
|
||||
|
||||
#ifndef __attribute__
|
||||
/* This feature is available in gcc versions 2.5 and later. */
|
||||
# if ! defined __GNUC__ || __GNUC__ < 2 || \
|
||||
(__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
|
||||
# define __attribute__(Spec) /* empty */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef ATTRIBUTE_UNUSED
|
||||
# define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
|
||||
#endif
|
||||
|
||||
|
||||
/* Initialize this module. */
|
||||
|
||||
void
|
||||
init_subpipe (void)
|
||||
{
|
||||
#ifdef SIGCHLD
|
||||
/* System V fork+wait does not work if SIGCHLD is ignored. */
|
||||
signal (SIGCHLD, SIG_DFL);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/* Create a subprocess that is run as a filter. ARGV is the
|
||||
NULL-terminated argument vector for the subprocess. Store read and
|
||||
write file descriptors for communication with the subprocess into
|
||||
FD[0] and FD[1]: input meant for the process can be written into
|
||||
FD[0], and output from the process can be read from FD[1]. Return
|
||||
the subprocess id.
|
||||
|
||||
To avoid deadlock, the invoker must not let incoming data pile up
|
||||
in FD[1] while writing data to FD[0]. */
|
||||
|
||||
pid_t
|
||||
create_subpipe (char const * const *argv, int fd[2])
|
||||
{
|
||||
int pipe_fd[2];
|
||||
int child_fd[2];
|
||||
pid_t pid;
|
||||
|
||||
if (pipe_safer (child_fd) != 0 || pipe_safer (pipe_fd) != 0)
|
||||
error (EXIT_FAILURE, errno, "pipe");
|
||||
fd[0] = child_fd[1];
|
||||
fd[1] = pipe_fd[0];
|
||||
child_fd[1] = pipe_fd[1];
|
||||
|
||||
pid = vfork ();
|
||||
if (pid < 0)
|
||||
error (EXIT_FAILURE, errno, "fork");
|
||||
|
||||
if (! pid)
|
||||
{
|
||||
/* Child. */
|
||||
close (fd[0]);
|
||||
close (fd[1]);
|
||||
dup2 (child_fd[0], STDIN_FILENO);
|
||||
close (child_fd[0]);
|
||||
dup2 (child_fd[1], STDOUT_FILENO);
|
||||
close (child_fd[1]);
|
||||
|
||||
/* The cast to (char **) rather than (char * const *) is needed
|
||||
for portability to older hosts with a nonstandard prototype
|
||||
for execvp. */
|
||||
execvp (argv[0], (char **) argv);
|
||||
|
||||
_exit (errno == ENOENT ? 127 : 126);
|
||||
}
|
||||
|
||||
/* Parent. */
|
||||
close (child_fd[0]);
|
||||
close (child_fd[1]);
|
||||
return pid;
|
||||
}
|
||||
|
||||
|
||||
/* Wait for the subprocess to exit. */
|
||||
|
||||
void
|
||||
reap_subpipe (pid_t pid, char const *program)
|
||||
{
|
||||
#if HAVE_WAITPID || defined waitpid
|
||||
int wstatus;
|
||||
if (waitpid (pid, &wstatus, 0) < 0)
|
||||
error (EXIT_FAILURE, errno, "waitpid");
|
||||
else
|
||||
{
|
||||
int status = WIFEXITED (wstatus) ? WEXITSTATUS (wstatus) : -1;
|
||||
if (status)
|
||||
error (EXIT_FAILURE, 0,
|
||||
_(status == 126
|
||||
? "subsidiary program `%s' could not be invoked"
|
||||
: status == 127
|
||||
? "subsidiary program `%s' not found"
|
||||
: status < 0
|
||||
? "subsidiary program `%s' failed"
|
||||
: "subsidiary program `%s' failed (exit status %d)"),
|
||||
program, status);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
end_of_output_subpipe (pid_t pid ATTRIBUTE_UNUSED,
|
||||
int fd[2] ATTRIBUTE_UNUSED)
|
||||
{
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
/* Subprocesses with pipes.
|
||||
Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
|
||||
|
||||
This program 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program 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 this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Paul Eggert <[email protected]>
|
||||
and Florian Krohm <florian@edamail.fishkill.ibm.com>. */
|
||||
|
||||
#if HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
|
||||
void init_subpipe (void);
|
||||
pid_t create_subpipe (char const * const *, int[2]);
|
||||
void end_of_output_subpipe (pid_t, int[2]);
|
||||
void reap_subpipe (pid_t, char const *);
|
||||
+4
-1
@@ -1,5 +1,8 @@
|
||||
/* Timing variables for measuring compiler performance.
|
||||
Copyright (C) 2000, 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
|
||||
Copyright (C) 2000, 2002, 2004, 2006, 2009, 2010 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
Contributed by Alex Samuel <samuel@codesourcery.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+3
-1
@@ -1,6 +1,8 @@
|
||||
/* This file contains the definitions for timing variables used to -*- C -*-
|
||||
measure run-time performance of the compiler.
|
||||
Copyright (C) 2002, 2007 Free Software Foundation, Inc.
|
||||
|
||||
Copyright (C) 2002, 2007, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
Contributed by Akim Demaille <akim@freefriends.org>.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
+4
-1
@@ -1,5 +1,8 @@
|
||||
/* Timing variables for measuring compiler performance.
|
||||
Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc.
|
||||
|
||||
Copyright (C) 2000, 2002, 2004, 2009, 2010 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
Contributed by Alex Samuel <samuel@codesourcery.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+4
-1
@@ -1,5 +1,8 @@
|
||||
/* Variable array bitsets.
|
||||
Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
|
||||
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009, 2010 Free
|
||||
Software Foundation, Inc.
|
||||
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+3
-1
@@ -1,5 +1,7 @@
|
||||
/* Functions to support vbitsets.
|
||||
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
||||
|
||||
Copyright (C) 2002, 2004, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* Yacc library error-printing function.
|
||||
|
||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
|
||||
@@ -1,16 +1,28 @@
|
||||
00gnulib.m4
|
||||
absolute-header.m4
|
||||
alloca.m4
|
||||
argmatch.m4
|
||||
asm-underscore.m4
|
||||
assert.m4
|
||||
cloexec.m4
|
||||
config-h.m4
|
||||
dirname.m4
|
||||
dos.m4
|
||||
double-slash-root.m4
|
||||
dup2.m4
|
||||
environ.m4
|
||||
errno_h.m4
|
||||
error.m4
|
||||
exitfail.m4
|
||||
extensions.m4
|
||||
fatal-signal.m4
|
||||
fcntl-o.m4
|
||||
fcntl.m4
|
||||
fcntl_h.m4
|
||||
fopen.m4
|
||||
getdtablesize.m4
|
||||
getopt.m4
|
||||
getpagesize.m4
|
||||
gettext.m4
|
||||
gnulib-cache.m4
|
||||
gnulib-common.m4
|
||||
@@ -29,6 +41,7 @@ javaexec.m4
|
||||
lib-ld.m4
|
||||
lib-link.m4
|
||||
lib-prefix.m4
|
||||
libunistring-base.m4
|
||||
localcharset.m4
|
||||
locale-fr.m4
|
||||
locale-ja.m4
|
||||
@@ -39,19 +52,37 @@ mbrtowc.m4
|
||||
mbsinit.m4
|
||||
mbstate_t.m4
|
||||
mbswidth.m4
|
||||
memchr.m4
|
||||
mmap-anon.m4
|
||||
mode_t.m4
|
||||
multiarch.m4
|
||||
nls.m4
|
||||
open.m4
|
||||
pipe.m4
|
||||
pipe2.m4
|
||||
po.m4
|
||||
posix_spawn.m4
|
||||
progtest.m4
|
||||
quote.m4
|
||||
quotearg.m4
|
||||
rawmemchr.m4
|
||||
sched_h.m4
|
||||
setenv.m4
|
||||
sig_atomic_t.m4
|
||||
sigaction.m4
|
||||
signal_h.m4
|
||||
signalblocking.m4
|
||||
spawn_h.m4
|
||||
stat.m4
|
||||
stdbool.m4
|
||||
stddef_h.m4
|
||||
stdint.m4
|
||||
stdint_h.m4
|
||||
stdio-safer.m4
|
||||
stdio_h.m4
|
||||
stdlib_h.m4
|
||||
stpcpy.m4
|
||||
strchrnul.m4
|
||||
strerror.m4
|
||||
string_h.m4
|
||||
strndup.m4
|
||||
@@ -59,15 +90,22 @@ strnlen.m4
|
||||
strtol.m4
|
||||
strtoul.m4
|
||||
strverscmp.m4
|
||||
sys_stat_h.m4
|
||||
sys_wait_h.m4
|
||||
threadlib.m4
|
||||
time_h.m4
|
||||
unistd-safer.m4
|
||||
unistd_h.m4
|
||||
unlocked-io.m4
|
||||
wait-process.m4
|
||||
warn-on-use.m4
|
||||
warning.m4
|
||||
warnings.m4
|
||||
wchar.m4
|
||||
wchar_h.m4
|
||||
wchar_t.m4
|
||||
wctype.m4
|
||||
wctype_h.m4
|
||||
wcwidth.m4
|
||||
wint_t.m4
|
||||
xalloc.m4
|
||||
|
||||
@@ -1,16 +1,28 @@
|
||||
/00gnulib.m4
|
||||
/absolute-header.m4
|
||||
/alloca.m4
|
||||
/argmatch.m4
|
||||
/asm-underscore.m4
|
||||
/assert.m4
|
||||
/cloexec.m4
|
||||
/config-h.m4
|
||||
/dirname.m4
|
||||
/dos.m4
|
||||
/double-slash-root.m4
|
||||
/dup2.m4
|
||||
/environ.m4
|
||||
/errno_h.m4
|
||||
/error.m4
|
||||
/exitfail.m4
|
||||
/extensions.m4
|
||||
/fatal-signal.m4
|
||||
/fcntl-o.m4
|
||||
/fcntl.m4
|
||||
/fcntl_h.m4
|
||||
/fopen.m4
|
||||
/getdtablesize.m4
|
||||
/getopt.m4
|
||||
/getpagesize.m4
|
||||
/gettext.m4
|
||||
/gnulib-cache.m4
|
||||
/gnulib-common.m4
|
||||
@@ -29,6 +41,7 @@
|
||||
/lib-ld.m4
|
||||
/lib-link.m4
|
||||
/lib-prefix.m4
|
||||
/libunistring-base.m4
|
||||
/localcharset.m4
|
||||
/locale-fr.m4
|
||||
/locale-ja.m4
|
||||
@@ -39,19 +52,37 @@
|
||||
/mbsinit.m4
|
||||
/mbstate_t.m4
|
||||
/mbswidth.m4
|
||||
/memchr.m4
|
||||
/mmap-anon.m4
|
||||
/mode_t.m4
|
||||
/multiarch.m4
|
||||
/nls.m4
|
||||
/open.m4
|
||||
/pipe.m4
|
||||
/pipe2.m4
|
||||
/po.m4
|
||||
/posix_spawn.m4
|
||||
/progtest.m4
|
||||
/quote.m4
|
||||
/quotearg.m4
|
||||
/rawmemchr.m4
|
||||
/sched_h.m4
|
||||
/setenv.m4
|
||||
/sig_atomic_t.m4
|
||||
/sigaction.m4
|
||||
/signal_h.m4
|
||||
/signalblocking.m4
|
||||
/spawn_h.m4
|
||||
/stat.m4
|
||||
/stdbool.m4
|
||||
/stddef_h.m4
|
||||
/stdint.m4
|
||||
/stdint_h.m4
|
||||
/stdio-safer.m4
|
||||
/stdio_h.m4
|
||||
/stdlib_h.m4
|
||||
/stpcpy.m4
|
||||
/strchrnul.m4
|
||||
/strerror.m4
|
||||
/string_h.m4
|
||||
/strndup.m4
|
||||
@@ -59,15 +90,22 @@
|
||||
/strtol.m4
|
||||
/strtoul.m4
|
||||
/strverscmp.m4
|
||||
/sys_stat_h.m4
|
||||
/sys_wait_h.m4
|
||||
/threadlib.m4
|
||||
/time_h.m4
|
||||
/unistd-safer.m4
|
||||
/unistd_h.m4
|
||||
/unlocked-io.m4
|
||||
/wait-process.m4
|
||||
/warn-on-use.m4
|
||||
/warning.m4
|
||||
/warnings.m4
|
||||
/wchar.m4
|
||||
/wchar_h.m4
|
||||
/wchar_t.m4
|
||||
/wctype.m4
|
||||
/wctype_h.m4
|
||||
/wcwidth.m4
|
||||
/wint_t.m4
|
||||
/xalloc.m4
|
||||
|
||||
+3
-1
@@ -1,5 +1,7 @@
|
||||
# bison-i18n.m4 serial 2
|
||||
dnl Copyright (C) 2005-2006 Free Software Foundation, Inc.
|
||||
|
||||
dnl Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
# Sanity test a C compiler.
|
||||
|
||||
# Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- Autoconf -*-
|
||||
# Sanity-test a C++ compiler.
|
||||
#
|
||||
# Copyright (C) 2004, 2006 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2004, 2006, 2009, 2010 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,33 +1,60 @@
|
||||
# m4.m4 serial 5
|
||||
dnl Copyright (C) 2000, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
# m4.m4 serial 10
|
||||
|
||||
# Copyright (C) 2000, 2006, 2007, 2008, 2009, 2010 Free Software
|
||||
# Foundation, Inc.
|
||||
|
||||
# Copying and distribution of this file, with or without modification,
|
||||
# are permitted in any medium without royalty provided the copyright
|
||||
# notice and this notice are preserved. This file is offered as-is,
|
||||
# without warranty of any kind.
|
||||
|
||||
# AC_PROG_GNU_M4
|
||||
# --------------
|
||||
# Check for GNU M4, at least 1.4.5 (all earlier versions had a bug in
|
||||
# trace support:
|
||||
# http://lists.gnu.org/archive/html/bug-gnu-utils/2006-11/msg00096.html)
|
||||
# Check for GNU M4, at least 1.4.6 (all earlier versions had bugs in
|
||||
# trace support and regexp support):
|
||||
# http://lists.gnu.org/archive/html/bug-gnu-utils/2006-11/msg00096.html
|
||||
# http://lists.gnu.org/archive/html/bug-autoconf/2009-07/msg00023.html
|
||||
# Also, check whether --error-output (through 1.4.x) or --debugfile (2.0)
|
||||
# is supported, and AC_SUBST M4_DEBUGFILE accordingly.
|
||||
AC_DEFUN([AC_PROG_GNU_M4],
|
||||
[AC_ARG_VAR([M4], [Location of GNU M4 1.4.5 or later. Defaults to the first
|
||||
[AC_ARG_VAR([M4], [Location of GNU M4 1.4.6 or later. Defaults to the first
|
||||
program of `m4', `gm4', or `gnum4' on PATH that meets Autoconf needs.])
|
||||
AC_CACHE_CHECK([for GNU M4 that supports accurate traces], [ac_cv_path_M4],
|
||||
[rm -f conftest.m4f
|
||||
ac_had_posixly_correct=${POSIXLY_CORRECT:+yes}
|
||||
AS_UNSET([POSIXLY_CORRECT])
|
||||
AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4 gnum4],
|
||||
[dnl Creative quoting here to avoid raw dnl and ifdef in configure.
|
||||
# Root out GNU M4 1.4.4, as well as non-GNU m4 that ignore -t, -F.
|
||||
ac_snippet=change'quote(<,>)in''dir(<if''def>,mac,bug)d'nl
|
||||
# Root out GNU M4 1.4.5, as well as non-GNU m4 that ignore -t, -F.
|
||||
ac_snippet=change'quote(<,>)in''dir(<if''def>,mac,bug)'
|
||||
ac_snippet=${ac_snippet}pat'subst(a,\(b\)\|\(a\),\1)d'nl
|
||||
test -z "`$ac_path_M4 -F conftest.m4f </dev/null 2>&1`" \
|
||||
&& test -z "`echo $ac_snippet | $ac_path_M4 --trace=mac 2>&1`" \
|
||||
&& test -z "`AS_ECHO([$ac_snippet]) | $ac_path_M4 --trace=mac 2>&1`" \
|
||||
&& test -f conftest.m4f \
|
||||
&& ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:
|
||||
rm -f conftest.m4f],
|
||||
[AC_MSG_ERROR([no acceptable m4 could be found in \$PATH.
|
||||
GNU M4 1.4.5 or later is required; 1.4.11 is recommended])])])
|
||||
GNU M4 1.4.6 or later is required; 1.4.13 is recommended])])])
|
||||
M4=$ac_cv_path_M4
|
||||
AC_CACHE_CHECK([whether $ac_cv_path_M4 accepts --gnu],
|
||||
[ac_cv_prog_gnu_m4_gnu],
|
||||
[case `$M4 --help < /dev/null 2>&1` in
|
||||
*--gnu*) ac_cv_prog_gnu_m4_gnu=yes ;;
|
||||
*) ac_cv_prog_gnu_m4_gnu=no ;;
|
||||
esac])
|
||||
if test "$ac_cv_prog_gnu_m4_gnu" = yes; then
|
||||
M4_GNU=--gnu
|
||||
else
|
||||
M4_GNU=
|
||||
fi
|
||||
AC_SUBST([M4_GNU])
|
||||
if test x$ac_had_posixly_correct = xyes; then
|
||||
POSIXLY_CORRECT=:
|
||||
if test $ac_cv_prog_gnu_m4_gnu = no; then
|
||||
AC_MSG_WARN([The version of M4 that was found does not support -g.])
|
||||
AC_MSG_WARN([Using it with POSIXLY_CORRECT set may cause problems.])
|
||||
fi
|
||||
fi
|
||||
AC_CACHE_CHECK([how m4 supports trace files], [ac_cv_prog_gnu_m4_debugfile],
|
||||
[case `$M4 --help < /dev/null 2>&1` in
|
||||
*debugfile*) ac_cv_prog_gnu_m4_debugfile=--debugfile ;;
|
||||
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
# -*- Autoconf -*-
|
||||
# Checks required to run `subpipe'.
|
||||
#
|
||||
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2002, 2003, 2005, 2009, 2010 Free Software Foundation,
|
||||
# Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
# -*- Autoconf -*-
|
||||
# Checks required to run `timevar', a time tracker.
|
||||
#
|
||||
# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2002, 2003, 2009, 2010 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,858 +0,0 @@
|
||||
# -*-Makefile-*-
|
||||
# This Makefile fragment tries to be general-purpose enough to be
|
||||
# used by at least coreutils, idutils, CPPI, Bison, and Autoconf.
|
||||
|
||||
## Copyright (C) 2001-2008 Free Software Foundation, Inc.
|
||||
##
|
||||
## This program 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 3 of the License, or
|
||||
## (at your option) any later version.
|
||||
##
|
||||
## This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# This is reported not to work with make-3.79.1
|
||||
# ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
|
||||
ME := maint.mk
|
||||
|
||||
# Do not save the original name or timestamp in the .tar.gz file.
|
||||
# Use --rsyncable if available.
|
||||
gzip_rsyncable := \
|
||||
$(shell gzip --help 2>/dev/null|grep rsyncable >/dev/null && echo --rsyncable)
|
||||
GZIP_ENV = '--no-name --best $(gzip_rsyncable)'
|
||||
|
||||
GIT = git
|
||||
VC = $(GIT)
|
||||
VC-tag = git tag -s -m '$(VERSION)'
|
||||
|
||||
VC_LIST = build-aux/vc-list-files
|
||||
|
||||
VC_LIST_EXCEPT = \
|
||||
$(VC_LIST) | if test -f .x-$@; then grep -vEf .x-$@; else grep -v ChangeLog; fi
|
||||
|
||||
ifeq ($(origin prev_version_file), undefined)
|
||||
prev_version_file = $(srcdir)/.prev-version
|
||||
endif
|
||||
|
||||
PREV_VERSION := $(shell cat $(prev_version_file))
|
||||
VERSION_REGEXP = $(subst .,\.,$(VERSION))
|
||||
PREV_VERSION_REGEXP = $(subst .,\.,$(PREV_VERSION))
|
||||
|
||||
ifeq ($(VC),$(GIT))
|
||||
this-vc-tag = v$(VERSION)
|
||||
this-vc-tag-regexp = v$(VERSION_REGEXP)
|
||||
else
|
||||
tag-package = $(shell echo "$(PACKAGE)" | tr '[:lower:]' '[:upper:]')
|
||||
tag-this-version = $(subst .,_,$(VERSION))
|
||||
this-vc-tag = $(tag-package)-$(tag-this-version)
|
||||
this-vc-tag-regexp = $(this-vc-tag)
|
||||
endif
|
||||
my_distdir = $(PACKAGE)-$(VERSION)
|
||||
|
||||
# Old releases are stored here.
|
||||
release_archive_dir ?= ../release
|
||||
|
||||
# Prevent programs like 'sort' from considering distinct strings to be equal.
|
||||
# Doing it here saves us from having to set LC_ALL elsewhere in this file.
|
||||
export LC_ALL = C
|
||||
|
||||
|
||||
|
||||
## --------------- ##
|
||||
## Sanity checks. ##
|
||||
## --------------- ##
|
||||
|
||||
# Collect the names of rules starting with `sc_'.
|
||||
syntax-check-rules := $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' \
|
||||
$(srcdir)/$(ME))
|
||||
.PHONY: $(syntax-check-rules)
|
||||
|
||||
local-checks-available = \
|
||||
po-check copyright-check m4-check author_mark_check \
|
||||
patch-check strftime-check $(syntax-check-rules) \
|
||||
makefile_path_separator_check \
|
||||
makefile-check check-AUTHORS
|
||||
.PHONY: $(local-checks-available)
|
||||
|
||||
local-check := $(filter-out $(local-checks-to-skip), $(local-checks-available))
|
||||
|
||||
syntax-check: $(local-check)
|
||||
# @grep -nE '# *include <(limits|std(def|arg|bool))\.h>' \
|
||||
# $$(find -type f -name '*.[chly]') && \
|
||||
# { echo '$(ME): found conditional include' 1>&2; \
|
||||
# exit 1; } || :
|
||||
|
||||
# grep -nE '^# *include <(string|stdlib)\.h>' \
|
||||
# $(srcdir)/{lib,src}/*.[chy] && \
|
||||
# { echo '$(ME): FIXME' 1>&2; \
|
||||
# exit 1; } || :
|
||||
# FIXME: don't allow `#include .strings\.h' anywhere
|
||||
|
||||
sc_avoid_if_before_free:
|
||||
@$(srcdir)/build-aux/useless-if-before-free \
|
||||
$(useless_free_options) \
|
||||
$$($(VC_LIST_EXCEPT)) && \
|
||||
{ echo '$(ME): found useless "if" before "free" above' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
sc_cast_of_argument_to_free:
|
||||
@grep -nE '\<free *\( *\(' $$($(VC_LIST_EXCEPT)) && \
|
||||
{ echo '$(ME): don'\''t cast free argument' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
sc_cast_of_x_alloc_return_value:
|
||||
@grep -nE '\*\) *x(m|c|re)alloc\>' $$($(VC_LIST_EXCEPT)) && \
|
||||
{ echo '$(ME): don'\''t cast x*alloc return value' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
sc_cast_of_alloca_return_value:
|
||||
@grep -nE '\*\) *alloca\>' $$($(VC_LIST_EXCEPT)) && \
|
||||
{ echo '$(ME): don'\''t cast alloca return value' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
sc_space_tab:
|
||||
@grep -n '[ ] ' $$($(VC_LIST_EXCEPT)) && \
|
||||
{ echo '$(ME): found SPACE-TAB sequence; remove the SPACE' \
|
||||
1>&2; exit 1; } || :
|
||||
|
||||
# Don't use *scanf or the old ato* functions in `real' code.
|
||||
# They provide no error checking mechanism.
|
||||
# Instead, use strto* functions.
|
||||
sc_prohibit_atoi_atof:
|
||||
@grep -nE '\<([fs]?scanf|ato([filq]|ll))\>' $$($(VC_LIST_EXCEPT)) && \
|
||||
{ echo '$(ME): do not use *scan''f, ato''f, ato''i, ato''l, ato''ll, ato''q, or ss''canf' \
|
||||
1>&2; exit 1; } || :
|
||||
|
||||
# Use STREQ rather than comparing strcmp == 0, or != 0.
|
||||
sc_prohibit_strcmp:
|
||||
@grep -nE '! *str''cmp *\(|\<str''cmp *\([^)]+\) *==' \
|
||||
$$($(VC_LIST_EXCEPT)) && \
|
||||
{ echo '$(ME): use STREQ in place of the above uses of str''cmp' \
|
||||
1>&2; exit 1; } || :
|
||||
|
||||
# Using EXIT_SUCCESS as the first argument to error is misleading,
|
||||
# since when that parameter is 0, error does not exit. Use `0' instead.
|
||||
sc_error_exit_success:
|
||||
@grep -nF 'error (EXIT_SUCCESS,' \
|
||||
$$(find -type f -name '*.[chly]') && \
|
||||
{ echo '$(ME): found error (EXIT_SUCCESS' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
# `FATAL:' should be fully upper-cased in error messages
|
||||
# `WARNING:' should be fully upper-cased, or fully lower-cased
|
||||
sc_error_message_warn_fatal:
|
||||
@grep -nEA2 '[^rp]error \(' $$($(VC_LIST_EXCEPT)) \
|
||||
| grep -E '"Warning|"Fatal|"fatal' && \
|
||||
{ echo '$(ME): use FATAL, WARNING or warning' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
# Error messages should not start with a capital letter
|
||||
sc_error_message_uppercase:
|
||||
@grep -nEA2 '[^rp]error \(' $$($(VC_LIST_EXCEPT)) \
|
||||
| grep -E '"[A-Z]' \
|
||||
| grep -vE '"FATAL|"WARNING|"Java|"C#|PRIuMAX' && \
|
||||
{ echo '$(ME): found capitalized error message' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
# Error messages should not end with a period
|
||||
sc_error_message_period:
|
||||
@grep -nEA2 '[^rp]error \(' $$($(VC_LIST_EXCEPT)) \
|
||||
| grep -E '[^."]\."' && \
|
||||
{ echo '$(ME): found error message ending in period' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
sc_file_system:
|
||||
@grep -ni 'file''system' $$($(VC_LIST_EXCEPT)) && \
|
||||
{ echo '$(ME): found use of "file''system";' \
|
||||
'rewrite to use "file system"' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
# Don't use cpp tests of this symbol. All code assumes config.h is included.
|
||||
sc_no_have_config_h:
|
||||
@grep -n '^# *if.*HAVE''_CONFIG_H' $$($(VC_LIST_EXCEPT)) && \
|
||||
{ echo '$(ME): found use of HAVE''_CONFIG_H; remove' \
|
||||
1>&2; exit 1; } || :
|
||||
|
||||
# Nearly all .c files must include <config.h>.
|
||||
sc_require_config_h:
|
||||
@if $(VC_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \
|
||||
grep -L '^# *include <config\.h>' \
|
||||
$$($(VC_LIST_EXCEPT) | grep '\.c$$') \
|
||||
| grep . && \
|
||||
{ echo '$(ME): the above files do not include <config.h>' \
|
||||
1>&2; exit 1; } || :; \
|
||||
else :; \
|
||||
fi
|
||||
|
||||
# To use this "command" macro, you must first define two shell variables:
|
||||
# h: the header, enclosed in <> or ""
|
||||
# re: a regular expression that matches IFF something provided by $h is used.
|
||||
define _header_without_use
|
||||
h_esc=`echo "$$h"|sed 's/\./\\./'`; \
|
||||
if $(VC_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \
|
||||
files=$$(grep -l '^# *include '"$$h_esc" \
|
||||
$$($(VC_LIST_EXCEPT) | grep '\.c$$')) && \
|
||||
grep -LE "$$re" $$files | grep . && \
|
||||
{ echo "$(ME): the above files include $$h but don't use it" \
|
||||
1>&2; exit 1; } || :; \
|
||||
else :; \
|
||||
fi
|
||||
endef
|
||||
|
||||
# Prohibit the inclusion of assert.h without an actual use of assert.
|
||||
sc_prohibit_assert_without_use:
|
||||
@h='<assert.h>' re='\<assert *\(' $(_header_without_use)
|
||||
|
||||
# Prohibit the inclusion of getopt.h without an actual use.
|
||||
sc_prohibit_getopt_without_use:
|
||||
@h='<getopt.h>' re='\<getopt(_long)? *\(' $(_header_without_use)
|
||||
|
||||
# Don't include quotearg.h unless you use one of its functions.
|
||||
sc_prohibit_quotearg_without_use:
|
||||
@h='"quotearg.h"' re='\<quotearg(_[^ ]+)? *\(' $(_header_without_use)
|
||||
|
||||
# Don't include quote.h unless you use one of its functions.
|
||||
sc_prohibit_quote_without_use:
|
||||
@h='"quote.h"' re='\<quote(_n)? *\(' $(_header_without_use)
|
||||
|
||||
# Don't include this header unless you use one of its functions.
|
||||
sc_prohibit_long_options_without_use:
|
||||
@h='"long-options.h"' re='\<parse_long_options *\(' \
|
||||
$(_header_without_use)
|
||||
|
||||
# Don't include this header unless you use one of its functions.
|
||||
sc_prohibit_inttostr_without_use:
|
||||
@h='"inttostr.h"' re='\<(off|[iu]max|uint)tostr *\(' \
|
||||
$(_header_without_use)
|
||||
|
||||
# Don't include this header unless you use one of its functions.
|
||||
sc_prohibit_error_without_use:
|
||||
@h='"error.h"' \
|
||||
re='\<error(_at_line|_print_progname|_one_per_line|_message_count)? *\('\
|
||||
$(_header_without_use)
|
||||
|
||||
sc_prohibit_safe_read_without_use:
|
||||
@h='"safe-read.h"' re='(\<SAFE_READ_ERROR\>|\<safe_read *\()' \
|
||||
$(_header_without_use)
|
||||
|
||||
sc_prohibit_argmatch_without_use:
|
||||
@h='"argmatch.h"' \
|
||||
re='(\<(ARRAY_CARDINALITY|X?ARGMATCH(|_TO_ARGUMENT|_VERIFY))\>|\<argmatch(_exit_fn|_(in)?valid) *\()' \
|
||||
$(_header_without_use)
|
||||
|
||||
sc_prohibit_root_dev_ino_without_use:
|
||||
@h='"root-dev-ino.h"' \
|
||||
re='(\<ROOT_DEV_INO_(CHECK|WARN)\>|\<get_root_dev_ino *\()' \
|
||||
$(_header_without_use)
|
||||
|
||||
sc_obsolete_symbols:
|
||||
@grep -nE '\<(HAVE''_FCNTL_H|O''_NDELAY)\>' \
|
||||
$$($(VC_LIST_EXCEPT)) && \
|
||||
{ echo '$(ME): do not use HAVE''_FCNTL_H or O''_NDELAY' \
|
||||
1>&2; exit 1; } || :
|
||||
|
||||
# FIXME: warn about definitions of EXIT_FAILURE, EXIT_SUCCESS, STREQ
|
||||
|
||||
# Each nonempty line must start with a year number, or a TAB.
|
||||
sc_changelog:
|
||||
@grep -n '^[^12 ]' $$(find . -maxdepth 2 -name ChangeLog) && \
|
||||
{ echo '$(ME): found unexpected prefix in a ChangeLog' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
# Ensure that dd's definition of LONGEST_SYMBOL stays in sync
|
||||
# with the strings from the two affected variables.
|
||||
dd_c = $(srcdir)/src/dd.c
|
||||
sc_dd_max_sym_length:
|
||||
ifneq ($(wildcard $(dd_c)),)
|
||||
@len=$$( (sed -n '/conversions\[\] =$$/,/^};/p' $(dd_c);\
|
||||
sed -n '/flags\[\] =$$/,/^};/p' $(dd_c) ) \
|
||||
|sed -n '/"/s/^[^"]*"\([^"]*\)".*/\1/p' \
|
||||
| wc --max-line-length); \
|
||||
max=$$(sed -n '/^#define LONGEST_SYMBOL /s///p' $(dd_c) \
|
||||
|tr -d '"' | wc --max-line-length); \
|
||||
if test "$$len" = "$$max"; then :; else \
|
||||
echo 'dd.c: LONGEST_SYMBOL is not longest' 1>&2; \
|
||||
exit 1; \
|
||||
fi
|
||||
endif
|
||||
|
||||
# Many m4 macros names once began with `jm_'.
|
||||
# On 2004-04-13, they were all changed to start with gl_ instead.
|
||||
# Make sure that none are inadvertently reintroduced.
|
||||
sc_prohibit_jm_in_m4:
|
||||
@grep -nE 'jm_[A-Z]' \
|
||||
$$($(VC_LIST) m4 |grep '\.m4$$'; echo /dev/null) && \
|
||||
{ echo '$(ME): do not use jm_ in m4 macro names' \
|
||||
1>&2; exit 1; } || :
|
||||
|
||||
# Ensure that each root-requiring test is run via the "check-root" rule.
|
||||
sc_root_tests:
|
||||
@if test -d tests \
|
||||
&& grep check-root tests/Makefile.am>/dev/null 2>&1; then \
|
||||
t1=sc-root.expected; t2=sc-root.actual; \
|
||||
grep -nl '^require_root_$$' \
|
||||
$$($(VC_LIST) tests) |sed s,tests/,, |sort > $$t1; \
|
||||
sed -n '/^root_tests =[ ]*\\$$/,/[^\]$$/p' \
|
||||
$(srcdir)/tests/Makefile.am \
|
||||
| sed 's/^ *//;/^root_tests =/d' \
|
||||
| tr -s '\012\\' ' ' | fmt -1 | sort > $$t2; \
|
||||
diff -u $$t1 $$t2 || diff=1; \
|
||||
rm -f $$t1 $$t2; \
|
||||
test "$$diff" \
|
||||
&& { echo 'tests/Makefile.am: missing check-root action'>&2; \
|
||||
exit 1; } || :; \
|
||||
fi
|
||||
|
||||
headers_with_interesting_macro_defs = \
|
||||
exit.h \
|
||||
fcntl_.h \
|
||||
fnmatch_.h \
|
||||
intprops.h \
|
||||
inttypes_.h \
|
||||
lchown.h \
|
||||
openat.h \
|
||||
stat-macros.h \
|
||||
stdint_.h
|
||||
|
||||
# Create a list of regular expressions matching the names
|
||||
# of macros that are guaranteed by parts of gnulib to be defined.
|
||||
.re-defmac:
|
||||
@(cd $(srcdir)/lib; \
|
||||
for f in $(headers_with_interesting_macro_defs); do \
|
||||
test -f $$f && \
|
||||
sed -n '/^# *define \([^_ (][^ (]*\)[ (].*/s//\1/p' $$f; \
|
||||
done; \
|
||||
) | sort -u \
|
||||
| grep -Ev 'ATTRIBUTE_NORETURN|SIZE_MAX' \
|
||||
| sed 's/^/^# *define /' \
|
||||
> $@-t
|
||||
@mv $@-t $@
|
||||
|
||||
# Don't define macros that we already get from gnulib header files.
|
||||
sc_always_defined_macros: .re-defmac
|
||||
@if test -f $(srcdir)/src/system.h; then \
|
||||
trap 'rc=$$?; rm -f .re-defmac; exit $$rc' 0 1 2 3 15; \
|
||||
grep -f .re-defmac $$($(VC_LIST)) \
|
||||
&& { echo '$(ME): define the above via some gnulib .h file' \
|
||||
1>&2; exit 1; } || :; \
|
||||
fi
|
||||
|
||||
# Create a list of regular expressions matching the names
|
||||
# of files included from system.h. Exclude a couple.
|
||||
.re-list:
|
||||
@sed -n '/^# *include /s///p' $(srcdir)/src/system.h \
|
||||
| grep -Ev 'sys/(param|file)\.h' \
|
||||
| sed 's/ .*//;;s/^["<]/^# *include [<"]/;s/\.h[">]$$/\\.h[">]/' \
|
||||
> $@-t
|
||||
@mv $@-t $@
|
||||
|
||||
# Files in src/ should not include directly any of
|
||||
# the headers already included via system.h.
|
||||
sc_system_h_headers: .re-list
|
||||
@if test -f $(srcdir)/src/system.h; then \
|
||||
trap 'rc=$$?; rm -f .re-list; exit $$rc' 0 1 2 3 15; \
|
||||
grep -nE -f .re-list \
|
||||
$$($(VC_LIST) src | \
|
||||
grep -Ev '((copy|system)\.h|parse-gram\.c)$$') \
|
||||
&& { echo '$(ME): the above are already included via system.h'\
|
||||
1>&2; exit 1; } || :; \
|
||||
fi
|
||||
|
||||
# Ensure that each .c file containing a "main" function also
|
||||
# calls set_program_name.
|
||||
sc_program_name:
|
||||
@if $(VC_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \
|
||||
files=$$(grep -l '^main *(' $$($(VC_LIST_EXCEPT) | grep '\.c$$')); \
|
||||
grep -LE 'set_program_name *\(m?argv\[0\]\);' $$files \
|
||||
| grep . && \
|
||||
{ echo '$(ME): the above files do not call set_program_name' \
|
||||
1>&2; exit 1; } || :; \
|
||||
else :; \
|
||||
fi
|
||||
|
||||
# Require that the final line of each test-lib.sh-using test be this one:
|
||||
# (exit $fail); exit $fail
|
||||
# Note: this test requires GNU grep's --label= option.
|
||||
sc_require_test_exit_idiom:
|
||||
@if test -f $(srcdir)/tests/test-lib.sh; then \
|
||||
die=0; \
|
||||
for i in $$(grep -l -F /../test-lib.sh $$($(VC_LIST) tests)); do \
|
||||
tail -n1 $$i | grep '^(exit \$$fail); exit \$$fail$$' > /dev/null \
|
||||
&& : || { die=1; echo $$i; } \
|
||||
done; \
|
||||
test $$die = 1 && \
|
||||
{ echo 1>&2 '$(ME): the final line in each of the above is not:'; \
|
||||
echo 1>&2 '(exit $$fail); exit $$fail'; \
|
||||
exit 1; } || :; \
|
||||
fi
|
||||
|
||||
sc_sun_os_names:
|
||||
@grep -nEi \
|
||||
'solaris[^[:alnum:]]*2\.(7|8|9|[1-9][0-9])|sunos[^[:alnum:]][6-9]' \
|
||||
$$($(VC_LIST_EXCEPT)) && \
|
||||
{ echo '$(ME): found misuse of Sun OS version numbers' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
sc_the_the:
|
||||
@grep -ni '\<the ''the\>' $$($(VC_LIST_EXCEPT)) && \
|
||||
{ echo '$(ME): found use of "the ''the";' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
sc_tight_scope:
|
||||
$(MAKE) -C src $@
|
||||
|
||||
sc_trailing_blank:
|
||||
@grep -n '[ ]$$' $$($(VC_LIST_EXCEPT)) && \
|
||||
{ echo '$(ME): found trailing blank(s)' \
|
||||
1>&2; exit 1; } || :
|
||||
|
||||
# Match lines like the following, but where there is only one space
|
||||
# between the options and the description:
|
||||
# -D, --all-repeated[=delimit-method] print all duplicate lines\n
|
||||
longopt_re = --[a-z][0-9A-Za-z-]*(\[?=[0-9A-Za-z-]*\]?)?
|
||||
sc_two_space_separator_in_usage:
|
||||
@grep -nE '^ *(-[A-Za-z],)? $(longopt_re) [^ ].*\\$$' \
|
||||
$$($(VC_LIST_EXCEPT)) && \
|
||||
{ echo "$(ME): help2man requires at least two spaces between"; \
|
||||
echo "$(ME): an option and its description"; \
|
||||
1>&2; exit 1; } || :
|
||||
|
||||
# Look for diagnostics that aren't marked for translation.
|
||||
# This won't find any for which error's format string is on a separate line.
|
||||
sc_unmarked_diagnostics:
|
||||
@grep -nE \
|
||||
'\<error \([^"]*"[^"]*[a-z]{3}' $$($(VC_LIST_EXCEPT)) \
|
||||
| grep -v '_''(' && \
|
||||
{ echo '$(ME): found unmarked diagnostic(s)' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
# Avoid useless parentheses like those in this example:
|
||||
# #if defined (SYMBOL) || defined (SYM2)
|
||||
sc_useless_cpp_parens:
|
||||
@grep -n '^# *if .*defined *(' $$($(VC_LIST_EXCEPT)) && \
|
||||
{ echo '$(ME): found useless parentheses in cpp directive' \
|
||||
1>&2; exit 1; } || :
|
||||
|
||||
# Require the latest GPL.
|
||||
sc_GPL_version:
|
||||
@grep -n 'either ''version [^3]' $$($(VC_LIST_EXCEPT)) && \
|
||||
{ echo '$(ME): GPL vN, N!=3' 1>&2; exit 1; } || :
|
||||
|
||||
# Perl-based tests used to exec perl from a #!/bin/sh script.
|
||||
# Now they all start with #!/usr/bin/perl and the portability
|
||||
# infrastructure is in tests/Makefile.am. Make sure no old-style
|
||||
# script sneaks back in.
|
||||
sc_no_exec_perl_coreutils:
|
||||
@if test -f $(srcdir)/tests/Coreutils.pm; then \
|
||||
grep '^exec *\$$PERL.*MCoreutils' $$($(VC_LIST) tests) && \
|
||||
{ echo 1>&2 '$(ME): found anachronistic Perl-based tests'; \
|
||||
exit 1; } || :; \
|
||||
fi
|
||||
|
||||
NEWS_hash = \
|
||||
$$(sed -n '/^\*.* $(PREV_VERSION_REGEXP) ([0-9-]*)/,$$p' \
|
||||
$(srcdir)/NEWS | md5sum -)
|
||||
|
||||
# Ensure that we don't accidentally insert an entry into an old NEWS block.
|
||||
sc_immutable_NEWS:
|
||||
@if test -f $(srcdir)/NEWS; then \
|
||||
test "$(NEWS_hash)" = '$(old_NEWS_hash)' && : || \
|
||||
{ echo '$(ME): you have modified old NEWS' 1>&2; exit 1; }; \
|
||||
fi
|
||||
|
||||
# Each program that uses proper_name_utf8 must link with
|
||||
# one of the ICONV libraries.
|
||||
sc_proper_name_utf8_requires_ICONV:
|
||||
@progs=$$(grep -l 'proper_name_utf8 ''("' $$($(VC_LIST_EXCEPT)));\
|
||||
if test "x$$progs" != x; then \
|
||||
fail=0; \
|
||||
for p in $$progs; do \
|
||||
dir=$$(dirname "$$p"); \
|
||||
base=$$(basename "$$p" .c); \
|
||||
grep "$${base}_LDADD.*ICONV)" $$dir/Makefile.am > /dev/null \
|
||||
|| { fail=1; echo 1>&2 "$(ME): $$p uses proper_name_utf8"; }; \
|
||||
done; \
|
||||
test $$fail = 1 && \
|
||||
{ echo 1>&2 '$(ME): the above do not link with any ICONV library'; \
|
||||
exit 1; } || :; \
|
||||
fi
|
||||
|
||||
# Warn about "c0nst struct Foo const foo[]",
|
||||
# but not about "char const *const foo" or "#define const const".
|
||||
sc_redundant_const:
|
||||
@grep -E '\bconst\b[[:space:][:alnum:]]{2,}\bconst\b' \
|
||||
$$($(VC_LIST_EXCEPT)) && \
|
||||
{ echo 1>&2 '$(ME): redundant "const" in declarations'; \
|
||||
exit 1; } || :
|
||||
|
||||
sc_const_long_option:
|
||||
@grep '^ *static.*struct option ' $$($(VC_LIST_EXCEPT)) \
|
||||
| grep -Ev 'const struct option|struct option const' && { \
|
||||
echo 1>&2 '$(ME): add "const" to the above declarations'; \
|
||||
exit 1; } || :
|
||||
|
||||
# Update the hash stored above. Do this after each release and
|
||||
# for any corrections to old entries.
|
||||
update-NEWS-hash: NEWS
|
||||
perl -pi -e 's/^(old_NEWS_hash = ).*/$${1}'"$(NEWS_hash)/" \
|
||||
$(srcdir)/cfg.mk
|
||||
|
||||
epoch_date = 1970-01-01 00:00:00.000000000 +0000
|
||||
# Ensure that the c99-to-c89 patch applies cleanly.
|
||||
patch-check:
|
||||
rm -rf src-c89 $@.1 $@.2
|
||||
cp -a src src-c89
|
||||
(cd src-c89; patch -p1 -V never --fuzz=0) < src/c99-to-c89.diff \
|
||||
> $@.1 2>&1
|
||||
if test "$(REGEN_PATCH)" = yes; then \
|
||||
diff -upr src src-c89 | sed 's,src-c89/,src/,' \
|
||||
| grep -vE '^(Only in|File )' \
|
||||
| perl -pe 's/^((?:\+\+\+|---) \S+\t).*/$${1}$(epoch_date)/;' \
|
||||
-e 's/^ $$//' \
|
||||
> new-diff || : ; fi
|
||||
grep -v '^patching file ' $@.1 > $@.2 || :
|
||||
msg=ok; test -s $@.2 && msg='fuzzy patch' || : ; \
|
||||
rm -f src-c89/*.o || msg='rm failed'; \
|
||||
$(MAKE) -C src-c89 CFLAGS='-Wdeclaration-after-statement -Werror' \
|
||||
|| msg='compile failure with extra options'; \
|
||||
test "$$msg" = ok && rm -rf src-c89 $@.1 $@.2 || echo "$$msg" 1>&2; \
|
||||
test "$$msg" = ok
|
||||
|
||||
# Ensure that date's --help output stays in sync with the info
|
||||
# documentation for GNU strftime. The only exception is %N,
|
||||
# which date accepts but GNU strftime does not.
|
||||
extract_char = sed 's/^[^%][^%]*%\(.\).*/\1/'
|
||||
strftime-check:
|
||||
if test -f $(srcdir)/src/date.c; then \
|
||||
grep '^ %. ' $(srcdir)/src/date.c | sort \
|
||||
| $(extract_char) > $@-src; \
|
||||
{ echo N; \
|
||||
info libc date calendar format | grep '^ `%.'\' \
|
||||
| $(extract_char); } | sort > $@-info; \
|
||||
diff -u $@-src $@-info || exit 1; \
|
||||
rm -f $@-src $@-info; \
|
||||
fi
|
||||
|
||||
check-AUTHORS:
|
||||
$(MAKE) -C src $@
|
||||
|
||||
# Ensure that we use only the standard $(VAR) notation,
|
||||
# not @...@ in Makefile.am, now that we can rely on automake
|
||||
# to emit a definition for each substituted variable.
|
||||
makefile-check:
|
||||
@grep -nE '@[A-Z_0-9]+@' `find . -name Makefile.am` \
|
||||
&& { echo '$(ME): use $$(...), not @...@' 1>&2; exit 1; } || :
|
||||
|
||||
news-date-check: NEWS
|
||||
today=`date +%Y-%m-%d`; \
|
||||
if head NEWS | grep '^\*.* $(VERSION_REGEXP) ('$$today')' \
|
||||
>/dev/null; then \
|
||||
:; \
|
||||
else \
|
||||
echo "version or today's date is not in NEWS" 1>&2; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
changelog-check:
|
||||
if head ChangeLog | grep 'Version $(VERSION_REGEXP)\.$$' \
|
||||
>/dev/null; then \
|
||||
:; \
|
||||
else \
|
||||
echo "$(VERSION) not in ChangeLog" 1>&2; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
m4-check:
|
||||
@grep -n 'AC_DEFUN([^[]' m4/*.m4 \
|
||||
&& { echo '$(ME): quote the first arg to AC_DEFUN' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
# Verify that all source files using _() are listed in po/POTFILES.in.
|
||||
po-check:
|
||||
@if test -f po/POTFILES.in; then \
|
||||
grep -E -v '^(#|$$)' po/POTFILES.in \
|
||||
| grep -v '^src/false\.c$$' | sort > $@-1; \
|
||||
files=; \
|
||||
for file in $$($(VC_LIST_EXCEPT)) lib/*.[ch]; do \
|
||||
case $$file in \
|
||||
*.?|*.??) ;; \
|
||||
*) continue;; \
|
||||
esac; \
|
||||
case $$file in \
|
||||
*.[ch]) \
|
||||
base=`expr " $$file" : ' \(.*\)\..'`; \
|
||||
{ test -f $$base.l || test -f $$base.y; } && continue;; \
|
||||
esac; \
|
||||
files="$$files $$file"; \
|
||||
done; \
|
||||
grep -E -l '\b(N?_|gettext *)\([^)"]*("|$$)' $$files \
|
||||
| sort -u > $@-2; \
|
||||
diff -u $@-1 $@-2 || exit 1; \
|
||||
rm -f $@-1 $@-2; \
|
||||
fi
|
||||
|
||||
# In a definition of #define AUTHORS "... and ..." where the RHS contains
|
||||
# the English word `and', the string must be marked with `N_ (...)' so that
|
||||
# gettext recognizes it as a string requiring translation.
|
||||
author_mark_check:
|
||||
@grep -n '^# *define AUTHORS "[^"]* and ' src/*.c |grep -v ' N_ (' && \
|
||||
{ echo '$(ME): enclose the above strings in N_ (...)' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
# Sometimes it is useful to change the PATH environment variable
|
||||
# in Makefiles. When doing so, it's better not to use the Unix-centric
|
||||
# path separator of `:', but rather the automake-provided `@PATH_SEPARATOR@'.
|
||||
# It'd be better to use `find -print0 ...|xargs -0 ...', but less portable,
|
||||
# and there probably aren't many projects with so many Makefile.am files
|
||||
# that we'd have to worry about limits on command line length.
|
||||
msg = '$(ME): Do not use `:'\'' above; use @PATH_SEPARATOR@ instead'
|
||||
makefile_path_separator_check:
|
||||
@grep -n 'PATH=.*:' `find $(srcdir) -name Makefile.am` \
|
||||
&& { echo $(msg) 1>&2; exit 1; } || :
|
||||
|
||||
# Check that `make alpha' will not fail at the end of the process.
|
||||
writable-files:
|
||||
if test -d $(release_archive_dir); then :; else \
|
||||
for file in $(distdir).tar.gz \
|
||||
$(release_archive_dir)/$(distdir).tar.gz; do \
|
||||
test -e $$file || continue; \
|
||||
test -w $$file \
|
||||
|| { echo ERROR: $$file is not writable; fail=1; }; \
|
||||
done; \
|
||||
test "$$fail" && exit 1 || : ; \
|
||||
fi
|
||||
|
||||
v_etc_file = lib/version-etc.c
|
||||
sample-test = tests/sample-test
|
||||
texi = doc/$(PACKAGE).texi
|
||||
# Make sure that the copyright date in $(v_etc_file) is up to date.
|
||||
# Do the same for the $(sample-test) and the main doc/.texi file.
|
||||
copyright-check:
|
||||
@if test -f $(v_etc_file); then \
|
||||
grep 'enum { COPYRIGHT_YEAR = '$$(date +%Y)' };' $(v_etc_file) \
|
||||
>/dev/null \
|
||||
|| { echo 'out of date copyright in $(v_etc_file); update it' 1>&2; \
|
||||
exit 1; }; \
|
||||
fi
|
||||
@if test -f $(sample-test); then \
|
||||
grep '# Copyright (C) '$$(date +%Y)' Free' $(sample-test) \
|
||||
>/dev/null \
|
||||
|| { echo 'out of date copyright in $(sample-test); update it' 1>&2; \
|
||||
exit 1; }; \
|
||||
fi
|
||||
@if test -f $(texi); then \
|
||||
grep 'Copyright @copyright{} .*'$$(date +%Y)' Free' $(texi) \
|
||||
>/dev/null \
|
||||
|| { echo 'out of date copyright in $(texi); update it' 1>&2; \
|
||||
exit 1; }; \
|
||||
fi
|
||||
|
||||
vc-diff-check:
|
||||
$(VC) diff > vc-diffs || :
|
||||
if test -s vc-diffs; then \
|
||||
cat vc-diffs; \
|
||||
echo "Some files are locally modified:" 1>&2; \
|
||||
exit 1; \
|
||||
else \
|
||||
rm vc-diffs; \
|
||||
fi
|
||||
|
||||
cvs-check: vc-diff-check
|
||||
|
||||
maintainer-distcheck:
|
||||
$(MAKE) distcheck
|
||||
$(MAKE) my-distcheck
|
||||
|
||||
|
||||
# Don't make a distribution if checks fail.
|
||||
# Also, make sure the NEWS file is up-to-date.
|
||||
vc-dist: $(local-check) cvs-check maintainer-distcheck
|
||||
$(MAKE) dist
|
||||
|
||||
# Use this to make sure we don't run these programs when building
|
||||
# from a virgin tgz file, below.
|
||||
null_AM_MAKEFLAGS = \
|
||||
ACLOCAL=false \
|
||||
AUTOCONF=false \
|
||||
AUTOMAKE=false \
|
||||
AUTOHEADER=false \
|
||||
MAKEINFO=false
|
||||
|
||||
built_programs = $$(cd src && MAKEFLAGS= $(MAKE) -s built_programs.list)
|
||||
|
||||
warn_cflags = -Dlint -O -Werror -Wall -Wformat -Wshadow -Wpointer-arith
|
||||
bin=bin-$$$$
|
||||
|
||||
write_loser = printf '\#!%s\necho $$0: bad path 1>&2; exit 1\n' '$(SHELL)'
|
||||
|
||||
TMPDIR ?= /tmp
|
||||
t=$(TMPDIR)/$(PACKAGE)/test
|
||||
pfx=$(t)/i
|
||||
|
||||
# Verify that a twisted use of --program-transform-name=PROGRAM works.
|
||||
define install-transform-check
|
||||
rm -rf $(pfx); \
|
||||
$(MAKE) program_transform_name='s/.*/zyx/' \
|
||||
prefix=$(pfx) install \
|
||||
&& test "$$(echo $(pfx)/bin/*)" = "$(pfx)/bin/zyx" \
|
||||
&& test "$$(echo $(pfx)/share/man/man1/*)" = \
|
||||
"$(pfx)/share/man/man1/zyx.1"
|
||||
endef
|
||||
|
||||
# Install, then verify that all binaries and man pages are in place.
|
||||
# Note that neither the binary, ginstall, nor the ].1 man page is installed.
|
||||
define my-instcheck
|
||||
$(MAKE) prefix=$(pfx) install \
|
||||
&& test ! -f $(pfx)/bin/ginstall \
|
||||
&& { fail=0; \
|
||||
for i in $(built_programs); do \
|
||||
test "$$i" = ginstall && i=install; \
|
||||
for j in "$(pfx)/bin/$$i" \
|
||||
"$(pfx)/share/man/man1/$$i.1"; do \
|
||||
case $$j in *'[.1') continue;; esac; \
|
||||
test -f "$$j" && : \
|
||||
|| { echo "$$j not installed"; fail=1; }; \
|
||||
done; \
|
||||
done; \
|
||||
test $$fail = 1 && exit 1 || :; \
|
||||
}
|
||||
endef
|
||||
|
||||
# Use -Wformat -Werror to detect format-string/arg-list mismatches.
|
||||
# Also, check for shadowing problems with -Wshadow, and for pointer
|
||||
# arithmetic problems with -Wpointer-arith.
|
||||
# These CFLAGS are pretty strict. If you build this target, you probably
|
||||
# have to have a recent version of gcc and glibc headers.
|
||||
# The hard-linking for-loop below ensures that there is a bin/ directory
|
||||
# full of all of the programs under test (except the ones that are required
|
||||
# for basic Makefile rules), all symlinked to the just-built "false" program.
|
||||
# This is to ensure that if ever a test neglects to make PATH include
|
||||
# the build srcdir, these always-failing programs will run.
|
||||
# Otherwise, it is too easy to test the wrong programs.
|
||||
# Note that "false" itself is a symlink to true, so it too will malfunction.
|
||||
my-distcheck: $(DIST_ARCHIVES) $(local-check)
|
||||
$(MAKE) syntax-check
|
||||
$(MAKE) check
|
||||
-rm -rf $(t)
|
||||
mkdir -p $(t)
|
||||
GZIP=$(GZIP_ENV) $(AMTAR) -C $(t) -zxf $(distdir).tar.gz
|
||||
cd $(t)/$(distdir) \
|
||||
&& ./configure --disable-nls \
|
||||
&& $(MAKE) CFLAGS='$(warn_cflags)' \
|
||||
AM_MAKEFLAGS='$(null_AM_MAKEFLAGS)' \
|
||||
&& $(MAKE) dvi \
|
||||
&& $(install-transform-check) \
|
||||
&& $(my-instcheck) \
|
||||
&& mkdir $(bin) \
|
||||
&& ($(write_loser)) > $(bin)/loser \
|
||||
&& chmod a+x $(bin)/loser \
|
||||
&& for i in $(built_programs); do \
|
||||
case $$i in \
|
||||
rm|expr|basename|echo|sort|ls|tr);; \
|
||||
cat|dirname|mv|wc);; \
|
||||
*) ln $(bin)/loser $(bin)/$$i;; \
|
||||
esac; \
|
||||
done \
|
||||
&& ln -sf ../src/true $(bin)/false \
|
||||
&& PATH=`pwd`/$(bin):$$PATH $(MAKE) -C tests check \
|
||||
&& { test -d gnulib-tests \
|
||||
&& $(MAKE) -C gnulib-tests check \
|
||||
|| :; } \
|
||||
&& rm -rf $(bin) \
|
||||
&& $(MAKE) distclean
|
||||
(cd $(t) && mv $(distdir) $(distdir).old \
|
||||
&& $(AMTAR) -zxf - ) < $(distdir).tar.gz
|
||||
diff -ur $(t)/$(distdir).old $(t)/$(distdir)
|
||||
if test -f $(srcdir)/src/c99-to-c89.diff; then \
|
||||
cd $(t)/$(distdir) \
|
||||
&& (cd src && patch -V never --fuzz=0 <c99-to-c89.diff) \
|
||||
&& ./configure --disable-largefile \
|
||||
CFLAGS='-Werror -ansi -Wno-long-long' \
|
||||
&& $(MAKE); \
|
||||
fi
|
||||
-rm -rf $(t)
|
||||
@echo "========================"; \
|
||||
echo "$(distdir).tar.gz is ready for distribution"; \
|
||||
echo "========================"
|
||||
|
||||
WGET = wget
|
||||
WGETFLAGS = -C off
|
||||
|
||||
rel-check:
|
||||
tarz=/tmp/rel-check-tarz-$$$$; \
|
||||
md5_tmp=/tmp/rel-check-md5-$$$$; \
|
||||
set -e; \
|
||||
trap 'status=$$?; rm -f $$tarz $$md5_tmp; exit $$status' 0 1 2 3 15; \
|
||||
$(WGET) $(WGETFLAGS) -q --output-document=$$tarz $(url); \
|
||||
echo "$(md5) -" > $$md5_tmp; \
|
||||
md5sum -c $$md5_tmp < $$tarz
|
||||
|
||||
rel-files = $(DIST_ARCHIVES)
|
||||
|
||||
gnulib-version = $$(cd $(gnulib_dir) && git describe)
|
||||
|
||||
announcement: NEWS ChangeLog $(rel-files)
|
||||
@./build-aux/announce-gen \
|
||||
--release-type=$(RELEASE_TYPE) \
|
||||
--package=$(PACKAGE) \
|
||||
--prev=$(PREV_VERSION) \
|
||||
--curr=$(VERSION) \
|
||||
--gpg-key-id=$(gpg_key_ID) \
|
||||
--news=NEWS \
|
||||
--bootstrap-tools=autoconf,automake,flex,gnulib \
|
||||
--gnulib-version=$(gnulib-version) \
|
||||
$(addprefix --url-dir=, $(url_dir_list))
|
||||
|
||||
## ---------------- ##
|
||||
## Updating files. ##
|
||||
## ---------------- ##
|
||||
|
||||
ftp-gnu = ftp://ftp.gnu.org/gnu
|
||||
www-gnu = http://www.gnu.org
|
||||
|
||||
# Use mv, if you don't have/want move-if-change.
|
||||
move_if_change ?= move-if-change
|
||||
|
||||
emit_upload_commands:
|
||||
@echo =====================================
|
||||
@echo =====================================
|
||||
@echo "$(srcdir)/build-aux/gnupload $(GNUPLOADFLAGS) \\"
|
||||
@echo " --to $(gnu_rel_host):$(PACKAGE) \\"
|
||||
@echo " $(rel-files)"
|
||||
@echo '# send the /tmp/announcement e-mail'
|
||||
@echo =====================================
|
||||
@echo =====================================
|
||||
|
||||
noteworthy = * Noteworthy changes in release ?.? (????-??-??) [?]
|
||||
define emit-commit-log
|
||||
printf '%s\n' 'post-release administrivia' '' \
|
||||
'* NEWS: Add header line for next release.' \
|
||||
'* .prev-version: Record previous version.' \
|
||||
'* cfg.mk (old_NEWS_hash): Auto-update.'
|
||||
endef
|
||||
|
||||
.PHONY: alpha beta major
|
||||
alpha beta major: $(local-check) writable-files
|
||||
test $@ = major \
|
||||
&& { echo $(VERSION) | grep -E '^[0-9]+(\.[0-9]+)+$$' \
|
||||
|| { echo "invalid version string: $(VERSION)" 1>&2; exit 1;};}\
|
||||
|| :
|
||||
$(MAKE) vc-dist
|
||||
$(MAKE) news-date-check
|
||||
$(MAKE) -s announcement RELEASE_TYPE=$@ > /tmp/announce-$(my_distdir)
|
||||
if test -d $(release_archive_dir); then \
|
||||
ln $(rel-files) $(release_archive_dir); \
|
||||
chmod a-w $(rel-files); \
|
||||
fi
|
||||
$(MAKE) -s emit_upload_commands RELEASE_TYPE=$@
|
||||
echo $(VERSION) > $(prev_version_file)
|
||||
$(MAKE) update-NEWS-hash
|
||||
perl -pi -e '$$. == 3 and print "$(noteworthy)\n\n\n"' NEWS
|
||||
$(emit-commit-log) > .ci-msg
|
||||
$(VC) commit -F .ci-msg
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user