[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.15-test2-137-g7f5fff9

Lennart Poettering gitmailer-noreply at 0pointer.de
Tue Feb 24 02:49:19 PST 2009


This is an automated email from the git hooks/post-receive script. It was
generated because of a push to the "PulseAudio Sound Server" repository.

The master branch has been updated
      from  71263929cb825acc1fed15fa33e110d77b2c37a7 (commit)

- Log -----------------------------------------------------------------
7f5fff9... Merge commit 'elmarco/shave'
16bb658... build: shave it!
-----------------------------------------------------------------------

Summary of changes:
 bootstrap.sh     |    6 ++++-
 configure.ac     |    5 ++++
 m4/shave.m4      |   69 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 shave-libtool.in |   69 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 shave.in         |   70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 218 insertions(+), 1 deletions(-)
 create mode 100644 m4/shave.m4
 create mode 100644 shave-libtool.in
 create mode 100644 shave.in

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

commit 16bb6580be39d8a3930f5c9860d4313e36c729a9
Author: Marc-André Lureau <marc-andre.lureau at nokia.com>
Date:   Mon Feb 23 23:20:19 2009 +0200

    build: shave it!
    
    http://damien.lespiau.name/blog/2009/02/18/shave-making-the-autotools-output-sane/

diff --git a/bootstrap.sh b/bootstrap.sh
index e64f342..4e223e3 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -49,6 +49,10 @@ if ! pkg-config --version &>/dev/null; then
     exit 1
 fi
 
+if type -p colorgcc > /dev/null ; then
+   export CC=colorgcc
+fi
+
 if [ "x$1" = "xam" ] ; then
     run_versioned automake "$VERSION" -a -c --foreign
     ./config.status
@@ -73,7 +77,7 @@ else
     run_versioned automake "$VERSION" --copy --foreign --add-missing
 
     if test "x$NOCONFIGURE" = "x"; then
-        CFLAGS="-g -O0" ./configure --sysconfdir=/etc --localstatedir=/var --enable-force-preopen "$@"
+        CFLAGS="-g -O0" ./configure --sysconfdir=/etc --localstatedir=/var --enable-force-preopen --enable-shave "$@"
         make clean
     fi
 fi
diff --git a/configure.ac b/configure.ac
index 11b091b..aab7e2d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1261,6 +1261,8 @@ AM_CONDITIONAL([FORCE_PREOPEN], [test "x$FORCE_PREOPEN" = "xyes"])
 
 AC_CONFIG_FILES([
 Makefile
+shave
+shave-libtool
 src/Makefile
 man/Makefile
 libpulse.pc
@@ -1272,7 +1274,10 @@ doxygen/doxygen.conf
 src/pulse/version.h
 po/Makefile.in
 ])
+
+SHAVE_INIT
 AC_OUTPUT
+SHAVE_OUTPUT
 
 # ==========================================================================
 ENABLE_X11=no
diff --git a/m4/shave.m4 b/m4/shave.m4
new file mode 100644
index 0000000..44d3908
--- /dev/null
+++ b/m4/shave.m4
@@ -0,0 +1,69 @@
+dnl Make automake/libtool output more friendly to humans
+dnl
+dnl SHAVE_INIT([shavedir])
+dnl
+dnl shavedir: the directory where the shave scripts are, it defaults to
+dnl           $(top_builddir)
+dnl
+dnl * SHAVE_INIT should be called late in your configure.(ac|in) file (just
+dnl   before AC_CONFIG_FILE/AC_OUTPUT is perfect.  This macro rewrites CC and
+dnl   LIBTOOL, you don't want the configure tests to have these variables
+dnl   re-defined.
+dnl * This macro requires GNU make's -s option.
+
+AC_DEFUN([SHAVE_INIT],
+[
+  dnl enable/disable shave
+  AC_ARG_ENABLE([shave],
+    AS_HELP_STRING([--enable-shave],
+                   [use shave to make the build pretty [[default=no]]]),,
+    [enable_shave=no])
+
+  if test x"$enable_shave" = xyes; then
+    dnl where can we find the shave scripts?
+    m4_if([$1],,
+      [shavedir='$(top_builddir)'],
+      [shavedir='$(top_builddir)'/$1])
+    AC_SUBST(shavedir)
+
+    dnl make is now quiet
+    AC_SUBST([MAKEFLAGS], [-s])
+    AC_SUBST([AM_MAKEFLAGS], ['`test -z $V && echo -s`'])
+
+    dnl we need sed
+    AC_CHECK_PROG(SED,sed,sed,false)
+
+    dnl substitute libtool
+    SHAVE_SAVED_LIBTOOL=$LIBTOOL
+    AC_SUBST(SHAVE_SAVED_LIBTOOL)
+    LIBTOOL="\$(SHELL) \$(shavedir)/shave-libtool '\$(SHAVE_SAVED_LIBTOOL)'"
+    AC_SUBST(LIBTOOL)
+
+    dnl substitute cc/cxx
+    SHAVE_SAVED_CC=$CC
+    SHAVE_SAVED_CXX=$CXX
+    AC_SUBST(SHAVE_SAVED_CC)
+    AC_SUBST(SHAVE_SAVED_CXX)
+    CC="\$(SHELL) \$(shavedir)/shave cc '\$(SHAVE_SAVED_CC)'"
+    CXX="\$(SHELL) \$(shavedir)/shave cxx '\$(SHAVE_SAVED_CXX)'"
+    AC_SUBST(CC)
+    AC_SUBST(CXX)
+
+    V=@
+  else
+    V=1
+  fi
+  Q='$(V:1=)'
+  AC_SUBST(V)
+  AC_SUBST(Q)
+])
+
+AC_DEFUN([SHAVE_OUTPUT],
+[
+  if test x"$enable_shave" = xyes; then
+    dnl small workaround to fix libtool itself
+    dnl it's shokingly hard to find a better way, really! wtf...
+    test -f $srcdir/libtool && (tmpfile=`mktemp` && cat $srcdir/libtool | sed "s,^LTCC=.*$,LTCC=\"$SHELL $ac_pwd/shave cc $SHAVE_SAVED_CC\"," > $tmpfile && mv $tmpfile $srcdir/libtool)
+  fi
+
+])
diff --git a/shave-libtool.in b/shave-libtool.in
new file mode 100644
index 0000000..30e6f13
--- /dev/null
+++ b/shave-libtool.in
@@ -0,0 +1,69 @@
+#!/bin/sh
+
+# we need sed
+SED=@SED@
+if test -z "$SED" ; then
+SED=sed
+fi
+
+lt_unmangle ()
+{
+   last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_]\*_la-##'`
+}
+
+# the real libtool to use
+LIBTOOL="$1"
+shift
+
+# if 1, don't print anything, the underlaying wrapper will do it
+pass_though=0
+
+# scan the arguments, keep the right ones for libtool, and discover the mode
+preserved_args=
+while test "$#" -gt 0; do
+    opt="$1"
+    shift
+
+    case $opt in
+    --mode=*)
+        mode=`echo $opt | $SED -e 's/[-_a-zA-Z0-9]*=//'`
+        preserved_args="$preserved_args $opt"
+        ;;
+    -o)
+        lt_output="$1"
+        preserved_args="$preserved_args $opt"
+	;;
+    *)
+        preserved_args="$preserved_args $opt"
+        ;;
+      esac
+done
+
+case "$mode" in
+compile)
+    # shave will be called and print the actual CC/CXX/LINK line
+    preserved_args="$preserved_args --shave-mode=$mode"
+    pass_though=1
+    ;;
+link)
+    preserved_args="$preserved_args --shave-mode=$mode"
+    Q="  LINK  "
+    ;;
+*)
+    # let's u
+    # echo "*** libtool: Unimplemented mode: $mode, fill a bug report"
+    ;;
+esac
+
+lt_unmangle "$lt_output"
+output=$last_result
+
+if test -z $V; then
+    if test $pass_though -eq 0; then
+        echo "$Q$output"
+    fi
+    $LIBTOOL --silent $preserved_args
+else
+    echo $LIBTOOL $preserved_args
+    $LIBTOOL $preserved_args
+fi
diff --git a/shave.in b/shave.in
new file mode 100644
index 0000000..dc46ec9
--- /dev/null
+++ b/shave.in
@@ -0,0 +1,70 @@
+#!/bin/sh
+
+# we need sed
+SED=@SED@
+if test -z "$SED" ; then
+SED=sed
+fi
+
+lt_unmangle ()
+{
+   last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_]\*_la-##'`
+}
+
+# the tool to wrap (cc, cxx, ar, ranlib, ..)
+tool="$1"
+shift
+
+# the reel tool (to call)
+REEL_TOOL="$1"
+shift
+
+pass_through=0
+preserved_args=
+while test "$#" -gt 0; do
+    opt="$1"
+    shift
+
+    case $opt in
+    --shave-mode=*)
+        mode=`echo $opt | $SED -e 's/[-_a-zA-Z0-9]*=//'`
+	;;
+    -o)
+        lt_output="$1"
+        preserved_args="$preserved_args $opt"
+	;;
+    *)
+        preserved_args="$preserved_args $opt"
+        ;;
+      esac
+done
+
+# mode=link is handled in the libtool wrapper
+case "$mode,$tool" in
+link,*)
+    pass_through=1
+    ;;
+*,cxx)
+    Q="  CXX   "
+    ;;
+*,cc)
+    Q="  CC    "
+    ;;
+*,*)
+    # should not happen
+    Q="  CC    "
+    ;;
+esac
+
+lt_unmangle "$lt_output"
+output=$last_result
+
+if test -z $V; then
+    if test $pass_through -eq 0; then
+        echo "$Q$output"
+    fi
+    $REEL_TOOL $preserved_args
+else
+    echo $REEL_TOOL $preserved_args
+    $REEL_TOOL $preserved_args
+fi

commit 7f5fff943f36c8dcb856bf2b3c77b0da9bf581e9
Merge: 7126392... 16bb658...
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Feb 24 11:43:15 2009 +0100

    Merge commit 'elmarco/shave'


-- 
hooks/post-receive
PulseAudio Sound Server



More information about the pulseaudio-commits mailing list