aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2012-05-20 19:33:13 -0700
committerPaul Eggert2012-05-20 19:33:13 -0700
commit9b4ee6166fd8da5f8006a265f775d84e60c15be7 (patch)
tree93ab66a914aecf8114ce919fab4cc34ed0ae0d5b
parentb847032c75e0cb4041a8736886e7054beb6f8696 (diff)
downloademacs-9b4ee6166fd8da5f8006a265f775d84e60c15be7.tar.gz
emacs-9b4ee6166fd8da5f8006a265f775d84e60c15be7.zip
Make merging from gnulib a script, not a makefile action.
Putting it in a makefile has some problems with reflection, as merging from gnulib updates 'configure', which can update the makefile. Putting it in a standalone script breaks this loop. * Makefile.in (gnulib_srcdir, $(gnulib_srcdir), DOS_gnulib_comp.m4) (GNULIB_MODULES, GNULIB_TOOL_FLAGS, sync-from-gnulib): Remove, moving the actions to the script admin/merge-gnulib. * admin/merge-gnulib: New script, with actions moved here from ../Makefile.in.
-rw-r--r--ChangeLog10
-rw-r--r--Makefile.in37
-rw-r--r--admin/ChangeLog6
-rwxr-xr-xadmin/merge-gnulib88
4 files changed, 104 insertions, 37 deletions
diff --git a/ChangeLog b/ChangeLog
index 9cc5e493dd0..f95549d66a3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
12012-05-21 Paul Eggert <eggert@cs.ucla.edu>
2
3 Make merging from gnulib a script, not a makefile action.
4 Putting it in a makefile has some problems with reflection, as
5 merging from gnulib updates 'configure', which can update the makefile.
6 Putting it in a standalone script breaks this loop.
7 * Makefile.in (gnulib_srcdir, $(gnulib_srcdir), DOS_gnulib_comp.m4)
8 (GNULIB_MODULES, GNULIB_TOOL_FLAGS, sync-from-gnulib):
9 Remove, moving the actions to the script admin/merge-gnulib.
10
12012-05-21 Glenn Morris <rgm@gnu.org> 112012-05-21 Glenn Morris <rgm@gnu.org>
2 12
3 * Makefile.in (install-arch-indep, install-doc, install-info) 13 * Makefile.in (install-arch-indep, install-doc, install-info)
diff --git a/Makefile.in b/Makefile.in
index 90afd2310dd..f978f19e974 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -309,43 +309,6 @@ src: lib-src FRC
309# and `leim'. 309# and `leim'.
310lisp leim: src 310lisp leim: src
311 311
312# Maintainers can put a copy of gnulib into $(gnulib_srcdir).
313gnulib_srcdir = ../gnulib
314$(gnulib_srcdir):
315 git clone git://git.savannah.gnu.org/gnulib.git $@
316
317# A shorter name that satisfies MS-DOS 8+3 constraints.
318DOS_gnulib_comp.m4 = gl-comp.m4
319
320# Update modules from gnulib, for maintainers, who should have it in
321# $(gnulib_srcdir) (relative to $(srcdir) and should have build tools
322# as per $(gnulib_srcdir)/DEPENDENCIES.
323GNULIB_MODULES = \
324 alloca-opt \
325 careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr \
326 dup2 \
327 filemode getloadavg getopt-gnu ignore-value intprops lstat \
328 manywarnings mktime pthread_sigmask readlink \
329 socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat \
330 warnings
331GNULIB_TOOL_FLAGS = \
332 --avoid=msvc-inval --avoid=msvc-nothrow \
333 --avoid=raise --avoid=threadlib \
334 --conditional-dependencies --import --no-changelog --no-vc-files \
335 --makefile-name=gnulib.mk
336sync-from-gnulib: $(gnulib_srcdir)
337 -cd $(srcdir)/m4 && cp $(DOS_gnulib_comp.m4) gnulib-comp.m4
338 cd $(srcdir) && \
339 $(gnulib_srcdir)/gnulib-tool $(GNULIB_TOOL_FLAGS) $(GNULIB_MODULES)
340 cd $(srcdir)/m4 && rm gnulib-cache.m4 warn-on-use.m4
341 cd $(srcdir)/m4 && mv gnulib-comp.m4 $(DOS_gnulib_comp.m4)
342 cp $(gnulib_srcdir)/build-aux/texinfo.tex $(srcdir)/doc/misc
343 cp \
344 $(gnulib_srcdir)/build-aux/move-if-change \
345 $(srcdir)/build-aux
346 cd $(srcdir) && autoreconf -i -I m4
347.PHONY: sync-from-gnulib
348
349# These targets should be "${SUBDIR} without `src'". 312# These targets should be "${SUBDIR} without `src'".
350lib lib-src lisp leim: Makefile FRC 313lib lib-src lisp leim: Makefile FRC
351 cd $@ && $(MAKE) all $(MFLAGS) \ 314 cd $@ && $(MAKE) all $(MFLAGS) \
diff --git a/admin/ChangeLog b/admin/ChangeLog
index 55504b3d6f8..86069da7f0b 100644
--- a/admin/ChangeLog
+++ b/admin/ChangeLog
@@ -1,3 +1,9 @@
12012-05-21 Paul Eggert <eggert@cs.ucla.edu>
2
3 Make merging from gnulib a script, not a makefile action.
4 * merge-gnulib: New script, with actions moved here from
5 ../Makefile.in.
6
12012-05-19 Paul Eggert <eggert@cs.ucla.edu> 72012-05-19 Paul Eggert <eggert@cs.ucla.edu>
2 8
3 * CPP-DEFINES (HAVE_GETDOMAINNAME): Remove. 9 * CPP-DEFINES (HAVE_GETDOMAINNAME): Remove.
diff --git a/admin/merge-gnulib b/admin/merge-gnulib
new file mode 100755
index 00000000000..57b71ee4a74
--- /dev/null
+++ b/admin/merge-gnulib
@@ -0,0 +1,88 @@
1#! /bin/sh
2# Merge gnulib sources into Emacs sources.
3# Typical usage:
4#
5# admin/merge-gnulib
6
7# Copyright 2012 Free Software Foundation, Inc.
8
9# This file is part of GNU Emacs.
10
11# GNU Emacs is free software: you can redistribute it and/or modify
12# it under the terms of the GNU General Public License as published by
13# the Free Software Foundation, either version 3 of the License, or
14# (at your option) any later version.
15
16# GNU Emacs is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19# GNU General Public License for more details.
20
21# You should have received a copy of the GNU General Public License
22# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
23
24# written by Paul Eggert
25
26GNULIB_URL=git://git.savannah.gnu.org/gnulib.git
27
28GNULIB_MODULES='
29 alloca-opt
30 careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512
31 dtoastr dup2
32 filemode getloadavg getopt-gnu ignore-value intprops lstat
33 manywarnings mktime pthread_sigmask readlink
34 socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat
35 warnings
36'
37
38GNULIB_TOOL_FLAGS='
39 --avoid=msvc-inval --avoid=msvc-nothrow
40 --avoid=raise --avoid=threadlib
41 --conditional-dependencies --import --no-changelog --no-vc-files
42 --makefile-name=gnulib.mk
43'
44
45# The source directory, with a trailing '/'.
46# If empty, the source directory is the working directory.
47src=$2
48case $src in
49 */ | '') ;;
50 *) src=$src/ ;;
51esac
52
53# Gnulib's source directory.
54gnulib_srcdir=${1-$src../gnulib}
55
56case $gnulib_srcdir in
57 -*) src=- ;;
58esac
59case $src in
60 -*)
61 echo >&2 "$0: usage: $0 [GNULIB_SRCDIR [SRCDIR]]
62
63 SRCDIR is the Emacs source directory (default: working directory).
64 GNULIB_SRCDIR is the Gnulib source directory (default: SRCDIR/../gnulib)."
65 exit 1 ;;
66esac
67
68test -x "$src"autogen.sh || {
69 echo >&2 "$0: '${src:-.}' is not an Emacs source directory."
70 exit 1
71}
72
73test -d "$gnulib_srcdir" ||
74git clone -- "$GNULIB_URL" "$gnulib_srcdir" ||
75exit
76
77test -x "$gnulib_srcdir"/gnulib-tool || {
78 echo >&2 "$0: '$gnulib_srcdir' is not a Gnulib source directory."
79 exit 1
80}
81
82cp -- "$src"m4/gl-comp.m4 "$src"m4/gnulib-comp.m4 &&
83"$gnulib_srcdir"/gnulib-tool --dir="$src" $GNULIB_TOOL_FLAGS $GNULIB_MODULES &&
84rm -- "$src"m4/gnulib-cache.m4 "$src"m4/warn-on-use.m4 &&
85mv -- "$src"m4/gnulib-comp.m4 "$src"m4/gl-comp.m4 &&
86cp -- "$gnulib_srcdir"/build-aux/texinfo.tex "$src"doc/misc &&
87cp -- "$gnulib_srcdir"/build-aux/move-if-change "$src"build-aux &&
88autoreconf -i -I m4 -- ${src:+"$src"}