CVS: theedge/var/lib/lunar/functions optimize.lunar,1.40,1.41

Terry Chan tchan at lunar-linux.org
Thu Aug 7 04:24:30 GMT 2003


Update of /var/cvs/lunar/theedge/var/lib/lunar/functions
In directory dbguin.lunar-linux.org:/tmp/cvs-serv17559

Modified Files:
	optimize.lunar 
Log Message:
Fixed the bug in theedge of "lunar optimize" not loading up the settings
from /etc/lunar/local/optimizations.  sofar had moved the sourcing of 
the optimizations file into the optimize() which is too late.  I moved
it to the top of the optimize_architecture().  Older code just had the
sourcing of optimizations at the top of optimize.lunar script.


Index: optimize.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/optimize.lunar,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- optimize.lunar	4 Aug 2003 23:19:42 -0000	1.40
+++ optimize.lunar	7 Aug 2003 04:24:28 -0000	1.41
@@ -731,32 +731,6 @@
 
 optimize() {
   debug_msg "optimize ($@)"
-  # Source in the optimization settings if it exists.
-  if [ -s /etc/lunar/local/optimizations ] ; then
-    . /etc/lunar/local/optimizations
-  else
-    verbose_msg "initializing optimizations with hard-coded defaults"
-    echo -e PLATFORM=x86            '\n'    \
-BUILD=i386-pc-linux-gnu '\n'    \
-MAKES=                  '\n'    \
-COPT=                   '\n'    \
-CCOPT=                  '\n'    \
-BOPT=-O0                '\n'    \
-CPU=i386                '\n'    \
-SPD=( )                 '\n'    \
-STACK=                  '\n'    \
-XTRA=( )                '\n'    \
-FPM=                    '\n'    \
-CC_WARN=( )             '\n'    \
-CCC_WARN=( )            '\n'    \
-LDF=( )                 '\n'    \
-ADDON=( ) > /etc/lunar/local/optimizations
-  fi
-
-  #lets get the BUILD if it is not defined   
-  [ -z "$BUILD" ] && optimize_cpu $CPU
-  [ -n "$BUILD" ] && export BUILD || 
-  echo "Set your optimization preferences via lunar"
 
   unset CFLAGS CXXFLAGS LDFLAGS
 
@@ -836,6 +810,32 @@
     exit 0
   fi
 
+  # Source in the optimization settings if it exists.
+  if [ -s /etc/lunar/local/optimizations ] ; then
+    . /etc/lunar/local/optimizations
+  else
+    verbose_msg "initializing optimizations with hard-coded defaults"
+    echo -e PLATFORM=x86            '\n'    \
+            BUILD=i386-pc-linux-gnu '\n'    \
+            MAKES=                  '\n'    \
+            COPT=                   '\n'    \
+            CCOPT=                  '\n'    \
+            BOPT=-O0                '\n'    \
+            CPU=i386                '\n'    \
+            SPD=( )                 '\n'    \
+            STACK=                  '\n'    \
+            XTRA=( )                '\n'    \
+            FPM=                    '\n'    \
+            CC_WARN=( )             '\n'    \
+            CCC_WARN=( )            '\n'    \
+            LDF=( )                 '\n'    \
+            ADDON=( ) > /etc/lunar/local/optimizations
+  fi
+
+  #lets get the BUILD if it is not defined   
+  [ -z "$BUILD" ] && optimize_cpu $CPU
+  [ -n "$BUILD" ] && export BUILD || 
+  echo "Set your optimization preferences via lunar"
 # Flow control for the menus. This will also check for gcc3,
 # if it exists it will allow more options.
   TITLE="Lunar Optimizations"




More information about the Lunar-commits mailing list