]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Add libtool wrapper to allow quiet build with "make -s"
authorDaniel P. Berrange <berrange@redhat.com>
Tue, 12 May 2009 15:40:03 +0000 (15:40 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 12 May 2009 15:40:03 +0000 (15:40 +0000)
ChangeLog
configure.in
mylibtool [new file with mode: 0755]

index d57c391c9f91cc1a28c2ef47ca10e89333e1bb9d..5be64adbf8e72a7f9f418d568b20332f13c73d49 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Tue May 12 16:38:22 BST 2009 Daniel P. Berrange <berrange@redhat.com>
+
+       Allow for quieter build with 'make -s'
+       * configure.in: Use 'mylibtool' wrapper around 'libtool'
+       * mylibtool: Quiet version of libtool just printing build
+       target name without flags.
+
 Tue May 12 16:35:22 BST 2009 Daniel P. Berrange <berrange@redhat.com>
 
        Improve driver open URI handling
index 1cdb64c6cbc99eefb3dc4491e7d5d555e49b8e2a..8116fc8e6e4b023571b2c871927f80ef4a818fe9 100644 (file)
@@ -57,6 +57,9 @@ dnl Support building Win32 DLLs (must appear *before* AM_PROG_LIBTOOL)
 AC_LIBTOOL_WIN32_DLL
 
 AM_PROG_LIBTOOL
+dnl Override normal libtool in favour of our quiet version
+LIBTOOL='$(SHELL) $(top_srcdir)/mylibtool'
+AC_SUBST([LIBTOOL])
 
 AM_PROG_CC_C_O
 
diff --git a/mylibtool b/mylibtool
new file mode 100755 (executable)
index 0000000..58ea8cf
--- /dev/null
+++ b/mylibtool
@@ -0,0 +1,58 @@
+#!/bin/sh
+
+mode=libtool
+cfiles=""
+ofiles=""
+afiles=""
+
+wantnext=0
+for v in "$@"
+do
+  case $v
+  in
+     --mode=compile)
+        mode=CC
+        ;;
+     --mode=link)
+        mode=LD
+        ;;
+  esac
+
+  case $v
+  in
+    *.c)
+    cfiles="$cfiles $v"
+    ;;
+    *.o)
+    if [ "$mode" = "LD" -o "$wantnext" = "1" ]; then
+      ofiles="$ofiles $v"
+    fi
+    ;;
+    *.lo)
+    if [ "$mode" = "LD" -o "$wantnext" = "1" ]; then
+      ofiles="$ofiles $v"
+    fi
+    ;;
+  esac
+
+  if [ "$mode" = "LD" -a "$wantnext" = "1" ]; then
+      afiles="$afiles $v"
+  fi
+
+  if [ "$v" = "-o" ]; then
+    wantnext=1
+  else
+    wantnext=0
+  fi
+done
+
+args=""
+test -n "$afiles" && args="$args -o$afiles"
+test -n "$ofiles" -a "$mode" = "CC" && args="$args -o"
+test -n "$ofiles" && args="$args$ofiles"
+test -n "$cfiles" && args="$args$cfiles"
+
+echo "($mode)$args"
+
+here=`dirname $0`
+exec $here/libtool --silent "$@"