]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltmain.in: Remove inferrence of mode, add shorthand for mode
authorPeter O'Gorman <peter@pogma.com>
Sun, 5 Oct 2003 14:50:14 +0000 (14:50 +0000)
committerPeter O'Gorman <peter@pogma.com>
Sun, 5 Oct 2003 14:50:14 +0000 (14:50 +0000)
choice.

ChangeLog
NEWS
ltmain.in

index 63769a2e46098d1432f2e4edf2d8e486c1b528cd..e7b21d37212fadb929735adb3ea516e39bd05fed 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-10-05  Peter O'Gorman <peter@pogma.com>, 
+       Gary V. Vaughan  <gary@gnu.org>
+
+       * ltmain.in: Remove inferrence of mode, add shorthand for mode
+       choice.
+
 2003-09-29  Scott James Remnant  <scott@netsplit.com>
 
        * m4/libtool.m4 (AC_DEPLIBS_CHECK_METHOD): Use pass_all for linux*
diff --git a/NEWS b/NEWS
index 532250f9a45d909a6b4d9063ea6c1d9794551206..ff4bace1671b2197d65a8147f748174b906e0290 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ NEWS - list of user-visible changes between releases of GNU Libtool
 
 New in 1.5b: 2003-??-??; CVS version 1.5a, Libtool team:
 * Bug fixes.
+* Mode inferrence removed, shorthand for choosing modes added.
 \f
 New in 1.5.1: 2003-??-??; CVS version 1.5.0a, Libtool team:
 * lt_dlrealloc is an official part of the libltdl API.
index d0149df3e0f095422254687042efaeb7729b15ab..fd9b2b87edb01824de5b72aa3a5bf38df01f81fd 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -158,6 +158,25 @@ win32_libid () {
 # End of Shell function definitions
 #####################################
 
+# Shorthand for --mode=foo
+case $1 in
+compile|compil|compi|comp|com|co|o)
+  shift; set -- --mode=compile ${1+"$@"}
+  ;;
+execute|execut|execu|exec|exe|ex|e)
+  shift; set -- --mode=execute ${1+"$@"}
+  ;;
+install|instal|insta|inst|ins|in|i)
+  shift; set -- --mode=install ${1+"$@"}
+  ;;
+link|lin|li|l)
+  shift; set -- --mode=link ${1+"$@"}
+  ;;
+uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+  shift; set -- --mode=uninstall ${1+"$@"}
+  ;;
+esac
+
 # Parse our command line options once, thoroughly.
 while test "$#" -gt 0
 do
@@ -307,49 +326,11 @@ fi
 # left over by shells.
 exec_cmd=
 
-if test -z "$show_help"; then
-
-  # Infer the operation mode.
-  if test -z "$mode"; then
-    $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
-    $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2
-    case $nonopt in
-    *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
-      mode=link
-      for arg
-      do
-       case $arg in
-       -c)
-          mode=compile
-          break
-          ;;
-       esac
-      done
-      ;;
-    *db | *dbx | *strace | *truss)
-      mode=execute
-      ;;
-    *install*|cp|mv)
-      mode=install
-      ;;
-    *rm)
-      mode=uninstall
-      ;;
-    *)
-      # If we have no mode, but dlfiles were specified, then do execute mode.
-      test -n "$execute_dlfiles" && mode=execute
-
-      # Just use the default operation mode.
-      if test -z "$mode"; then
-       if test -n "$nonopt"; then
-         $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
-       else
-         $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
-       fi
-      fi
-      ;;
-    esac
-  fi
+  if test -z "$show_help"; then
+    if test -z "$mode"; then
+      $echo "$modename: error: you must specify a MODE." 1>&2
+      exit 1
+    fi
 
   # Only execute mode is allowed to have -dlopen flags.
   if test -n "$execute_dlfiles" && test "$mode" != execute; then
@@ -6177,7 +6158,7 @@ Provide generalized library-building support services.
     --features        display basic configuration information and exit
     --finish          same as \`--mode=finish'
     --help            display this help message and exit
-    --mode=MODE       use operation mode MODE [default=inferred from MODE-ARGS]
+    --mode=MODE       use operation mode MODE
     --quiet           same as \`--silent'
     --silent          don't print informational messages
     --tag=TAG         use configuration variables from tag TAG