libtool-commit
[Top][All Lists]
Advanced

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

[SCM] GNU Libtool branch, master, updated. v2.2.6-184-gefa4728


From: Charles Wilson
Subject: [SCM] GNU Libtool branch, master, updated. v2.2.6-184-gefa4728
Date: Sun, 21 Feb 2010 05:43:16 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Libtool".

The branch, master has been updated
       via  efa47280559a504a410c83b2ae599d52c0af7e34 (commit)
      from  2613ea3ab217696ef2799e887bfc9e9362e91e35 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit efa47280559a504a410c83b2ae599d52c0af7e34
Author: Charles Wilson <address@hidden>
Date:   Sun Jul 12 17:40:26 2009 -0400

    Add --lt-* options to shell wrapper
    
    * libltdl/config/ltmain.m4sh (func_emit_wrapper): Call
    func_parse_lt_options early. Use func_exec_program.
    (func_emit_wrapper:func_parse_lt_options): New function.
    (func_emit_wrapper:func_lt_dump_args): New function.
    (func_emit_wrapper:func_exec_program_core): New function.
    (func_emit_wrapper:func_exec_program): New function.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                  |   10 ++++
 libltdl/config/ltmain.m4sh |  124 +++++++++++++++++++++++++++++++++++++-------
 2 files changed, 115 insertions(+), 19 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c9027e9..6dde890 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2010-02-21  Charles Wilson <address@hidden>
 
+       Add --lt-* options to shell wrapper
+       * libltdl/config/ltmain.m4sh (func_emit_wrapper): Call
+       func_parse_lt_options early. Use func_exec_program.
+       (func_emit_wrapper:func_parse_lt_options): New function.
+       (func_emit_wrapper:func_lt_dump_args): New function.
+       (func_emit_wrapper:func_exec_program_core): New function.
+       (func_emit_wrapper:func_exec_program): New function.
+
+2010-02-21  Charles Wilson <address@hidden>
+
        Enable runtime cwrapper debugging; add tests
        * libltdl/config/ltmain.m4sh (func_emit_cwrapperexe_src):
        Update comments. Initialize program_name. Eliminate _LENGTH
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index cb0672b..043d980 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -2407,7 +2407,110 @@ func_fallback_echo ()
 _LTECHO_EOF'
 }
     ECHO=\"$qECHO\"
-  fi\
+  fi
+
+# Very basic option parsing. These options are (a) specific to
+# the libtool wrapper, (b) are identical between the wrapper
+# /script/ and the wrapper /executable/ which is used only on
+# windows platforms, and (c) all begin with the string "--lt-"
+# (application programs are unlikely to have options which match
+# this pattern).
+#
+# There are only two supported options: --lt-debug and
+# --lt-dump-script. There is, deliberately, no --lt-help.
+#
+# The first argument to this parsing function should be the
+# script's $0 value, followed by "$@".
+lt_option_debug=
+func_parse_lt_options ()
+{
+  lt_script_arg0=\$0
+  shift
+  for lt_opt
+  do
+    case \"\$lt_opt\" in
+    --lt-debug) lt_option_debug=1 ;;
+    --lt-dump-script)
+        lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 
's%/[^/]*$%%'\`
+        test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
+        lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 
's%^.*/%%'\`
+        cat \"\$lt_dump_D/\$lt_dump_F\"
+        exit 0
+      ;;
+    --lt-*)
+        \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
+        exit 1
+      ;;
+    esac
+  done
+
+  # Print the debug banner immediately:
+  if test -n \"\$lt_option_debug\"; then
+    echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU 
$PACKAGE$TIMESTAMP) $VERSION\" 1>&2
+  fi
+}
+
+# Used when --lt-debug. Prints its arguments to stdout
+# (redirection is the responsibility of the caller)
+func_lt_dump_args ()
+{
+  lt_dump_args_N=1;
+  for lt_arg
+  do
+    \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: 
\$lt_arg\"
+    lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
+  done
+}
+
+# Core function for launching the target application
+func_exec_program_core ()
+{
+"
+  case $host in
+  # Backslashes separate directories on plain windows
+  *-*-mingw | *-*-os2* | *-cegcc*)
+    $ECHO "\
+      if test -n \"\$lt_option_debug\"; then
+        \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: 
\$progdir\\\\\$program\" 1>&2
+        func_lt_dump_args \${1+\"address@hidden"} 1>&2
+      fi
+      exec \"\$progdir\\\\\$program\" \${1+\"address@hidden"}
+"
+    ;;
+
+  *)
+    $ECHO "\
+      if test -n \"\$lt_option_debug\"; then
+        \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: 
\$progdir/\$program\" 1>&2
+        func_lt_dump_args \${1+\"address@hidden"} 1>&2
+      fi
+      exec \"\$progdir/\$program\" \${1+\"address@hidden"}
+"
+    ;;
+  esac
+  $ECHO "\
+      \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
+      exit 1
+}
+
+# A function to encapsulate launching the target application
+# Strips options in the --lt-* namespace from \$@ and
+# launches target application with the remaining arguments.
+func_exec_program ()
+{
+  for lt_wr_arg
+  do
+    case \$lt_wr_arg in
+    --lt-*) ;;
+    *) set x \"address@hidden" \"\$lt_wr_arg\"; shift;;
+    esac
+    shift
+  done
+  func_exec_program_core \${1+\"address@hidden"}
+}
+
+  # Parse options
+  func_parse_lt_options \"\$0\" \${1+\"address@hidden"}
 
   # Find the directory that this script lives in.
   thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
@@ -2520,24 +2623,7 @@ _LTECHO_EOF'
        $ECHO "\
     if test \"\$libtool_execute_magic\" != \"$magic\"; then
       # Run the actual program with our arguments.
-"
-       case $host in
-       # Backslashes separate directories on plain windows
-       *-*-mingw | *-*-os2* | *-cegcc*)
-         $ECHO "\
-      exec \"\$progdir\\\\\$program\" \${1+\"address@hidden"}
-"
-         ;;
-
-       *)
-         $ECHO "\
-      exec \"\$progdir/\$program\" \${1+\"address@hidden"}
-"
-         ;;
-       esac
-       $ECHO "\
-      \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
-      exit 1
+      func_exec_program \${1+\"address@hidden"}
     fi
   else
     # The program doesn't exist.


hooks/post-receive
-- 
GNU Libtool




reply via email to

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