From a16f769dcfafda7335d7fc2267217feb075a18e0 Mon Sep 17 00:00:00 2001 From: Manuel Canales Esparcia Date: Thu, 19 Oct 2006 17:27:18 +0000 Subject: [PATCH] Renamed RE_MAKE to REBUILD_MAKEFILE. When rebuilding the Makefile we need to know the book version. Added REBUILD_MAKEFILE to configurations validation. --- Config.in | 2 +- common/func_validate_configs.sh | 11 ++++++----- jhalfs | 14 ++++++++++++-- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/Config.in b/Config.in index 248384a..05b0547 100644 --- a/Config.in +++ b/Config.in @@ -824,7 +824,7 @@ endif #--- End Advanced Features endmenu -config RE_MAKE +config REBUILD_MAKEFILE bool "Rebuild the Makefile (see help)" default n depends on !BOOK_BLFS diff --git a/common/func_validate_configs.sh b/common/func_validate_configs.sh index 4a2a3fa..bb93920 100644 --- a/common/func_validate_configs.sh +++ b/common/func_validate_configs.sh @@ -20,10 +20,10 @@ validate_config() { # Are the config values sane (within reason) inline_doc # 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 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 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 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 CUSTOM_TOOLS" + 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 PAGE TIMEZONE LANG LC_ALL LUSER LGROUP BLFS_TOOL REBUILD_MAKEFILE" + 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 VIMLANG PAGE TIMEZONE LANG LUSER LGROUP BLFS_TOOL REBUILD_MAKEFILE" + local -r clfs2_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE ARCH TARGET OPTIMIZE REPORT STRIP FSTAB CONFIG GETKERNEL VIMLANG PAGE TIMEZONE LANG LUSER LGROUP BLFS_TOOL REBUILD_MAKEFILE" + 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 CUSTOM_TOOLS REBUILD_MAKEFILE" 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_TIDY DEP_UNZIP DEP_DBXML DEP_DBXSL DEP_LINKS DEP_SUDO DEP_WGET DEP_SVN DEP_GPM" @@ -113,7 +113,8 @@ inline_doc BLFS_TOOL | \ CUSTOM_TOOLS | \ TIMEZONE | \ - PAGE) echo -e "`eval echo $PARAM_VALS`" ;; + PAGE | \ + REBUILD_MAKEFILE ) echo -e "`eval echo $PARAM_VALS`" ;; # Envvars that depend on other settings to be displayed GETKERNEL ) if [[ -z "$CONFIG" ]] && [[ -z "$BOOT_CONFIG" ]] ; then diff --git a/jhalfs b/jhalfs index 37f9b2b..42969d8 100755 --- a/jhalfs +++ b/jhalfs @@ -108,7 +108,7 @@ REPORT=${REPORT:=n} VIMLANG=${VIMLANG:-n} GRSECURITY_HOST=${GRSECURITY_HOST:-n} CUSTOM_TOOLS=${CUSTOM_TOOLS:-n} -RE_MAKE=${RE_MAKE:-n} +REBUILD_MAKEFILE=${REBUILD_MAKEFILE:-n} # Book surces envars BRANCH_ID=${BRANCH_ID:=development} @@ -317,7 +317,7 @@ if [[ "$OPTIMIZE" != "0" ]]; then fi # -if [[ "$RE_MAKE" = "n" ]] ; then +if [[ "$REBUILD_MAKEFILE" = "n" ]] ; then # If $BUILDDIR has subdirectories like tools/ or bin/, stop the run # and notify the user about that. @@ -425,6 +425,16 @@ if [[ "$RE_MAKE" = "n" ]] ; then fi +# When regeneration the Makefile we need to know also the canonical book version +if [[ "$REBUILD_MAKEFILE" = "y" ]] ; then + case $PROGNAME in + clfs | clfs2 ) + VERSION=$(xmllint --noent $JHALFSDIR/$BOOK/prologue/$ARCH/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;; + *) + VERSION=$(xmllint --noent $JHALFSDIR/$BOOK/prologue/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;; + esac +fi + build_Makefile if [[ "${PROGNAME}" = "lfs" ]]; then if [[ "${CUSTOM_TOOLS}" = "y" ]]; then