libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: error on write failure with --version/--help


From: Ralf Wildenhues
Subject: FYI: error on write failure with --version/--help
Date: Wed, 2 Feb 2005 23:17:16 +0100
User-agent: Mutt/1.5.6+20040907i

As seen on automake-patches..

Against branch-1-5 below, against branch-2-0/HEAD attached.
(I thought it was useful to have errors for --config and --features as
well.)

Regards,
Ralf

        * ltmain.in, libtoolize.in: Exit with nonzero status on write failures
        with --help or --version or, in case of ltmain, --config or --features.

Index: libtoolize.in
===================================================================
RCS file: /cvsroot/libtool/libtool/Attic/libtoolize.in,v
retrieving revision 1.21.2.6
diff -u -r1.21.2.6 libtoolize.in
--- libtoolize.in       1 Feb 2005 13:57:10 -0000       1.21.2.6
+++ libtoolize.in       2 Feb 2005 22:01:45 -0000
@@ -82,7 +82,7 @@
 
 Report bugs to <address@hidden>.
 EOF
-    exit 0
+    exit $?
     ;;
 
   --version)
@@ -91,7 +91,7 @@
     echo "Copyright (C) 2003 Free Software Foundation, Inc."
     echo "This is free software; see the source for copying conditions.  There 
is NO"
     echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR 
PURPOSE."
-    exit 0
+    exit $?
     ;;
 
   --automake)
Index: ltmain.in
===================================================================
RCS file: /cvsroot/libtool/libtool/Attic/ltmain.in,v
retrieving revision 1.334.2.52
diff -u -r1.334.2.52 ltmain.in
--- ltmain.in   1 Feb 2005 07:35:38 -0000       1.334.2.52
+++ ltmain.in   2 Feb 2005 22:01:52 -0000
@@ -442,7 +442,7 @@
     $echo "Copyright (C) 2003  Free Software Foundation, Inc."
     $echo "This is free software; see the source for copying conditions.  
There is NO"
     $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR 
PURPOSE."
-    exit $EXIT_SUCCESS
+    exit $?
     ;;
 
   --config)
@@ -451,7 +451,7 @@
     for tagname in $taglist; do
       ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END 
LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
     done
-    exit $EXIT_SUCCESS
+    exit $?
     ;;
 
   --debug)
@@ -476,7 +476,7 @@
     else
       $echo "disable static libraries"
     fi
-    exit $EXIT_SUCCESS
+    exit $?
     ;;
 
   --finish) mode="finish" ;;
@@ -6408,7 +6409,7 @@
 $echo
 $echo "Try \`$modename --help' for more information about other modes."
 
-exit $EXIT_SUCCESS
+exit $?
 
 # The TAGs below are defined such that we never get into a situation
 # in which we disable both kinds of libraries.  Given conflicting

Attachment: help20
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]