bison-patches
[Top][All Lists]
Advanced

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

Bison bootstrapping overhaul: get gnulib and po automatically


From: Paul Eggert
Subject: Bison bootstrapping overhaul: get gnulib and po automatically
Date: Wed, 28 Apr 2004 13:03:55 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Bison's copy of gnulib and po files was getting stale.  I modified
"bootstrap" so that it grabs those files automatically, so that we
won't have to manually incorporate new versions.  I installed the
following patch, which mostly consists of deleting the files now
upgraded automatically by "bootstrap".

2004-04-28  Paul Eggert  <address@hidden>

        Get files from the gnulib and po repositories, instead of relying
        on them being in our CVS.  Upgrade to latest versions of gnulib
        and Automake.

        * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
        * bootstrap: Bootstrap from gnulib and po repositories.
        Much of this code was stolen from GNU diff and GNU tar's bootstrap.
        * README-cvs: Document these changes.  Remove version numbers from
        mentions of build tools, since they change so often.  Mention Flex.

        * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
        (gl_USE_SYSTEM_EXTENSIONS): Add.
        (AC_GNU_SOURCE): Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
        does this for us.
        (AC_ISC_POSIX, AC_MINIX): Remove; we no longer support these
        ancient OSes, as they get in the way of latest Autoconf & gnulib.
        (AC_HEADER_STDC): Remove: we now assume C89 or better.
        (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
        Do not check for C89 headers, except for locale.h which is used
        by the Yacc library and must port to K&R hosts.
        (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
        Do not check for C89 functions, except for setlocale which is
        used by the Yacc library.
        (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
        (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
        gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
        gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
        gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
        AM_GNU_GETTEXT): Remove; now done by:
        (GNULIB_AUTOCONF_SNIPPET): Add.  "bootstrap" builds this for us.
        (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
        for us.

        * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
        (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
        Define to empty, as gnulib.mk will do the rest for us.
        ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
        for us.
        (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
        (lib_SOURCES): New symbol, containing only the non-gnulib libs.

        * src/files.c: Include gnulib's xstrndup.h.

        * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
        (REALLOC): Use xnrealloc, for likewise.
        (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
        (strnlen, memrchr): Remove decls; functions no longer used.
        Include <stpcpy.h>.

        * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
        lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
        lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
        lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
        lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
        lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
        lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
        lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
        lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
        lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
        lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
        m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
        m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
        m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
        m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
        m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
        m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
        m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
        po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
        po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
        po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
        Remove, as these files are now generated automatically
        by bootstrap or automake.

        * po/ChangeLog: Remove: all but one entry was a duplicate
        of this file, and I moved that 2000-11-02 entry here.

        * config/.cvsignore: Add Makefile, depcomp, install-sh.
        * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
        argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
        exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
        getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
        hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
        memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
        quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
        strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
        strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
        unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
        xstrndup.h.
        * m4/.cvsignore: Remove Makefile, Makefile.in.  Add alloca.m4,
        dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
        mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
        stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
        * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
        * src/.cvsignore: Remove *_.c.

Index: Makefile.am
===================================================================
RCS file: /cvsroot/bison/bison/Makefile.am,v
retrieving revision 1.32
diff -p -u -r1.32 Makefile.am
--- Makefile.am 25 Aug 2003 18:47:36 -0000      1.32
+++ Makefile.am 28 Apr 2004 19:58:02 -0000
@@ -1,5 +1,5 @@
 ## Process this file with automake to produce Makefile.in -*-Makefile-*-
-## Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+## Copyright (C) 2001, 2002, 2003, 2004 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
@@ -18,7 +18,7 @@
 
 ACLOCAL_AMFLAGS = -I m4
 
-SUBDIRS = config po lib data src doc m4 tests
+SUBDIRS = config po lib data src doc tests
 
 EXTRA_DIST = REFERENCES OChangeLog Makefile.maint GNUmakefile Makefile.cfg
 
Index: README-cvs
===================================================================
RCS file: /cvsroot/bison/bison/README-cvs,v
retrieving revision 1.10
diff -p -u -r1.10 README-cvs
--- README-cvs  25 Aug 2003 15:16:24 -0000      1.10
+++ README-cvs  28 Apr 2004 19:58:02 -0000
@@ -6,15 +6,13 @@ Bison.
 * Requirements
 
 Only the sources are installed in the CVS repository (to ease the
-maintenance, merges etc.), therefore you will have to the maintainer
-tools we depend upon:
-
-- Automake 1.7
-
-- Autoconf 2.57
-
-- Gettext 0.12.1
+maintenance, merges etc.), therefore you will have to get the latest
+stable versions of the maintainer tools we depend upon, including:
 
+- Automake
+- Autoconf
+- Flex
+- Gettext
 - CVS Bison itself
 
 Only building the initial full source tree will be a bit painful,
@@ -55,19 +53,19 @@ If you experience problems, I suggest th
 1. Do a regular CVS checkout
 
 2. Fetch a recent tarball in:
-   http://www.lrde.epita.fr/~akim/download/
+   ftp://alpha.gnu.org/gnu/bison/
 
 3. Extract it
 
 4. Override the content of your checkout with the content of this
    tarball, i.e.:
-   cp -r bison-1.49b/* bison-cvs
+   cp -r bison-1.875c/* bison-cvs
 
 5. Proceed on ./configure && make etc.
 
 -----
 
-Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
 
 This file is part of GNU Bison.
 
Index: bootstrap
===================================================================
RCS file: /cvsroot/bison/bison/bootstrap,v
retrieving revision 1.5
diff -p -u -r1.5 bootstrap
--- bootstrap   3 May 2002 16:11:40 -0000       1.5
+++ bootstrap   28 Apr 2004 19:58:02 -0000
@@ -1,6 +1,223 @@
 #! /bin/sh
 
-echo "Bootstrapping CVS Bison..."
+# Bootstrap this package from CVS.
 
-echo "running: autoreconf --verbose --install --force"
-autoreconf --verbose --install --force
+# Copyright (C) 2003, 2004 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 2, 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# Written by Paul Eggert.
+
+package=bison
+
+# Parse options.
+
+for option
+do
+  case $option in
+  --help)
+    echo "$0: usage: $0 [--gnulib-srcdir=DIR] [--cvs-user=USERNAME] 
[--skip-po]"
+    exit;;
+  --gnulib-srcdir=*)
+    GNULIB_SRCDIR=`expr "$1" : '--gnulib-srcdir=\(.*\)'`;;
+  --cvs-user=*)
+    CVS_USER=`expr "$1" : '--cvs-user=\(.*\)'`;;
+  --skip-po)
+    SKIP_PO=t;;
+  *)
+    echo >&2 "$0: $option: unknown option"
+    exit 1;;
+  esac
+done
+
+echo "$0: Bootstrapping CVS $package..."
+
+build_cvs_prefix() {
+  CVS_PREFIX=:${1}:
+  if [ "${2}" != - ]; then
+    CVS_PREFIX=${CVS_PREFIX}${2}@
+  fi
+}
+
+# Get gnulib files.
+
+case ${GNULIB_SRCDIR--} in
+-)
+  if [ ! -d gnulib ]; then
+    echo "$0: getting gnulib files..."
+
+    trap exit 1 2 13 15
+    trap 'rm -fr gnulib; exit 1' 0
+
+    case ${CVS_AUTH-anoncvs} in
+    anoncvs)
+      CVS_PREFIX='anoncvs@';;
+    ssh)
+      CVS_PREFIX="address@hidden";;
+    *)
+      echo "$0: $CVS_AUTH: Unknown CVS access method" >&2
+      exit 1;;
+    esac
+
+    case $CVS_RSH in
+    '') export CVS_RSH=ssh;;
+    esac
+
+    cvs -z3 -q -d ${CVS_PREFIX}subversions.gnu.org:/cvsroot/gnulib co gnulib 
|| exit
+
+    trap 0
+  fi
+  GNULIB_SRCDIR=gnulib
+esac
+
+<$GNULIB_SRCDIR/gnulib-tool || exit
+
+gnulib_modules='
+alloca
+argmatch
+dirname
+error
+getopt
+hard-locale
+hash
+malloc
+mbswidth
+obstack
+quote
+quotearg
+stdbool
+stpcpy
+xalloc
+xstrndup
+'
+
+previous_gnulib_modules=
+while [ "$gnulib_modules" != "$previous_gnulib_modules" ]; do
+  previous_gnulib_modules=$gnulib_modules
+  gnulib_modules=`
+    (echo "$gnulib_modules"
+     for gnulib_module in $gnulib_modules; do
+       $GNULIB_SRCDIR/gnulib-tool --extract-dependencies $gnulib_module
+     done) | sort -u
+  `
+done
+
+gnulib_files=`
+  (for gnulib_module in $gnulib_modules; do
+     $GNULIB_SRCDIR/gnulib-tool --extract-filelist $gnulib_module
+   done) | sort -u
+`
+
+gnulib_dirs=`echo "$gnulib_files" | sed 's,/[^/]*$,,' | sort -u`
+mkdir -p $gnulib_dirs || exit
+
+for gnulib_file in $gnulib_files; do
+  dest=$gnulib_file
+
+  case $gnulib_file in
+  m4/onceonly_2_57.m4) dest=m4/onceonly.m4;;
+  esac
+
+  rm -f $dest &&
+  echo "$0: Copying file $GNULIB_SRCDIR/$gnulib_file" &&
+  cp -p $GNULIB_SRCDIR/$gnulib_file $dest || exit
+done
+
+
+# Get translations.
+
+case $SKIP_PO in
+'')
+  echo "$0: getting translations into po..."
+  (cd po &&
+   rm -f dummy `ls | sed -n '/\.gmo$/p; /\.po/p'` &&
+   wget -nv -nd -r -l 1 -A .po -C off \
+     http://www2.iro.umontreal.ca/~gnutra/po/maint/$package/ &&
+   ls *.po | sed 's/\.po$//' >LINGUAS
+  ) || exit;;
+esac
+
+
+# Generate autoconf and automake snippets.
+
+(echo '# This file is generated automatically by "bootstrap".' &&
+ echo 'AC_DEFUN([GNULIB_AUTOCONF_SNIPPET],[' &&
+ $GNULIB_SRCDIR/gnulib-tool --extract-autoconf-snippet $gnulib_modules &&
+ echo '])'
+) >m4/gnulib.m4 || exit
+
+(echo '# This file is generated automatically by "bootstrap".' &&
+ $GNULIB_SRCDIR/gnulib-tool --extract-automake-snippet $gnulib_modules
+) >lib/gnulib.mk || exit
+
+
+# Reconfigure, getting other files.
+
+echo "$0: autoreconf --verbose --install --force ..."
+autoreconf --verbose --install --force || exit
+
+# We don't need intl, so remove it.
+echo "$0: rm -fr intl ..."
+rm -fr intl || exit
+
+
+# Patch what appears to be a bug in gettext 0.14.1;
+# remove this once the bug is fixed.
+grep @top_builddir@ po/Makefile.in.in >/dev/null || {
+  echo "$0: prepending 'address@hidden@' to po/Makefile.in.in ... "
+  old_contents=$(cat po/Makefile.in.in) || exit
+  cat >po/Makefile.in.in <<EOF
address@hidden@
+$old_contents
+EOF
+}
+
+# Put bug-reporting address into po/Makevars.
+echo "$0: sed '/^MSGID_BUGS_ADDRESS *=/s/=.*/= address@hidden/' 
po/Makevars.template >po/Makevars ..."
+sed '/^MSGID_BUGS_ADDRESS *=/s/=.*/= address@hidden/' po/Makevars.template 
>po/Makevars
+
+
+# if src/parse-gram.[ch] are out of date, rebuild them.
+parse_gram_y=$(find src/parse-gram.y \
+                '(' -newer src/parse-gram.c -o -newer src/parse-gram.h ')' \
+                -print) || exit
+case $parse_gram_y in
+?*)
+  echo "$0: warning: bootstrapping with old src/parse-gram.[ch] files."
+
+  echo "$0: touch -c src/parse-gram.[ch] ... "
+  touch -c src/parse-gram.[ch] || exit
+
+  echo "$0: ./configure --disable-nls ..."
+  ./configure --disable-nls || exit
+
+  echo "$0: (cd lib && make) ..."
+  (cd lib && make) || exit
+
+  echo "$0: (cd src && make) ..."
+  (cd src && make) || exit
+
+  echo "$0: rm -f src/parse-gram.c src/parse-gram.h ..."
+  rm -f src/parse-gram.c src/parse-gram.h || exit
+
+  echo "$0: (cd src && make parse-gram.c parse-gram.h) ..."
+  (cd src && make parse-gram.c parse-gram.h) || exit
+
+  echo "$0: make distclean ..."
+  make distclean || exit;;
+esac
+
+echo "$0: done.  Now you can run './configure'."
Index: configure.ac
===================================================================
RCS file: /cvsroot/bison/bison/configure.ac,v
retrieving revision 1.38
diff -p -u -r1.38 configure.ac
--- configure.ac        17 Jun 2003 18:28:58 -0000      1.38
+++ configure.ac        28 Apr 2004 19:58:03 -0000
@@ -1,6 +1,6 @@
 # Configure template for GNU Bison.                   -*-Autoconf-*-
 #
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2004 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
@@ -21,17 +21,16 @@
 AC_PREREQ(2.57)
 
 AC_INIT([GNU Bison], [1.875c], address@hidden)
-AC_CONFIG_AUX_DIR(config)
+AC_CONFIG_AUX_DIR([config])
+AC_CONFIG_MACRO_DIR([m4])
 
 AM_INIT_AUTOMAKE([1.7 check-news readme-alpha dist-bzip2])
 AC_CONFIG_HEADERS([config.h:config.hin])
 
+gl_USE_SYSTEM_EXTENSIONS
+
 # Checks for the compiler.
 AC_PROG_CC
-# Remove with Automake 1.8.
-AC_ISC_POSIX
-AC_GNU_SOURCE
-AC_MINIX
 AM_PROG_CC_STDC
 AC_ARG_ENABLE(gcc-warnings,
 [  --enable-gcc-warnings   turn on lots of GCC warnings (not recommended)],
@@ -87,8 +86,7 @@ fi
 AC_DEFINE_UNQUOTED([M4], ["$M4"], [Define to the GNU M4 executable name.])
 
 # Checks for header files.
-AC_HEADER_STDC
-AC_CHECK_HEADERS([ctype.h locale.h memory.h stdlib.h string.h unistd.h])
+AC_CHECK_HEADERS_ONCE([locale.h])
 AM_STDBOOL_H
 
 # Checks for compiler characteristics.
@@ -98,36 +96,14 @@ AC_C_INLINE
 AC_CHECK_TYPES([uintptr_t])
 
 # Checks for library functions.
-AC_CHECK_FUNCS(setlocale)
-AC_CHECK_DECLS([free, getenv, getopt,
-                stpcpy, strchr, strspn, strnlen,
-                malloc, memchr, memrchr])
-AC_REPLACE_FUNCS(strchr strrchr strspn)
+AC_CHECK_FUNCS_ONCE([setlocale])
 AM_WITH_DMALLOC
 BISON_PREREQ_SUBPIPE
 BISON_PREREQ_TIMEVAR
-gl_DIRNAME
-gl_ERROR
-gl_FUNC_ALLOCA
-gl_FUNC_MEMCHR
-gl_FUNC_MEMRCHR
-gl_FUNC_STPCPY
-gl_FUNC_STRNLEN
-gl_FUNC_STRTOL
-gl_GETOPT
-gl_HASH
-gl_MBSWIDTH
-gl_OBSTACK
-gl_QUOTE
-gl_QUOTEARG
-gl_XALLOC
-jm_FUNC_GLIBC_UNLOCKED_IO
-jm_FUNC_MALLOC
-jm_FUNC_REALLOC
-
-# Gettext.
-AM_GNU_GETTEXT([external], [need-ngettext])
-AM_GNU_GETTEXT_VERSION(0.12.1)
+
+# gnulib and gettext.
+GNULIB_AUTOCONF_SNIPPET
+AM_GNU_GETTEXT_VERSION([0.14.1])
 
 # Initialize the test suite.
 AC_CONFIG_TESTDIR(tests)
@@ -145,6 +121,5 @@ AC_CONFIG_FILES([Makefile
                  config/Makefile
                  po/Makefile.in
                  data/Makefile
-                 lib/Makefile src/Makefile doc/Makefile
-                 m4/Makefile])
+                 lib/Makefile src/Makefile doc/Makefile])
 AC_OUTPUT
Index: config/.cvsignore
===================================================================
RCS file: /cvsroot/bison/bison/config/.cvsignore,v
retrieving revision 1.7
diff -p -u -r1.7 .cvsignore
--- config/.cvsignore   15 Nov 2002 09:04:37 -0000      1.7
+++ config/.cvsignore   28 Apr 2004 19:58:03 -0000
@@ -1,11 +1,13 @@
-Makefile
 *.t
+Makefile
 Makefile.in
-mkinstalldirs
-missing
-config.sub
 config.guess
+config.rpath
+config.sub
+depcomp
+install-sh
 mdate-sh
+missing
+mkinstalldirs
 texinfo.tex
-config.rpath
 ylwrap
Index: lib/.cvsignore
===================================================================
RCS file: /cvsroot/bison/bison/lib/.cvsignore,v
retrieving revision 1.8
diff -p -u -r1.8 .cvsignore
--- lib/.cvsignore      17 Jun 2003 07:49:01 -0000      1.8
+++ lib/.cvsignore      28 Apr 2004 19:58:03 -0000
@@ -2,4 +2,59 @@
 .deps
 Makefile
 Makefile.in
+alloca.c
+alloca.h
+alloca_.h
+argmatch.c
+argmatch.h
+basename.c
+dirname.c
+dirname.h
+error.c
+error.h
+exit.h
+exitfail.c
+exitfail.h
+getopt.c
+getopt.h
+getopt1.c
+getopt_int.h
+gettext.h
+gnulib.mk
+hard-locale.c
+hard-locale.h
+hash.c
+hash.h
+malloc.c
+mbswidth.c
+mbswidth.h
+memchr.c
+memcmp.c
+memrchr.c
+obstack.c
+obstack.h
+quote.c
+quote.h
+quotearg.c
+quotearg.h
+realloc.c
 stdbool.h
+stdbool_.h
+stpcpy.c
+stpcpy.h
+strcasecmp.c
+strchr.c
+stripslash.c
+strncasecmp.c
+strndup.c
+strnlen.c
+strrchr.c
+strspn.c
+strtol.c
+strtoul.c
+unlocked-io.h
+xalloc.h
+xmalloc.c
+xstrdup.c
+xstrndup.c
+xstrndup.h
Index: lib/Makefile.am
===================================================================
RCS file: /cvsroot/bison/bison/lib/Makefile.am,v
retrieving revision 1.42
diff -p -u -r1.42 Makefile.am
--- lib/Makefile.am     2 Feb 2004 22:36:49 -0000       1.42
+++ lib/Makefile.am     28 Apr 2004 19:58:03 -0000
@@ -17,36 +17,20 @@
 
 AM_CFLAGS = $(WARNING_CFLAGS)
 
+BUILT_SOURCES =
+EXTRA_DIST =
+MOSTLYCLEANFILES =
+
 lib_LIBRARIES = $(YACC_LIBRARY)
 EXTRA_LIBRARIES = liby.a
 noinst_LIBRARIES = libbison.a
 
 liby_a_SOURCES = main.c yyerror.c
 
-# Heck, we are still using an old version of Automake which does not
-# understand inner AC_LIBOBJ (i.e., from Autoconf itself, not from
-# configure.in).
-EXTRA_DIST = malloc.c realloc.c stdbool_.h strnlen.c
-MOSTLYCLEANFILES = stdbool.h stdbool.h-t
-
-# We need the following in order to create an <stdbool.h> when the system
-# doesn't have one that works.
-$(libbison_a_OBJECTS): $(STDBOOL_H)
-stdbool.h: stdbool_.h
-       sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' <$(srcdir)/stdbool_.h 
>address@hidden
-       mv address@hidden $@
-
-libbison_a_SOURCES = \
-  gettext.h \
-  argmatch.c argmatch.h \
-  basename.c dirname.h dirname.c \
+libbison_a_SOURCES = $(lib_SOURCES)
+lib_SOURCES = \
   get-errno.h get-errno.c \
-  getopt.h getopt.c getopt1.c \
-  hash.h hash.c \
-  mbswidth.h mbswidth.c \
-  quote.h quote.c quotearg.h quotearg.c \
-  subpipe.h subpipe.c unlocked-io.h \
-  xalloc.h xmalloc.c xstrdup.c xstrndup.c \
+  subpipe.h subpipe.c \
   $(bitsets_sources) $(additional_bitsets_sources) $(timevars_sources)
 
 # Implementation of bitsets
@@ -65,3 +49,5 @@ timevars_sources = \
 
 libbison_a_LIBADD = $(LIBOBJS) $(ALLOCA)
 libbison_a_DEPENDENCIES = $(libbison_a_LIBADD)
+
+include gnulib.mk
Index: m4/.cvsignore
===================================================================
RCS file: /cvsroot/bison/bison/m4/.cvsignore,v
retrieving revision 1.7
diff -p -u -r1.7 .cvsignore
--- m4/.cvsignore       17 Jun 2003 07:49:33 -0000      1.7
+++ m4/.cvsignore       28 Apr 2004 19:58:16 -0000
@@ -1,8 +1,12 @@
-Makefile
-Makefile.in
+alloca.m4
 codeset.m4
+dirname.m4
+dos.m4
+error.m4
+getopt.m4
 gettext.m4
 glibc21.m4
+hash.m4
 iconv.m4
 intdiv0.m4
 inttypes-pri.m4
@@ -13,9 +17,20 @@ lcmessage.m4
 lib-ld.m4
 lib-link.m4
 lib-prefix.m4
+mbrtowc.m4
+mbswidth.m4
 nls.m4
+obstack.m4
+onceonly.m4
 po.m4
 progtest.m4
+quote.m4
+quotearg.m4
+stdbool.m4
 stdint_h.m4
+stpcpy.m4
+strnlen.m4
 uintmax_t.m4
 ulonglong.m4
+unlocked-io.m4
+xalloc.m4
Index: po/.cvsignore
===================================================================
RCS file: /cvsroot/bison/bison/po/.cvsignore,v
retrieving revision 1.8
diff -p -u -r1.8 .cvsignore
--- po/.cvsignore       24 Dec 2003 08:32:43 -0000      1.8
+++ po/.cvsignore       28 Apr 2004 19:58:16 -0000
@@ -1,13 +1,14 @@
-ChangeLog
+*.gmo
+*.po
+LINGUAS
 Makefile
 Makefile.in
+Makefile.in.in
+Makevars
 Makevars.template
 POTFILES
-bison.pot
-stamp-po
-*.gmo
-Makefile.in
 Rules-quot
+bison.pot
 boldquot.sed
 address@hidden
 address@hidden
@@ -15,3 +16,4 @@ insert-header.sin
 quot.sed
 remove-potcdate.sed
 remove-potcdate.sin
+stamp-po
Index: src/.cvsignore
===================================================================
RCS file: /cvsroot/bison/bison/src/.cvsignore,v
retrieving revision 1.14
diff -p -u -r1.14 .cvsignore
--- src/.cvsignore      14 Mar 2003 01:23:04 -0000      1.14
+++ src/.cvsignore      28 Apr 2004 19:58:16 -0000
@@ -1,10 +1,9 @@
-*_.c
+*.flc
+*.log
 .deps
 Makefile
-bison
-*.log
-*.flc
 Makefile.in
+bison
 scan-gram.c
 scan-skel.c
 yacc
Index: src/files.c
===================================================================
RCS file: /cvsroot/bison/bison/src/files.c,v
retrieving revision 1.85
diff -p -u -r1.85 files.c
--- src/files.c 2 Jan 2003 20:27:54 -0000       1.85
+++ src/files.c 28 Apr 2004 19:58:16 -0000
@@ -1,6 +1,6 @@
 /* Open and close files for Bison.
 
-   Copyright (C) 1984, 1986, 1989, 1992, 2000, 2001, 2002, 2003
+   Copyright (C) 1984, 1986, 1989, 1992, 2000, 2001, 2002, 2003, 2004
    Free Software Foundation, Inc.
 
    This file is part of Bison, the GNU Compiler Compiler.
@@ -26,6 +26,7 @@
 #include <error.h>
 #include <get-errno.h>
 #include <quote.h>
+#include <xstrndup.h>
 
 #include "complain.h"
 #include "files.h"
Index: src/system.h
===================================================================
RCS file: /cvsroot/bison/bison/src/system.h,v
retrieving revision 1.62
diff -p -u -r1.62 system.h
--- src/system.h        28 Apr 2004 06:52:51 -0000      1.62
+++ src/system.h        28 Apr 2004 19:58:16 -0000
@@ -55,29 +55,15 @@ typedef size_t uintptr_t;
 
 #include <xalloc.h>
 #define CALLOC(P, N) ((P) = xcalloc (N, sizeof *(P)))
-#define MALLOC(P, N) ((P) = xmalloc ((N) * sizeof *(P)))
-#define REALLOC(P, N) ((P) = xrealloc (P, (N) * sizeof *(P)))
-
-/* From xstrndup.c.  */
-char *xstrndup (const char *str, size_t size);
+#define MALLOC(P, N) ((P) = xnmalloc (N, sizeof *(P)))
+#define REALLOC(P, N) ((P) = xnrealloc (P, N, sizeof *(P)))
 
 
 /*---------------------.
 | Missing prototypes.  |
 `---------------------*/
 
-#if defined HAVE_DECL_STPCPY && !HAVE_DECL_STPCPY
-char *stpcpy (char *dest, const char *src);
-#endif
-
-#if defined HAVE_DECL_STRNLEN && !HAVE_DECL_STRNLEN
-size_t strnlen (const char *str, size_t maxlen);
-#endif
-
-#if defined HAVE_DECL_MEMRCHR && !HAVE_DECL_MEMRCHR
-void *memrchr (const void *str, int ch, size_t size);
-#endif
-
+#include <stpcpy.h>
 
 
 /*-----------------.




reply via email to

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