Emacs crashes with ImageMagick 6.8.2-3 through 6.8.3-9.
[bpt/emacs.git] / autogen / update_autogen
index 6c9766e..264d8d8 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 ### update_autogen - update the generated files in Emacs autogen/ directory
 
-## Copyright (C) 2011  Free Software Foundation, Inc.
+## Copyright (C) 2011-2013 Free Software Foundation, Inc.
 
 ## Author: Glenn Morris <rgm@gnu.org>
 
@@ -51,7 +51,7 @@ cd ../
 usage ()
 {
     cat 1>&2 <<EOF
-Usage: ${PN} [-f] [-c] [-q] [-l] [-C] [-- make-flags]
+Usage: ${PN} [-f] [-c] [-q] [-l [-L]] [-C] [-- make-flags]
 Update the generated files in the Emacs autogen/ directory.
 Options:
 -f: force an update even if the source files are locally modified.
@@ -60,6 +60,7 @@ Options:
 -q: be quiet; only give error messages, not status messages.
 -l: also update the versioned loaddefs-like files in lisp/.
 This requires a build.  Passes any non-option args to make (eg -- -j2).
+-L: also update ldefs-boot.el.
 -C: start from a clean state.  Slower, but more correct.
 EOF
     exit 1
@@ -73,12 +74,17 @@ commit=
 quiet=
 clean=
 ldefs_flag=
+lboot_flag=
 
 ## Parameters.
 ldefs_in=lisp/loaddefs.el
 ldefs_out=lisp/ldefs-boot.el
-sources="configure.in lib/Makefile.am"
-genfiles="configure aclocal.m4 src/config.in lib/Makefile.in compile config.guess config.sub depcomp install-sh missing"
+sources="configure.ac lib/Makefile.am"
+genfiles="
+  configure aclocal.m4 src/config.in lib/Makefile.in
+  build-aux/compile build-aux/config.guess build-aux/config.sub
+  build-aux/depcomp build-aux/install-sh build-aux/missing
+"
 
 for g in $genfiles; do
     basegen="$basegen ${g##*/}"
@@ -91,7 +97,7 @@ tempfile=/tmp/$PN.$$
 trap "rm -f $tempfile 2> /dev/null" EXIT
 
 
-while getopts ":hcflqC" option ; do
+while getopts ":hcflqCL" option ; do
     case $option in
         (h) usage ;;
 
@@ -105,6 +111,8 @@ while getopts ":hcflqC" option ; do
 
         (C) clean=1 ;;
 
+        (L) lboot_flag=1 ;;
+
         (\?) die "Bad option -$OPTARG" ;;
 
         (:) die "Option -$OPTARG requires an argument" ;;
@@ -264,7 +272,10 @@ echo "Running lisp/ make..."
 make -C lisp "$@" autoloads EMACS=../src/bootstrap-emacs || die "make src error"
 
 
-cp $ldefs_in $ldefs_out || die "cp ldefs_boot error"
+## Ignore comment differences.
+[ ! "$lboot_flag" ] || \
+    diff -q -I '^;' $ldefs_in $ldefs_out || \
+    cp $ldefs_in $ldefs_out || die "cp ldefs_boot error"
 
 
 cd lisp