diff --git a/.gitignore b/.gitignore index d161dd03928554d03986da4caff3a53f377eb8f5..82a078f3262400ac3ff47f71048dad5c41f8d50d 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,7 @@ Makefile /configure /gnulib /m4 +/build-aux/bin/bison +/build-aux/bin/yacc +/build-aux/lib +/build-aux/share diff --git a/bootstrap b/bootstrap index ee0e3d2755a922636c0624cf4ff8467df2539f62..e69b493952844af3adf323d03105add3550ea265 100755 --- a/bootstrap +++ b/bootstrap @@ -30,7 +30,7 @@ export LC_ALL usage() { cat <&2 "$0: $option: unknown option" - exit 1;; + echo >&2 "$0: $option: unknown option" + exit 1;; esac done @@ -116,12 +116,12 @@ cvs_checkout() { pserver) build_cvs_prefix pserver ${CVS_USER:-anonymous} ;; gserver|server) - build_cvs_prefix $CVS_AUTH ${CVS_USER--} - ;; + build_cvs_prefix $CVS_AUTH ${CVS_USER--} + ;; ext) build_cvs_prefix $CVS_AUTH ${CVS_USER--} ;; *) echo "$0: Unknown CVS access method" >&2 - exit 1;; + exit 1;; esac cvs -q -d ${CVS_PREFIX}cvs.sv.gnu.org:/cvsroot/$1 co $1 || exit @@ -147,7 +147,7 @@ newline=' ' get_modules() { - new_gnulib_modules=`sed '/^[ ]*#/d; /^[ ]*$/d' $*` + new_gnulib_modules=`sed '/^[ ]*#/d; /^[ ]*$/d' $*` case $gnulib_modules,$new_gnulib_modules in ?*,?*) new_gnulib_modules=$newline$new_gnulib_modules;; esac @@ -194,18 +194,18 @@ for gnulib_file in $gnulib_files; do dest=$gnulib_file case $gnulib_file in - m4/codeset.m4) continue;; - m4/intdiv0.m4) continue;; - m4/inttypes-pri.m4) continue;; - m4/isc-posix.m4) continue;; - m4/lcmessage.m4) continue;; - m4/onceonly_2_57.m4) dest=m4/onceonly.m4;; + m4/codeset.m4) continue;; + m4/intdiv0.m4) continue;; + m4/inttypes-pri.m4) continue;; + m4/isc-posix.m4) continue;; + m4/lcmessage.m4) continue;; + m4/onceonly_2_57.m4) dest=m4/onceonly.m4;; # These will be overwritten by autopoint, which still uses # old jm_.* macro names, so we have to keep both copies. - m4/gettext.m4 | m4/glibc21.m4 | m4/inttypes_h.m4 | m4/lib-ld.m4 | \ - m4/lib-prefix.m4 | m4/po.m4 | m4/stdint_h.m4 | m4/uintmax_t.m4 | \ - m4/ulonglong.m4) - dest=`expr $gnulib_file : '\(.*\).m4'`_gl.m4;; + m4/gettext.m4 | m4/glibc21.m4 | m4/inttypes_h.m4 | m4/lib-ld.m4 | \ + m4/lib-prefix.m4 | m4/po.m4 | m4/stdint_h.m4 | m4/uintmax_t.m4 | \ + m4/ulonglong.m4) + dest=`expr $gnulib_file : '\(.*\).m4'`_gl.m4;; esac rm -f $dest && @@ -218,9 +218,9 @@ echo "$0: Creating m4/gnulib.m4" echo "#" echo "AC_DEFUN([nolimips_GNULIB],[" for gnulib_module in $gnulib_modules; do - echo "# $gnulib_module" - $GNULIB_SRCDIR/gnulib-tool \ - --aux-dir=build-aux --extract-autoconf-snippet $gnulib_module + echo "# $gnulib_module" + $GNULIB_SRCDIR/gnulib-tool \ + --aux-dir=build-aux --extract-autoconf-snippet $gnulib_module done | sed '/AM_GNU_GETTEXT/d' echo "])") > ./m4/gnulib.m4 @@ -259,6 +259,31 @@ do done export LIBTOOLIZE=$libtoolize +TIGER_WEBSITE="https://www.lrde.epita.fr/~tiger/download" +BISON="bison-3.0.4.19-fbaf" +BISON_TARBALL="$BISON.tar.xz" +BISON_PREFIX_DIR="$(pwd)/build-aux" +BISON_BIN="$BISON_PREFIX_DIR/bin/bison" + +# Getting LRDE bison +if [ ! -f "$BISON_BIN" ]; then + echo "$0: wget $TIGER_WEBSITE/$BISON_TARBALL" + wget -q $TIGER_WEBSITE/$BISON_TARBALL -O $BISON + echo "$0: tar -xvf $BISON" + tar -xvf $BISON + echo "$0: rm $BISON_TARBALL" + rm $BISON_TARBALL + + # Building bison + echo "$0: mkdir $BISON/build" + mkdir $BISON/build + echo "$0: cd $BISON/build && ../configure && make" + cd $BISON/build + ../configure --prefix=$BISON_PREFIX_DIR + make install + cd ../.. + rm -r $BISON +fi # Reconfigure, getting other files. diff --git a/build-aux/bin/bison++.in b/build-aux/bin/bison++.in index 733750b03dc06d3197832379d3a20c53a7d953a6..b92894a23bc248bafae7c1dd5d8f6c22d1017f9a 100755 --- a/build-aux/bin/bison++.in +++ b/build-aux/bin/bison++.in @@ -52,11 +52,11 @@ get_options () # Handle --option=value by splitting apart and putting back on argv. case $1 in (--*=*) - opt=$(echo "$1" | sed -e 's/=.*//') - val=$(echo "$1" | sed -e 's/[^=]*=//') - shift - set dummy "$opt" "$val" ${1+"$@"}; shift - ;; + opt=$(echo "$1" | sed -e 's/=.*//') + val=$(echo "$1" | sed -e 's/[^=]*=//') + shift + set dummy "$opt" "$val" ${1+"$@"}; shift + ;; esac case $1 in @@ -205,7 +205,7 @@ install () # Exit status. status=0 -: ${BISON='@BISON@'} +: ${BISON='@abs_srcdir@/@BISON@'} me=$(basename $0) fuse_switch='@abs_srcdir@/fuse-switch' @@ -251,43 +251,43 @@ do base=$(basename $file) case $status:$base in (*:$input_base) - # Leave it here. - ;; + # Leave it here. + ;; # Success or not, install it. (*:*.xml) - # Computing the HTML is slow. Do it when the XML changed. - fix_bison_output "$file" - compile_xml_file "$file" "xml2xhtml" "html" - # Compiling the dot output is quite long, it would be better - # to do that from the Makefile, so that -j applies. - # compile_xml_file "$file" "xml2dot" "dot" - install "$file" - ;; + # Computing the HTML is slow. Do it when the XML changed. + fix_bison_output "$file" + compile_xml_file "$file" "xml2xhtml" "html" + # Compiling the dot output is quite long, it would be better + # to do that from the Makefile, so that -j applies. + # compile_xml_file "$file" "xml2dot" "dot" + install "$file" + ;; (0:*.hh) - fix_bison_output "$file" - # To save cycles, if the file differs only on sync lines, - # update it (to be right), but keep the original timestamps. - if test -r "$(out "$file")" && - diff -I '^#line' -I '/\* Line .* of .* \*/' -q \ + fix_bison_output "$file" + # To save cycles, if the file differs only on sync lines, + # update it (to be right), but keep the original timestamps. + if test -r "$(out "$file")" && + diff -I '^#line' -I '/\* Line .* of .* \*/' -q \ "$file" "$(out "$file")" then - touch -r "$(out "$file")" "$file" - cp "$(out "$file")" "$(out "$file").bak" - verbose "kept the stamps of $file" - fi - install "$file" - ;; + touch -r "$(out "$file")" "$file" + cp "$(out "$file")" "$(out "$file").bak" + verbose "kept the stamps of $file" + fi + install "$file" + ;; (*:*.output) - install "$file" - ;; + install "$file" + ;; (0:*) - fix_bison_output "$file" - install "$file" - ;; + fix_bison_output "$file" + install "$file" + ;; esac done diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog index 83bafdffa6fa0aa0fef5ed8f0f38b37a7bb93ea3..1e73f4214f799662bf1edce473e1cfe17a8fb6b7 100755 --- a/build-aux/gitlog-to-changelog +++ b/build-aux/gitlog-to-changelog @@ -3,13 +3,13 @@ eval '(exit $?0)' && eval 'exec perl -wS "$0" "$@"' if 0; # Convert git log output to ChangeLog format. -my $VERSION = '2016-03-22 21:49'; # UTC +my $VERSION = '2018-03-07 03:47'; # UTC # The definition above must lie within the first 8 lines in order # for the Emacs time-stamp write hook (at end) to update it. # If you change this file with Emacs, please let the write hook # do its job. Otherwise, update this string manually. -# Copyright (C) 2008-2016 Free Software Foundation, Inc. +# Copyright (C) 2008-2018 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 @@ -22,7 +22,7 @@ my $VERSION = '2016-03-22 21:49'; # UTC # 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 . +# along with this program. If not, see . # Written by Jim Meyering @@ -33,7 +33,7 @@ use POSIX qw(strftime); (my $ME = $0) =~ s|.*/||; -# use File::Coda; # http://meyering.net/code/Coda/ +# use File::Coda; # https://meyering.net/code/Coda/ END { defined fileno STDOUT or return; close STDOUT and return; @@ -491,7 +491,7 @@ sub git_dir_option($) # Local Variables: # mode: perl # indent-tabs-mode: nil -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "my $VERSION = '" # time-stamp-format: "%:y-%02m-%02d %02H:%02M" # time-stamp-time-zone: "UTC0" diff --git a/configure.ac b/configure.ac index ca81e07104f7823dea57a0d791c5283dfe0a28b0..08d12c16b0a15fd1b56188c3887b8fd7814e85ac 100644 --- a/configure.ac +++ b/configure.ac @@ -19,8 +19,8 @@ AM_SILENT_RULES([yes]) ## Development tools ------------------- # Look for a lex-like program. AC_PROG_LEX -# Look for bison. -AC_CHECK_PROGS([BISON], [bison]) +# Look for the lrde version of bison. +AC_CHECK_PROGS([BISON], [bison], [path = build-aux/bin]) # Look for a C++ compiler. AC_LANG([C++])