r2650 - in jhalfs/branches/experimental: LFS optimize optimize/opt_config.d

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Sat May 6 04:06:08 PDT 2006


Author: manuel
Date: 2006-05-06 05:06:07 -0600 (Sat, 06 May 2006)
New Revision: 2650

Modified:
   jhalfs/branches/experimental/LFS/master.sh
   jhalfs/branches/experimental/optimize/opt_config
   jhalfs/branches/experimental/optimize/opt_config.d/noOpt
   jhalfs/branches/experimental/optimize/optimize_functions
Log:
Added MAKEFLAGS support.

Modified: jhalfs/branches/experimental/LFS/master.sh
===================================================================
--- jhalfs/branches/experimental/LFS/master.sh	2006-05-06 10:35:19 UTC (rev 2649)
+++ jhalfs/branches/experimental/LFS/master.sh	2006-05-06 11:06:07 UTC (rev 2650)
@@ -112,7 +112,7 @@
 
       # Insert instructions for unpacking the package and to set the PKGDIR variable.
       wrt_unpack "$FILE"
-      [[ "$OPTIMIZE" = "2" ]] &&  wrt_optimize "$name"
+      [[ "$OPTIMIZE" = "2" ]] &&  wrt_optimize "$name" && wrt_makeflags
     fi
 
     # Insert date and disk usage at the top of the log file, the script run
@@ -216,7 +216,7 @@
     if [ "$vrs" != "" ] ; then
       FILE="$name-$vrs.tar.*"
       wrt_unpack2 "$FILE"
-      [[ "$OPTIMIZE" != "0" ]] &&  wrt_optimize "$name"
+      [[ "$OPTIMIZE" != "0" ]] &&  wrt_optimize "$name" && wrt_makeflags
     fi
 
     # In the mount of kernel filesystems we need to set LFS

Modified: jhalfs/branches/experimental/optimize/opt_config
===================================================================
--- jhalfs/branches/experimental/optimize/opt_config	2006-05-06 10:35:19 UTC (rev 2649)
+++ jhalfs/branches/experimental/optimize/opt_config	2006-05-06 11:06:07 UTC (rev 2650)
@@ -7,6 +7,11 @@
 #$Id$
 #
 
+#--- Extra flags passed to the packages make commands
+#    "unset" will cause the variable to be not set
+#    instead of just set to null.
+MAKEFLAGS="-j3"
+
 #--- Default optimization mode
 #    This level is overridden by definitions in opt_override;
 #    in this way, packages can be tuned independently.  For example,

Modified: jhalfs/branches/experimental/optimize/opt_config.d/noOpt
===================================================================
--- jhalfs/branches/experimental/optimize/opt_config.d/noOpt	2006-05-06 10:35:19 UTC (rev 2649)
+++ jhalfs/branches/experimental/optimize/opt_config.d/noOpt	2006-05-06 11:06:07 UTC (rev 2650)
@@ -9,6 +9,9 @@
 #          doing.  By default, this is set to disable optimization
 #          of packages known to have build or runtime failure.
 #
+#          Also, if you what to use MAKEFLAGS but no build
+#          optimizations, set this mode in DEF_OPT_LVL
+#
 # Usage: - Apply optimization string to each variable
 #        - "unset" will cause the variable to be not set
 #          instead of being just set to null.

Modified: jhalfs/branches/experimental/optimize/optimize_functions
===================================================================
--- jhalfs/branches/experimental/optimize/optimize_functions	2006-05-06 10:35:19 UTC (rev 2649)
+++ jhalfs/branches/experimental/optimize/optimize_functions	2006-05-06 11:06:07 UTC (rev 2650)
@@ -29,4 +29,18 @@
       continue
     fi
   done
-}
\ No newline at end of file
+}
+
+#----------------------------------#
+wrt_makeflags() {                  # Apply MAKEFLAGS to build
+#----------------------------------#
+  if [[ "$MAKEFLAGS" != "unset" ]]; then
+(
+cat << EOF
+	@echo "export MAKEFLAGS=\"$MAKEFLAGS\"" >> envars
+EOF
+) >> $MKFILE.tmp
+  else
+    continue
+  fi
+}




More information about the alfs-log mailing list