Use some of gnulib's new modules, taken from coreutils.

* bootstrap: Sync from coreutils, except add support for gnulib_files.
* bootstrap.conf: New file.
(gnulib_modules): Add configmake, inttypes, unistd.
(XGETTEXT_OPTIONS): Add complain, complain_at,
fatal, fatal_at, warn, warn_at, unexpected_end.
* configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
(gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
(gl_EARLY): Add.
(AM_STDBOOL_H): Remove; gl_INIT now dows this.
(gl_INIT): Add
(GNULIB_AUTOCONF_SNIPPET): Remove.
(AM_GNU_GETTEXT): Add; require formatstring macros since that's
the pickiest.
* lib/.cvsignore: Add inttypes_.h.
* lib/Makefile.am: Include gnulib.mk first so we can append to it.
(AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
(BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
no-longer-necessary initializations.
(lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
* lib/subpipe.c: Include <unistd.h> unconditionally, now that we
use the unistd module.
* src/system.h: Likewise.
* m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
ulonglong.m4.  Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
* src/Makefile.am (DEFS): Remove, since configmake does this for us.
(AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
* src/system.h: Include inttypes.h unconditionally, now that we
use the inttypes module.  Don't bother to include stdint.h, since
inttypes.h now does that for us.
(LOCALEDIR): Remove, now that we use the configmake module.
* src/getargs.c: Include configmake.h.
* src/main.c: Likewise.
* src/output.c: Likewise.
* tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
not from $abs_top_builddir, since config.h moved.
This commit is contained in:
Paul Eggert
2006-09-15 18:59:40 +00:00
parent 41f58bae8b
commit 3b2942e671
14 changed files with 414 additions and 289 deletions

View File

@@ -1,24 +1,25 @@
## Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# Make bison/src.
## 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 of the License, or
## (at your option) any later version.
# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software
# Foundation, Inc.
## 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.
# 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.
## 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., 51 Franklin Street, Fifth Floor, Boston, MA
## 02110-1301 USA
# 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.
DEFS += -DPKGDATADIR=\"$(pkgdatadir)\" -DLOCALEDIR=\"$(datadir)/locale\"
# 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., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
AM_CFLAGS = $(WARNING_CFLAGS) $(WERROR_CFLAGS)
AM_CPPFLAGS = -I$(top_srcdir)/lib -I../lib
AM_CPPFLAGS = -I$(top_srcdir)/lib
AM_YFLAGS = "-dv"
LDADD = ../lib/libbison.a $(LIBINTL)

View File

@@ -25,6 +25,7 @@
#include "revision.h"
#include <argmatch.h>
#include <configmake.h>
#include <error.h>
/* Hack to get <getopt.h> to declare getopt with a prototype. */

View File

@@ -1,8 +1,7 @@
/* Top level entry point of Bison.
Copyright (C) 1984, 1986, 1989, 1992, 1995, 2000, 2001, 2002, 2004, 2005,
2006
Free Software Foundation, Inc.
Copyright (C) 1984, 1986, 1989, 1992, 1995, 2000, 2001, 2002, 2004,
2005, 2006 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
@@ -26,6 +25,7 @@
#include <bitset_stats.h>
#include <bitset.h>
#include <configmake.h>
#include <timevar.h>
#include "LR0.h"

View File

@@ -23,6 +23,7 @@
#include <config.h>
#include "system.h"
#include <configmake.h>
#include <error.h>
#include <get-errno.h>
#include <quotearg.h>

View File

@@ -45,15 +45,8 @@
# include <sys/types.h>
#endif
#if HAVE_UNISTD_H
# include <unistd.h>
#endif
#if HAVE_INTTYPES_H
# include <inttypes.h>
#endif
#include <stdint.h>
#include <unistd.h>
#include <inttypes.h>
#ifndef UINTPTR_MAX
/* This isn't perfect, but it's good enough for Bison, which needs
@@ -120,15 +113,6 @@ typedef size_t uintptr_t;
#define N_(Msgid) (Msgid)
/*-------------------------------.
| Fix broken compilation flags. |
`-------------------------------*/
#ifndef LOCALEDIR
# define LOCALEDIR "/usr/local/share/locale"
#endif
/*-----------.
| Booleans. |
`-----------*/