summaryrefslogtreecommitdiff
path: root/lib/ar-lib
diff options
context:
space:
mode:
authorPeter Rosin <peda@lysator.liu.se>2010-08-12 18:01:18 +0200
committerPeter Rosin <peda@lysator.liu.se>2010-08-12 18:01:18 +0200
commit8c406f64b66aedee8359ddf1383e087faa2ba233 (patch)
tree3d69c454dc09c277f67113318b681c915cc612f0 /lib/ar-lib
parent9533d1f026a1ca8a3f77f64bc710f13cdaa1b410 (diff)
downloadautomake-8c406f64b66aedee8359ddf1383e087faa2ba233.tar.gz
Enable the use of "link -lib" as the wrapped archiver.
* lib/ar-lib: Enable the use of "link -lib" as the wrapped archiver, as well as allowing some other options to be passed through to the wrapped archiver. * tests/ar-lib.test: Test the above. Signed-off-by: Peter Rosin <peda@lysator.liu.se>
Diffstat (limited to 'lib/ar-lib')
-rwxr-xr-xlib/ar-lib26
1 files changed, 23 insertions, 3 deletions
diff --git a/lib/ar-lib b/lib/ar-lib
index aa4acbdaa..ef0343037 100755
--- a/lib/ar-lib
+++ b/lib/ar-lib
@@ -2,7 +2,7 @@
# Wrapper for Microsoft lib.exe
me=ar-lib
-scriptversion=2010-08-08.07; # UTC
+scriptversion=2010-08-12.16; # UTC
# Copyright (C) 2010 Free Software
# Foundation, Inc.
@@ -121,8 +121,28 @@ fi
AR=$1
shift
-action=$1
-shift
+while :
+do
+ if test $# -lt 2; then
+ func_error "you must specify a program, an action and an archive"
+ fi
+ case $1 in
+ -lib | -LIB \
+ | -ltcg | -LTCG \
+ | -machine* | -MACHINE* \
+ | -subsystem* | -SUBSYSTEM* \
+ | -verbose | -VERBOSE \
+ | -wx* | -WX* )
+ AR="$AR $1"
+ shift
+ ;;
+ *)
+ action=$1
+ shift
+ break
+ ;;
+ esac
+done
orig_archive=$1
shift
func_file_conv "$orig_archive"