[libvirt] PATCH: ALlow for quiet build

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

 



This is a simpler version of

http://www.redhat.com/archives/libvir-list/2009-April/msg00523.html

just overriding the LIBTOOL variable in configure.in, instead of in each
Makefile.am

As before you still need 'make -s' to get full effect

Daniel

diff -r f94c0624da5c configure.in
--- a/configure.in	Fri May 08 11:41:29 2009 +0100
+++ b/configure.in	Mon May 11 16:46:08 2009 +0100
@@ -57,6 +57,9 @@ dnl Support building Win32 DLLs (must ap
 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 -r f94c0624da5c mylibtool
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mylibtool	Mon May 11 16:46:08 2009 +0100
@@ -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 "$@"

-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]