Index: common/blfs-tool-deps/901-libxml2
===================================================================
--- common/blfs-tool-deps/901-libxml2	(revision 029dbb7eb3a704e563b572f9cc4215198ce8626e)
+++ common/blfs-tool-deps/901-libxml2	(revision 029dbb7eb3a704e563b572f9cc4215198ce8626e)
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+# $Id$
+
+set -e
+
+./configure --prefix=/usr
+make
+make install
+
+exit
Index: common/blfs-tool-deps/902-libxslt
===================================================================
--- common/blfs-tool-deps/902-libxslt	(revision 029dbb7eb3a704e563b572f9cc4215198ce8626e)
+++ common/blfs-tool-deps/902-libxslt	(revision 029dbb7eb3a704e563b572f9cc4215198ce8626e)
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+# $Id$
+
+set -e
+
+./configure --prefix=/usr
+make
+make install
+
+exit
Index: common/blfs-tool-deps/903-docbook-xsl
===================================================================
--- common/blfs-tool-deps/903-docbook-xsl	(revision 029dbb7eb3a704e563b572f9cc4215198ce8626e)
+++ common/blfs-tool-deps/903-docbook-xsl	(revision 029dbb7eb3a704e563b572f9cc4215198ce8626e)
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+# $Id$
+
+set -e
+
+install -v -m755 -d /usr/share/xml/docbook/xsl-stylesheets-1.69.1
+cp -v -R VERSION common eclipse extensions fo html \
+         htmlhelp images javahelp lib manpages params \
+         profiling slides template website xhtml \
+    /usr/share/xml/docbook/xsl-stylesheets-1.69.1
+
+if [ ! -d /etc/xml ]; then install -v -m755 -d /etc/xml; fi
+if [ ! -f /etc/xml/catalog ]; then
+    xmlcatalog --noout --create /etc/xml/catalog
+fi
+
+xmlcatalog --noout --add "rewriteSystem" \
+           "http://docbook.sourceforge.net/release/xsl/1.69.1" \
+           "/usr/share/xml/docbook/xsl-stylesheets-1.69.1" \
+    /etc/xml/catalog
+
+xmlcatalog --noout --add "rewriteURI" \
+           "http://docbook.sourceforge.net/release/xsl/1.69.1" \
+           "/usr/share/xml/docbook/xsl-stylesheets-1.69.1" \
+    /etc/xml/catalog
+
+xmlcatalog --noout --add "rewriteSystem" \
+           "http://docbook.sourceforge.net/release/xsl/current" \
+           "/usr/share/xml/docbook/xsl-stylesheets-1.69.1" \
+    /etc/xml/catalog
+
+xmlcatalog --noout --add "rewriteURI" \
+           "http://docbook.sourceforge.net/release/xsl/current" \
+           "/usr/share/xml/docbook/xsl-stylesheets-1.69.1" \
+    /etc/xml/catalog
+
+exit
Index: common/blfs-tool-deps/904-gpm
===================================================================
--- common/blfs-tool-deps/904-gpm	(revision 029dbb7eb3a704e563b572f9cc4215198ce8626e)
+++ common/blfs-tool-deps/904-gpm	(revision 029dbb7eb3a704e563b572f9cc4215198ce8626e)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# $Id$
+
+set -e
+
+patch -Np1 -i ../gpm-1.20.1-segfault-1.patch
+patch -Np1 -i ../gpm-1.20.1-silent-1.patch
+./configure --prefix=/usr --sysconfdir=/etc
+LDFLAGS="$LDFLAGS -lm" make
+make install
+cp -v conf/gpm-root.conf /etc
+ldconfig
+
+exit
Index: common/blfs-tool-deps/905-links
===================================================================
--- common/blfs-tool-deps/905-links	(revision 029dbb7eb3a704e563b572f9cc4215198ce8626e)
+++ common/blfs-tool-deps/905-links	(revision 029dbb7eb3a704e563b572f9cc4215198ce8626e)
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+# $Id$
+
+set -e
+
+./configure --prefix=/usr
+make CFLAGS="-O2 -Wno-sign-compare -Wno-pointer-sign"
+make install
+
+exit
Index: common/blfs-tool-deps/906-sudo
===================================================================
--- common/blfs-tool-deps/906-sudo	(revision 029dbb7eb3a704e563b572f9cc4215198ce8626e)
+++ common/blfs-tool-deps/906-sudo	(revision 029dbb7eb3a704e563b572f9cc4215198ce8626e)
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+# $Id$
+
+set -e
+
+patch -Np1 -i ../sudo-1.6.8p12-envvar_fix-1.patch
+./configure --prefix=/usr --libexecdir=/usr/lib \
+    --enable-noargs-shell --with-ignore-dot --with-all-insults \
+    --enable-shell-sets-home
+make
+make install
+
+exit
Index: common/blfs-tool-deps/907-wget
===================================================================
--- common/blfs-tool-deps/907-wget	(revision 029dbb7eb3a704e563b572f9cc4215198ce8626e)
+++ common/blfs-tool-deps/907-wget	(revision 029dbb7eb3a704e563b572f9cc4215198ce8626e)
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+# $Id$
+
+set -e
+
+./configure --prefix=/usr --sysconfdir=/etc
+make
+make install
+
+exit
Index: common/blfs-tool-deps/908-subversion
===================================================================
--- common/blfs-tool-deps/908-subversion	(revision 029dbb7eb3a704e563b572f9cc4215198ce8626e)
+++ common/blfs-tool-deps/908-subversion	(revision 029dbb7eb3a704e563b572f9cc4215198ce8626e)
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# $Id$
+
+set -e
+
+./configure --prefix=/usr \
+            --without-berkeley-db \
+            --with-installbuilddir=/usr/lib/apr-0
+make
+make install
+rm doc/{Makefile,doxygen.conf}
+find doc -type d -exec chmod 755 {} \;
+find doc -type f -exec chmod 644 {} \;
+install -v -m755 -d /usr/share/doc/subversion-1.3.1
+cp -v -R doc/* /usr/share/doc/subversion-1.3.1
+
+exit
Index: common/common-functions
===================================================================
--- common/common-functions	(revision 4da2512b160910bba6181af975c694de1620d8e9)
+++ common/common-functions	(revision 029dbb7eb3a704e563b572f9cc4215198ce8626e)
@@ -578,4 +578,6 @@
   esac
 
+  [[ "${BLFS_TOOL}" = "y" ]] && copy_blfs_deps_scripts
+
   echo " ...OK"
 
@@ -611,4 +613,20 @@
       ;;
   esac
+
+  if [[ "${BLFS_TOOL}" = "y" ]] ; then
+(
+cat << EOF
+$LIBXML_PKG
+$LIBXSLT_PKG
+$DBXSL_PKG
+$LINKS_PKG
+$SUDO_PKG
+$WGET_PKG
+$SVN_PKG
+$GPM_PKG
+EOF
+) >> pkg_tarball_list
+  fi
+
   echo " ...OK"
 
@@ -781,3 +799,90 @@
 
   cd $BUILDDIR/sources
-}
+
+  [[ "${BLFS_TOOL}" = "y" ]] && add_blfs_deps_urls
+}
+
+#----------------------------# Hardcoded URLs and MD5.
+add_blfs_deps_urls() {       # No easy way to extract it.
+#----------------------------# Some FTP mirrors may not work
+
+  local BLFS_SERVER="${SERVER}/pub/blfs/conglomeration/"
+
+  if [[ "${DEP_LIBXML}" = "y" ]] ; then
+    echo "${LIBXML_URL} ${BLFS_SERVER}libxml2/${LIBXML_PKG} ${LIBXML_MD5}" >> urls.lst
+  fi
+
+  if [[ "${DEP_LIBXSLT}" = "y" ]] ; then
+    echo "${LIBXSLT_URL} ${BLFS_SERVER}libxslt/${LIBXSLT_PKG} ${LIBXSLT_MD5}" >> urls.lst
+  fi
+
+  if [[ "${DEP_DBXSL}" = "y" ]] ; then
+    echo "${DBXSL_URL} ${BLFS_SERVER}docbook-xsl/${DBXSL_PKG} ${DBXSL_MD5}" >> urls.lst
+  fi
+
+  if [[ "${DEP_LINKS}" = "y" ]] ; then
+    echo "${LINKS_URL} ${BLFS_SERVER}links/${LINKS_PKG} ${LINKS_MD5}" >> urls.lst
+  fi
+
+  if [[ "${DEP_SUDO}" = "y" ]] ; then
+    echo "${SUDO_URL} ${BLFS_SERVER}sudo/${SUDO_PKG} ${SUDO_MD5}" >> urls.lst
+    echo "${SUDO_PATCH_URL} ${BLFS_SERVER}sudo/${SUDO_PATCH} ${SUDO_PATCH_MD5}" >> urls.lst
+  fi
+
+  if [[ "${DEP_WGET}" = "y" ]] ; then
+    echo "${WGET_URL} ${BLFS_SERVER}wget/${WGET_PKG} ${WGET_MD5}" >> urls.lst
+  fi
+
+  if [[ "${DEP_SVN}" = "y" ]] ; then
+    echo "${SVN_URL} ${BLFS_SERVER}subversion/${SVN_PKG} ${SVN_MD5}" >> urls.lst
+  fi
+
+  if [[ "${DEP_GPM}" = "y" ]] ; then
+    echo "${GPM_URL} ${BLFS_SERVER}gpm/${GPM_PKG} ${GPM_MD5}" >> urls.lst
+    echo "${GPM_PATCH_1_URL} ${BLFS_SERVER}gpm/${GPM_PATCH_1} ${GPM_PATCH_1_MD5}" >> urls.lst
+    echo "${GPM_PATCH_2_URL} ${BLFS_SERVER}gpm/${GPM_PATCH_2} ${GPM_PATCH_2_MD5}" >> urls.lst
+  fi
+
+}
+
+#----------------------------# Maybe there is a better way to do this, but this
+copy_blfs_deps_scripts() {   # method avoid to place the test on all
+#----------------------------# $PROGNAME/master.sh scripts.
+
+  mkdir -p ${PROGNAME}-commands/blfs-tool-deps
+
+  if [[ "${DEP_LIBXML}" = "y" ]] ; then
+    mv blfs-tool-deps/901-libxml2 ${PROGNAME}-commands/blfs-tool-deps
+  fi
+
+  if [[ "${DEP_LIBXSLT}" = "y" ]] ; then
+    mv blfs-tool-deps/902-libxslt ${PROGNAME}-commands/blfs-tool-deps
+  fi
+
+  if [[ "${DEP_DBXSL}" = "y" ]] ; then
+    mv blfs-tool-deps/903-docbook-xsl ${PROGNAME}-commands/blfs-tool-deps
+  fi
+
+  if [[ "${DEP_LINKS}" = "y" ]] ; then
+    mv blfs-tool-deps/905-links ${PROGNAME}-commands/blfs-tool-deps
+  fi
+
+  if [[ "${DEP_SUDO}" = "y" ]] ; then
+    mv blfs-tool-deps/906-sudo ${PROGNAME}-commands/blfs-tool-deps
+  fi
+
+  if [[ "${DEP_WGET}" = "y" ]] ; then
+    mv blfs-tool-deps/907-wget ${PROGNAME}-commands/blfs-tool-deps
+  fi
+
+  if [[ "${DEP_SVN}" = "y" ]] ; then
+    mv blfs-tool-deps/908-subversion ${PROGNAME}-commands/blfs-tool-deps
+  fi
+
+  if [[ "${DEP_GPM}" = "y" ]] ; then
+    mv blfs-tool-deps/904-gpm ${PROGNAME}-commands/blfs-tool-deps
+  fi
+
+  rm -rf blfs-tool-deps
+
+}
Index: common/func_validate_configs.sh
===================================================================
--- common/func_validate_configs.sh	(revision 4da2512b160910bba6181af975c694de1620d8e9)
+++ common/func_validate_configs.sh	(revision 029dbb7eb3a704e563b572f9cc4215198ce8626e)
@@ -21,12 +21,14 @@
 
   # First internal variables, then the ones that change the book's flavour, and lastly system configuration variables
-  local -r  hlfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE MODEL  GRSECURITY_HOST      TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB             CONFIG GETKERNEL KEYMAP         PAGE TIMEZONE LANG LC_ALL LUSER LGROUP"
-  local -r  clfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE METHOD ARCH TARGET TARGET32 TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB BOOT_CONFIG CONFIG GETKERNEL KEYMAP VIMLANG PAGE TIMEZONE LANG        LUSER LGROUP"
-  local -r clfs2_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE        ARCH TARGET                         OPTIMIZE REPORT                                      STRIP FSTAB             CONFIG GETKERNEL KEYMAP VIMLANG PAGE TIMEZONE LANG        LUSER LGROUP"
-  local -r   lfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE                             TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB             CONFIG GETKERNEL        VIMLANG PAGE TIMEZONE LANG        LUSER LGROUP"
+  local -r  hlfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE MODEL  GRSECURITY_HOST      TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB             CONFIG GETKERNEL KEYMAP         PAGE TIMEZONE LANG LC_ALL LUSER LGROUP BLFS_TOOL"
+  local -r  clfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE METHOD ARCH TARGET TARGET32 TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB BOOT_CONFIG CONFIG GETKERNEL KEYMAP VIMLANG PAGE TIMEZONE LANG        LUSER LGROUP BLFS_TOOL"
+  local -r clfs2_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE        ARCH TARGET                         OPTIMIZE REPORT                                      STRIP FSTAB             CONFIG GETKERNEL KEYMAP VIMLANG PAGE TIMEZONE LANG        LUSER LGROUP BLFS_TOOL"
+  local -r   lfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE                             TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB             CONFIG GETKERNEL        VIMLANG PAGE TIMEZONE LANG        LUSER LGROUP BLFS_TOOL"
   local -r  blfs_PARAM_LIST="BRANCH_ID BLFS_ROOT BLFS_XML TRACKING_DIR"
 
+  local -r  blfs_tool_PARAM_LIST="BLFS_BRANCH_ID BLFS_ROOT BLFS_XML TRACKING_DIR DEP_LIBXML DEP_LIBXSLT DEP_DBXSL DEP_LINKS DEP_SUDO DEP_WGET DEP_SVN DEP_GPM"
+
   local -r ERROR_MSG_pt1='The variable \"${L_arrow}${config_param}${R_arrow}\" value ${L_arrow}${BOLD}${!config_param}${R_arrow} is invalid,'
-  local -r ERROR_MSG_pt2=' check the config file ${BOLD}${GREEN}\<$(echo $PROGNAME | tr [a-z] [A-Z])/config\> or \<common/config\>${OFF}'
+  local -r ERROR_MSG_pt2='rerun make and fix your configuration settings${OFF}'
   local -r PARAM_VALS='${config_param}${dotSTR:${#config_param}} ${L_arrow}${BOLD}${!config_param}${OFF}${R_arrow}'
 
@@ -108,4 +110,5 @@
       TARGET          | \
       GRSECURITY_HOST | \
+      BLFS_TOOL       | \
       TIMEZONE        | \
       PAGE)   echo -e "`eval echo $PARAM_VALS`" ;;
@@ -142,5 +145,5 @@
 
         # BOOK validation. Very ugly, need be fixed
-      BOOK)        if [[ "${WC}" = "1" ]] ; then
+      BOOK)        if [[ "${WORKING_COPY}" = "y" ]] ; then
                      validate_dir -z -d
                    else
@@ -186,4 +189,12 @@
     esac
   done
+
+  if [[ "${BLFS_TOOL}" = "y" ]] ; then
+    echo "${nl_}    ${BLUE}blfs-tool settings${OFF}"
+    for config_param in ${blfs_tool_PARAM_LIST}; do
+      echo -e "`eval echo $PARAM_VALS`"
+    done
+  fi
+
   set -e
   echo "${nl_}***${BOLD}${GREEN} ${PARAM_GROUP%%_*T} config parameters look good${OFF} ***${nl_}"
