[Lunar-commits] r18996 - lunar/trunk/var/lib/lunar/compilers

Auke Kok sofar at lunar-linux.org
Thu Mar 2 22:12:37 UTC 2006


Author: sofar
Date: 2006-03-02 22:12:32 +0000 (Thu, 02 Mar 2006)
New Revision: 18996

Modified:
   lunar/trunk/var/lib/lunar/compilers/c++
   lunar/trunk/var/lib/lunar/compilers/cc
   lunar/trunk/var/lib/lunar/compilers/g++
   lunar/trunk/var/lib/lunar/compilers/gcc
   lunar/trunk/var/lib/lunar/compilers/ld
   lunar/trunk/var/lib/lunar/compilers/make
Log:
New wrappers: these actually do some smart tinkering and call the non-wrapped version of $0 properly, preventing loops. Tested with e2fsprogs which showed the problem in the first place.


Modified: lunar/trunk/var/lib/lunar/compilers/c++
===================================================================
--- lunar/trunk/var/lib/lunar/compilers/c++	2006-03-02 19:40:57 UTC (rev 18995)
+++ lunar/trunk/var/lib/lunar/compilers/c++	2006-03-02 22:12:32 UTC (rev 18996)
@@ -1,8 +1,10 @@
 #!/bin/bash
 
+PROG=$(PATH=${PATH//\/var\/lib\/lunar\/compilers/} type -p $(basename $0))
+
 if [[ -n "$LUNAR_DEBUG" ]] ; then
-  echo "++ $CXX_EXT ${COMPILER_PATH:-/usr/bin}/${CXX:-c++} $CCOPT \"$@\"" >&2
+  echo "++ $CXX_EXT $PROG $CCOPT \"$@\"" >&2
 fi
 
-$CXX_EXT ${COMPILER_PATH:-/usr/bin}/${CXX:-c++} $CCOPT "$@"
+exec $CXX_EXT $PROG $CCOPT "$@"
 

Modified: lunar/trunk/var/lib/lunar/compilers/cc
===================================================================
--- lunar/trunk/var/lib/lunar/compilers/cc	2006-03-02 19:40:57 UTC (rev 18995)
+++ lunar/trunk/var/lib/lunar/compilers/cc	2006-03-02 22:12:32 UTC (rev 18996)
@@ -1,8 +1,10 @@
 #!/bin/bash
 
+PROG=$(PATH=${PATH//\/var\/lib\/lunar\/compilers/} type -p $(basename $0))
+
 if [[ -n "$LUNAR_DEBUG" ]] ; then
-  echo "++ $CC_EXT ${COMPILER_PATH:-/usr/bin}/${CC:-cc} $COPT \"$@\"" >&2
+  echo "++ $CC_EXT $PROG $COPT \"$@\"" >&2
 fi
- 
-$CC_EXT ${COMPILER_PATH:-/usr/bin}/${CC:-cc} $COPT "$@"
 
+exec $CC_EXT $PROG $COPT "$@"
+

Modified: lunar/trunk/var/lib/lunar/compilers/g++
===================================================================
--- lunar/trunk/var/lib/lunar/compilers/g++	2006-03-02 19:40:57 UTC (rev 18995)
+++ lunar/trunk/var/lib/lunar/compilers/g++	2006-03-02 22:12:32 UTC (rev 18996)
@@ -1,8 +1,10 @@
 #!/bin/bash
 
+PROG=$(PATH=${PATH//\/var\/lib\/lunar\/compilers/} type -p $(basename $0))
+
 if [[ -n "$LUNAR_DEBUG" ]] ; then
-  echo "++ $CXX_EXT ${COMPILER_PATH:-/usr/bin}/${CXX:-c++} $CCOPT \"$@\"" >&2
+  echo "++ $CXX_EXT $PROG $CCOPT \"$@\"" >&2
 fi
- 
-$CXX_EXT ${COMPILER_PATH:-/usr/bin}/${CXX:-c++} $CCOPT "$@"
 
+exec $CXX_EXT $PROG $CCOPT "$@"
+

Modified: lunar/trunk/var/lib/lunar/compilers/gcc
===================================================================
--- lunar/trunk/var/lib/lunar/compilers/gcc	2006-03-02 19:40:57 UTC (rev 18995)
+++ lunar/trunk/var/lib/lunar/compilers/gcc	2006-03-02 22:12:32 UTC (rev 18996)
@@ -1,8 +1,10 @@
 #!/bin/bash
 
+PROG=$(PATH=${PATH//\/var\/lib\/lunar\/compilers/} type -p $(basename $0))
+
 if [[ -n "$LUNAR_DEBUG" ]] ; then
-  echo "++ $CC_EXT ${COMPILER_PATH:-/usr/bin}/${CC:-cc} $COPT \"$@\"" >&2
+  echo "++ $CC_EXT $PROG $COPT \"$@\"" >&2
 fi
- 
-$CC_EXT ${COMPILER_PATH:-/usr/bin}/${CC:-cc} $COPT "$@"
 
+exec $CC_EXT $PROG $COPT "$@"
+

Modified: lunar/trunk/var/lib/lunar/compilers/ld
===================================================================
--- lunar/trunk/var/lib/lunar/compilers/ld	2006-03-02 19:40:57 UTC (rev 18995)
+++ lunar/trunk/var/lib/lunar/compilers/ld	2006-03-02 22:12:32 UTC (rev 18996)
@@ -1,8 +1,9 @@
 #!/bin/bash
 
+PROG=$(PATH=${PATH//\/var\/lib\/lunar\/compilers/} type -p $(basename $0))
+
 if [[ -n "$LUNAR_DEBUG" ]] ; then
-  echo "++ ${LD_PATH:-/usr/bin}/${LD:-ld} \"$@\"" >&2
+	echo "++ $PROG \"$@\"" >&2
 fi
 
-${LD_PATH:-/usr/bin}/${LD:-ld} "$@"
-
+exec $PROG "$@"

Modified: lunar/trunk/var/lib/lunar/compilers/make
===================================================================
--- lunar/trunk/var/lib/lunar/compilers/make	2006-03-02 19:40:57 UTC (rev 18995)
+++ lunar/trunk/var/lib/lunar/compilers/make	2006-03-02 22:12:32 UTC (rev 18996)
@@ -1,8 +1,10 @@
 #!/bin/bash
 
+PROG=$(PATH=${PATH//\/var\/lib\/lunar\/compilers/} type -p $(basename $0))
+
 if [[ -n "$LUNAR_DEBUG" ]] ; then
-  echo "++ $MAKE_EXT ${MAKE_PATH:-/usr/bin}/${MAKE:-make} ${MAKES:+-j$MAKES} \"$@\"" >&2
+	echo "++ $MAKE_EXT $PROG ${MAKES:+-j$MAKES} \"$@\"" >&2
 fi
 
-$MAKE_EXT ${MAKE_PATH:-/usr/bin}/${MAKE:-make} ${MAKES:+-j$MAKES} "$@"
+exec $MAKE_EXT $PROG ${MAKES:+-j$MAKES} "$@"
 



More information about the Lunar-commits mailing list