r2676 - jhalfs/branches/experimental/optimize

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Thu May 11 12:15:34 PDT 2006


Author: manuel
Date: 2006-05-11 13:15:34 -0600 (Thu, 11 May 2006)
New Revision: 2676

Modified:
   jhalfs/branches/experimental/optimize/opt_config
   jhalfs/branches/experimental/optimize/optimize_functions
Log:
Allow users to set MAKEFLAGS black-listed packages.

Modified: jhalfs/branches/experimental/optimize/opt_config
===================================================================
--- jhalfs/branches/experimental/optimize/opt_config	2006-05-09 20:22:28 UTC (rev 2675)
+++ jhalfs/branches/experimental/optimize/opt_config	2006-05-11 19:15:34 UTC (rev 2676)
@@ -12,6 +12,10 @@
 #    instead of just set to null.
 MAKEFLAGS="-j3"
 
+#--- List of packages that don't support well MAKEFLAGS.
+#    This list may be different for you.
+BLACK_LIST="dejagnu gettext groff"
+
 #--- Default optimization mode
 #    This mode is overridden by definitions in opt_override;
 #    in this way, packages can be tuned independently.  For example,

Modified: jhalfs/branches/experimental/optimize/optimize_functions
===================================================================
--- jhalfs/branches/experimental/optimize/optimize_functions	2006-05-09 20:22:28 UTC (rev 2675)
+++ jhalfs/branches/experimental/optimize/optimize_functions	2006-05-11 19:15:34 UTC (rev 2676)
@@ -19,8 +19,9 @@
   echo -e "asking for support.${OFF}\n"
 
   echo -e "MAKEFLAGS: ${L_arrow}${BOLD}${MAKEFLAGS}${OFF}${R_arrow}"
+  [[ "$MAKEFLAGS" = "unset" ]] && echo
   [[ "$MAKEFLAGS" != "unset" ]] && \
-  echo -e "DejaGNU, Gettext, and Groff will not use MAKEFLAGS\n"
+  echo -e "BLACK_LIST: ${L_arrow}${BOLD}${BLACK_LIST}${OFF}${R_arrow}\n"
 
   echo -e "DEF_OPT_MODE: ${L_arrow}${BOLD}${DEF_OPT_MODE}${OFF}${R_arrow}\n"
 
@@ -72,20 +73,19 @@
 wrt_makeflags() {                  # Apply MAKEFLAGS to build
 #----------------------------------#
   local pkg=$1
+  local MKF
 
-  case $pkg in
-    dejagnu | gettext | groff ) # Don't support well -jX for now
-      ;;
-    *)
-      if [[ "$MAKEFLAGS" != "unset" ]]; then
+  if [[ "$BLACK_LIST" =~ "$pkg" ]]; then
+    MKF=unset
+  else
+    MKF=$MAKEFLAGS
+  fi
+
+  if [[ "$MKF" != "unset" ]]; then
 (
 cat << EOF
 	@echo "export MAKEFLAGS=\"$MAKEFLAGS\"" >> envars
 EOF
 ) >> $MKFILE.tmp
-      else
-        continue
-      fi
-      ;;
-  esac
+  fi
 }




More information about the alfs-log mailing list