2012-05-21 02:33:13 +00:00
|
|
|
#! /bin/sh
|
|
|
|
# Merge gnulib sources into Emacs sources.
|
|
|
|
# Typical usage:
|
|
|
|
#
|
|
|
|
# admin/merge-gnulib
|
|
|
|
|
|
|
|
# Copyright 2012 Free Software Foundation, Inc.
|
|
|
|
|
|
|
|
# This file is part of GNU Emacs.
|
|
|
|
|
|
|
|
# GNU Emacs 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.
|
|
|
|
|
|
|
|
# GNU Emacs 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 GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
# written by Paul Eggert
|
|
|
|
|
|
|
|
GNULIB_URL=git://git.savannah.gnu.org/gnulib.git
|
|
|
|
|
|
|
|
GNULIB_MODULES='
|
Use ASCII tests for character types.
* admin/merge-gnulib (GNULIB_MODULES): Add c-ctype.
* lwlib/lwlib-Xaw.c, lwlib/lwlib.c, lwlib/xlwmenu.c:
Don't include <ctype.h>; no longer needed.
* lwlib/lwlib-Xaw.c (openFont):
* lwlib/xlwmenu.c (openXftFont): Test just for ASCII digits.
* src/category.c, src/dispnew.c, src/doprnt.c, src/editfns.c, src/syntax.c
* src/term.c, src/xfns.c, src/xterm.c:
Don't include <ctype.h>; was not needed.
* src/charset.c, src/doc.c, src/fileio.c, src/font.c, src/frame.c:
* src/gtkutil.c, src/image.c, src/sysdep.c, src/xfaces.c:
Include <c-ctype.h> instead of <ctype.h>.
* src/nsterm.m: Include <c-ctype.h>.
* src/charset.c (read_hex):
* src/doc.c (Fsnarf_documentation):
* src/fileio.c (IS_DRIVE) [WINDOWSNT]:
(DRIVE_LETTER) [DOS_NT]:
(Ffile_name_directory, Fexpand_file_name)
(Fsubstitute_in_file_name):
* src/font.c (font_parse_xlfd, font_parse_fcname):
* src/frame.c (x_set_font_backend):
* src/gtkutil.c (xg_get_font):
* src/image.c (xbm_scan, xpm_scan, pbm_scan_number):
* src/nsimage.m (hexchar):
* src/nsterm.m (ns_xlfd_to_fontname):
* src/sysdep.c (system_process_attributes):
* src/xfaces.c (hash_string_case_insensitive):
Use C-locale tests instead of locale-specific tests for character
types, since we want the ASCII interpretation here, not the
interpretation suitable for whatever happens to be the current locale.
2012-08-16 21:58:44 +00:00
|
|
|
alloca-opt c-ctype c-strcase
|
2012-05-21 02:33:13 +00:00
|
|
|
careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512
|
2012-08-25 04:04:08 +00:00
|
|
|
dtoastr dtotimespec dup2 environ execinfo
|
2012-06-22 21:17:42 +00:00
|
|
|
filemode getloadavg getopt-gnu gettime gettimeofday
|
|
|
|
ignore-value intprops largefile lstat
|
|
|
|
manywarnings mktime pselect pthread_sigmask readlink
|
2012-08-14 17:45:25 +00:00
|
|
|
socklen stat-time stdalign stdarg stdbool stdio
|
Use Gnulib stdalign and environ modules (Bug#9772, Bug#9960).
* .bzrignore: Add lib/stdalign.h.
* config.bat: Do not set NO_DECL_ALIGN; no longer needed.
Copy lib/stdalign.in.h to lib/stdalign.in-h as needed.
* configure.ac (HAVE_ATTRIBUTE_ALIGNED): Remove the code that
fiddles with this, as gnulib now does this for us.
* admin/merge-gnulib: Add environ, stdalign.
* m4/environ.m4: New file, from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* lib/stdalign.in.h, m4/stdalign.m4: New files, from gnulib.
* sed2v2.inp (HAVE_ATTRIBUTE_ALIGNED): Remove edit.
* sedlibmk.inp (STDALIGN_H, @GL_GENERATE_STDALIGN_H_TRUE@)
(GL_GENERATE_STDALIGN_H_FALSE): New edits.
* nt/config.nt (HAVE_ATTRIBUTE_ALIGNED): Remove.
* src/alloc.c (XMALLOC_BASE_ALIGNMENT, GC_POINTER_ALIGNMENT, pure_alloc):
Simplify by using alignof.
(pure_alloc) [! USE_LSB_TAG]: Don't over-align EMACS_INT values.
* src/lisp.h: Include <stdalign.h>.
(GCALIGNMENT): New macro and constant.
(DECL_ALIGN): Remove. All uses replaced by alignas (GCALIGNMENT).
(USE_LSB_TAG): ifdef on alignas, not on DECL_ALIGN.
(stdalign): New macro, if not already defined.
2012-07-28 23:05:32 +00:00
|
|
|
strftime strtoimax strtoumax symlink sys_stat
|
2012-09-27 01:06:23 +00:00
|
|
|
sys_time time timer-time timespec-add timespec-sub utimens
|
2012-05-21 02:33:13 +00:00
|
|
|
warnings
|
|
|
|
'
|
|
|
|
|
|
|
|
GNULIB_TOOL_FLAGS='
|
2012-06-22 21:17:42 +00:00
|
|
|
--avoid=errno --avoid=fcntl --avoid=fcntl-h --avoid=fstat
|
2012-05-21 02:33:13 +00:00
|
|
|
--avoid=msvc-inval --avoid=msvc-nothrow
|
2012-06-22 21:17:42 +00:00
|
|
|
--avoid=raise --avoid=select --avoid=sigprocmask --avoid=sys_types
|
|
|
|
--avoid=threadlib
|
2012-05-21 02:33:13 +00:00
|
|
|
--conditional-dependencies --import --no-changelog --no-vc-files
|
|
|
|
--makefile-name=gnulib.mk
|
|
|
|
'
|
|
|
|
|
|
|
|
# The source directory, with a trailing '/'.
|
|
|
|
# If empty, the source directory is the working directory.
|
|
|
|
src=$2
|
|
|
|
case $src in
|
|
|
|
*/ | '') ;;
|
|
|
|
*) src=$src/ ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
# Gnulib's source directory.
|
|
|
|
gnulib_srcdir=${1-$src../gnulib}
|
|
|
|
|
|
|
|
case $gnulib_srcdir in
|
|
|
|
-*) src=- ;;
|
|
|
|
esac
|
|
|
|
case $src in
|
|
|
|
-*)
|
|
|
|
echo >&2 "$0: usage: $0 [GNULIB_SRCDIR [SRCDIR]]
|
|
|
|
|
|
|
|
SRCDIR is the Emacs source directory (default: working directory).
|
|
|
|
GNULIB_SRCDIR is the Gnulib source directory (default: SRCDIR/../gnulib)."
|
|
|
|
exit 1 ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
test -x "$src"autogen.sh || {
|
|
|
|
echo >&2 "$0: '${src:-.}' is not an Emacs source directory."
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
test -d "$gnulib_srcdir" ||
|
|
|
|
git clone -- "$GNULIB_URL" "$gnulib_srcdir" ||
|
|
|
|
exit
|
|
|
|
|
|
|
|
test -x "$gnulib_srcdir"/gnulib-tool || {
|
|
|
|
echo >&2 "$0: '$gnulib_srcdir' is not a Gnulib source directory."
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
"$gnulib_srcdir"/gnulib-tool --dir="$src" $GNULIB_TOOL_FLAGS $GNULIB_MODULES &&
|
|
|
|
rm -- "$src"m4/gnulib-cache.m4 "$src"m4/warn-on-use.m4 &&
|
|
|
|
cp -- "$gnulib_srcdir"/build-aux/texinfo.tex "$src"doc/misc &&
|
|
|
|
cp -- "$gnulib_srcdir"/build-aux/move-if-change "$src"build-aux &&
|
|
|
|
autoreconf -i -I m4 -- ${src:+"$src"}
|