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

Auke Kok sofar at lunar-linux.org
Wed Mar 1 17:13:05 UTC 2006


Author: sofar
Date: 2006-03-01 17:12:58 +0000 (Wed, 01 Mar 2006)
New Revision: 18969

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:
Updated compiler wrappers:
* always use COMPILER_PATH if possible, then use /usr/bin
* use $CC $CXX $LD $MAKE is available, otherwise 'cc' and 'c++'
* optimize for speed a bit by using [[ ]]


Modified: lunar/trunk/var/lib/lunar/compilers/c++
===================================================================
--- lunar/trunk/var/lib/lunar/compilers/c++	2006-03-01 16:21:06 UTC (rev 18968)
+++ lunar/trunk/var/lib/lunar/compilers/c++	2006-03-01 17:12:58 UTC (rev 18969)
@@ -1,8 +1,8 @@
 #!/bin/bash
 
-if [ -n "$LUNAR_DEBUG" ] ; then
-  echo "++ $CXX_EXT ${COMPILER_PATH:-/usr/bin}/g++ $CCOPT \"$@\"" >&2
+if [[ -n "$LUNAR_DEBUG" ]] ; then
+  echo "++ $CXX_EXT ${COMPILER_PATH:-/usr/bin}/${CXX:-c++} $CCOPT \"$@\"" >&2
 fi
 
-$CXX_EXT ${COMPILER_PATH:-/usr/bin}/g++ $CCOPT "$@"
+$CXX_EXT ${COMPILER_PATH:-/usr/bin}/${CXX:-c++} $CCOPT "$@"
 

Modified: lunar/trunk/var/lib/lunar/compilers/cc
===================================================================
--- lunar/trunk/var/lib/lunar/compilers/cc	2006-03-01 16:21:06 UTC (rev 18968)
+++ lunar/trunk/var/lib/lunar/compilers/cc	2006-03-01 17:12:58 UTC (rev 18969)
@@ -1,8 +1,8 @@
 #!/bin/bash
 
-if [ -n "$LUNAR_DEBUG" ] ; then
-  echo "++ $CC_EXT ${COMPILER_PATH:-/usr/bin}/gcc $COPT \"$@\"" >&2
+if [[ -n "$LUNAR_DEBUG" ]] ; then
+  echo "++ $CC_EXT ${COMPILER_PATH:-/usr/bin}/${CC:-cc} $COPT \"$@\"" >&2
 fi
  
-$CC_EXT ${COMPILER_PATH:-/usr/bin}/gcc $COPT "$@"
+$CC_EXT ${COMPILER_PATH:-/usr/bin}/${CC:-cc} $COPT "$@"
 

Modified: lunar/trunk/var/lib/lunar/compilers/g++
===================================================================
--- lunar/trunk/var/lib/lunar/compilers/g++	2006-03-01 16:21:06 UTC (rev 18968)
+++ lunar/trunk/var/lib/lunar/compilers/g++	2006-03-01 17:12:58 UTC (rev 18969)
@@ -1,8 +1,8 @@
 #!/bin/bash
 
-if [ -n "$LUNAR_DEBUG" ] ; then
-  echo "++ $CXX_EXT ${COMPILER_PATH:-/usr/bin}/g++ $CCOPT \"$@\"" >&2
+if [[ -n "$LUNAR_DEBUG" ]] ; then
+  echo "++ $CXX_EXT ${COMPILER_PATH:-/usr/bin}/${CXX:-c++} $CCOPT \"$@\"" >&2
 fi
  
-$CXX_EXT ${COMPILER_PATH:-/usr/bin}/g++ $CCOPT "$@"
+$CXX_EXT ${COMPILER_PATH:-/usr/bin}/${CXX:-c++} $CCOPT "$@"
 

Modified: lunar/trunk/var/lib/lunar/compilers/gcc
===================================================================
--- lunar/trunk/var/lib/lunar/compilers/gcc	2006-03-01 16:21:06 UTC (rev 18968)
+++ lunar/trunk/var/lib/lunar/compilers/gcc	2006-03-01 17:12:58 UTC (rev 18969)
@@ -1,8 +1,8 @@
 #!/bin/bash
 
-if [ -n "$LUNAR_DEBUG" ] ; then
-  echo "++ $CC_EXT ${COMPILER_PATH:-/usr/bin}/gcc $COPT \"$@\"" >&2
+if [[ -n "$LUNAR_DEBUG" ]] ; then
+  echo "++ $CC_EXT ${COMPILER_PATH:-/usr/bin}/${CC:-cc} $COPT \"$@\"" >&2
 fi
  
-$CC_EXT ${COMPILER_PATH:-/usr/bin}/gcc $COPT "$@"
+$CC_EXT ${COMPILER_PATH:-/usr/bin}/${CC:-cc} $COPT "$@"
 

Modified: lunar/trunk/var/lib/lunar/compilers/ld
===================================================================
--- lunar/trunk/var/lib/lunar/compilers/ld	2006-03-01 16:21:06 UTC (rev 18968)
+++ lunar/trunk/var/lib/lunar/compilers/ld	2006-03-01 17:12:58 UTC (rev 18969)
@@ -1,8 +1,8 @@
 #!/bin/bash
 
-if [ -n "$LUNAR_DEBUG" ] ; then
-  echo "++ ${LD_PATH:-/usr/bin}/ld \"$@\"" >&2
+if [[ -n "$LUNAR_DEBUG" ]] ; then
+  echo "++ ${LD_PATH:-/usr/bin}/${LD:-ld} \"$@\"" >&2
 fi
 
-${LD_PATH:-/usr/bin}/ld "$@"
+${LD_PATH:-/usr/bin}/${LD:-ld} "$@"
 

Modified: lunar/trunk/var/lib/lunar/compilers/make
===================================================================
--- lunar/trunk/var/lib/lunar/compilers/make	2006-03-01 16:21:06 UTC (rev 18968)
+++ lunar/trunk/var/lib/lunar/compilers/make	2006-03-01 17:12:58 UTC (rev 18969)
@@ -1,8 +1,8 @@
 #!/bin/bash
 
-if [ -n "$LUNAR_DEBUG" ] ; then
-  echo "++ $MAKE_EXT ${MAKE_PATH:-/usr/bin}/make ${MAKES:+-j$MAKES} \"$@\"" >&2
+if [[ -n "$LUNAR_DEBUG" ]] ; then
+  echo "++ $MAKE_EXT ${MAKE_PATH:-/usr/bin}/${MAKE:-make} ${MAKES:+-j$MAKES} \"$@\"" >&2
 fi
 
-$MAKE_EXT ${MAKE_PATH:-/usr/bin}/make ${MAKES:+-j$MAKES} "$@"
+$MAKE_EXT ${MAKE_PATH:-/usr/bin}/${MAKE:-make} ${MAKES:+-j$MAKES} "$@"
 



More information about the Lunar-commits mailing list