]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* bin/autoconf.as: Don't exit with status 0 after write failure
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 2 Feb 2005 23:31:16 +0000 (23:31 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 2 Feb 2005 23:31:16 +0000 (23:31 +0000)
with --help or --version.
* lib/autoconf/general.m4 (_AC_INIT_HELP, _AC_INIT_VERSION): Likewise.
* lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Likewise.

bin/autoconf.as
lib/autoconf/general.m4
lib/autoconf/status.m4

index 076c8f6fa04f956f2cadd7b62e1925728c48f82f..33d9404904272415bd46c4fd3e79c916d5784880 100644 (file)
@@ -1,6 +1,6 @@
 AS_INIT[]dnl                                            -*- shell-script -*-
 # autoconf -- create `configure' using m4 macros
-# Copyright (C) 1992, 1993, 1994, 1996, 1999, 2000, 2001, 2002, 2003, 2004
+# Copyright (C) 1992, 1993, 1994, 1996, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 # Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
@@ -91,9 +91,9 @@ while test $# -gt 0 ; do
               "x$1" : 'x-.\(.*\)'`]
   case $1 in
     --version | -V )
-       echo "$version" ; exit ;;
+       echo "$version" ; exit ;;
     --help | -h )
-       echo "$usage"; exit ;;
+       echo "$usage"; exit ;;
 
     --verbose | -v )
        verbose=echo
index 5e56f3040c18948c15109db07b68a0b644bc479d..5ec5559d6e24c17c22d57bcd54b1fde6d2c08bdb 100644 (file)
@@ -355,7 +355,7 @@ m4_ifset([AC_PACKAGE_BUGREPORT],
 m4_define([_AC_INIT_COPYRIGHT],
 [AC_COPYRIGHT(
 [Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002,
-2003, 2004 Free Software Foundation, Inc.
+2003, 2004, 2005 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.],
              [VERSION_FSF])dnl
@@ -1045,6 +1045,7 @@ m4_divert_push([HELP_END])dnl
 m4_ifset([AC_PACKAGE_BUGREPORT], [
 Report bugs to <AC_PACKAGE_BUGREPORT>.])
 _ACEOF
+ac_status=$?
 fi
 
 if test "$ac_init_help" = "recursive"; then
@@ -1053,26 +1054,26 @@ if test "$ac_init_help" = "recursive"; then
   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
     test -d $ac_dir || continue
     _AC_SRCDIRS(["$ac_dir"])
-    cd $ac_dir
+    cd $ac_dir || { ac_status=$?; continue; }
     # Check for guested configure; otherwise get Cygnus style configure.
     if test -f $ac_srcdir/configure.gnu; then
-      echo
+      echo &&
       $SHELL $ac_srcdir/configure.gnu  --help=recursive
     elif test -f $ac_srcdir/configure; then
-      echo
+      echo &&
       $SHELL $ac_srcdir/configure  --help=recursive
     elif test -f $ac_srcdir/configure.ac ||
           test -f $ac_srcdir/configure.in; then
-      echo
+      echo &&
       $ac_configure --help
     else
       AC_MSG_WARN([no configuration information is in $ac_dir])
-    fi
-    cd "$ac_popdir"
+    fi || ac_status=$?
+    cd "$ac_popdir" || { ac_status=$?; break; }
   done
 fi
 
-test -n "$ac_init_help" && exit 0
+test -n "$ac_init_help" && exit $ac_status
 m4_divert_pop([HELP_END])dnl
 ])# _AC_INIT_HELP
 
@@ -1092,7 +1093,7 @@ m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
 generated by m4_PACKAGE_STRING])])
 m4_divert_text([VERSION_END],
 [_ACEOF
-  exit 0
+  exit
 fi])dnl
 ])# _AC_INIT_VERSION
 
index ca54ab6dd43adb2e00ba7380d29b79155a5fa04a..1511744886a42cedcf8822bc6ce9f15b58b37684 100644 (file)
@@ -1,7 +1,7 @@
 # This file is part of Autoconf.                       -*- Autoconf -*-
 # Parameterizing and creating config.status.
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004 Free Software Foundation, Inc.
+# 2002, 2003, 2004, 2005 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
@@ -1390,7 +1390,7 @@ m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
 configured by $[0], generated by m4_PACKAGE_STRING,
   with options \\"`echo "$ac_configure_args" | sed 's/[[\\""\`\$]]/\\\\&/g'`\\"
 
-Copyright (C) 2004 Free Software Foundation, Inc.
+Copyright (C) 2005 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 srcdir=$srcdir
@@ -1431,13 +1431,13 @@ cat >>$CONFIG_STATUS <<\_ACEOF
   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
     ac_cs_recheck=: ;;
   --version | --vers* | -V )
-    echo "$ac_cs_version"; exit ;;
+    echo "$ac_cs_version"; exit ;;
   --he | --h)
     # Conflict between --help and --header
     AC_MSG_ERROR([ambiguous option: $[1]
 Try `$[0] --help' for more information.]);;
   --help | --hel | -h )
-    echo "$ac_cs_usage"; exit ;;
+    echo "$ac_cs_usage"; exit ;;
   --debug | --d* | -d )
     debug=: ;;
   --file | --fil | --fi | --f )