Changeset 21dab83


Ignore:
Timestamp:
07/28/2006 03:55:40 AM (18 years ago)
Author:
George Boudreau <georgeb@…>
Branches:
experimental
Children:
a82bbc0
Parents:
65a2be6
Message:

Tweaking the hlfs code.. stomping on bugs

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Config.in

    r65a2be6 r21dab83  
    277277
    278278        config  CONFIG_RUNMAKE
    279                 bool "Run the makefile"
     279                bool    "Run the makefile"
    280280                default n
    281281                help
    282282                        #--- Automatically run the makefile once it has been created
     283
     284        config  CONFIG_REBUILD
     285                bool    "Rebuild files"
     286                default n
     287                help
     288                        Clean the build directory before performing any other task. The directory
     289                        is cleaned only if it was populated by a previous JHALFS run.
    283290
    284291        config  CONFIG_STRIP
     
    388395           config       TEST
    389396                int
    390                 default "0"     if !CONFIG_TEST
     397                default "0"     if !CONFIG_TESTS
    391398                default "1"     if TST_1
    392399                default "2"     if TST_2
     
    432439                default "letter"        if PAGE_LETTER
    433440                default "A4"            if PAGE_A4
    434 
    435 
    436 
    437441
    438442        config BUILDDIR
     
    525529                default 1       if  CONFIG_FARCE
    526530
     531        config  CLEAN
     532                int
     533                default 0       if !CONFIG_REBUILD
     534                default 1       if  CONFIG_REBUILD
  • HLFS/master.sh

    r65a2be6 r21dab83  
    4444}
    4545
     46#----------------------------------#
     47wrt_RunAsRoot() {                  # Some scripts must be run as root..
     48#----------------------------------#
     49  local user_ACCT=$(echo $1 | tr [a-z] [A-Z])
     50  local this_script=$2
     51  local file=$3
     52
     53(
     54cat << EOF
     55        @( time { export ${user_ACCT}=\$(MOUNT_PT) && ${PROGNAME}-commands/$file >>logs/$this_script 2>&1 ; } ) 2>>logs/$this_script && \\
     56        echo -e "\nKB: \`du -skx --exclude=${SCRIPT_ROOT} \$(MOUNT_PT)\`\n" >>logs/$this_script
     57EOF
     58) >> $MKFILE.tmp
     59}
     60
     61
    4662#----------------------------#
    4763process_toolchain() {        # embryo,cocoon and butterfly need special handling
     
    5975  pkg_tarball=$(get_package_tarball_name "gcc-g++")
    6076  wrt_Unpack_SetOwner "hlfs" "$pkg_tarball" 1
     77
     78  case ${toolchain} in
     79    *butterfly*)
     80      [[ "$TEST" != "0" ]] && wrt_test_log2 "${this_script}"
     81(
     82cat << EOF
     83        @echo "export PKGDIR=\$(SRC)" > envars
     84EOF
     85) >> $MKFILE.tmp
     86      wrt_run_as_chroot1 "$toolchain" "$this_script"
     87      ;;
     88    *)
    6189(
    6290cat << EOF
     
    6492EOF
    6593) >> $MKFILE.tmp
    66   if [[ ${toolchain} = "butterfly-toolchain" ]]; then
    67     [[ "$TEST" != "0" ]] && wrt_test_log2 "${this_script}"
    68     wrt_run_as_chroot1 "$toolchain" "$this_script"
    69   else
    70     wrt_ExecuteAsUser "hlfs" "$toolchain" "$this_script"
    71   fi
     94      wrt_ExecuteAsUser "hlfs" "$toolchain" "$this_script"
     95      ;;
     96  esac
    7297
    7398  pkg_tarball=$(get_package_tarball_name "binutils")
     
    75100  pkg_tarball=$(get_package_tarball_name "gcc-core")
    76101  wrt_remove_existing_dirs  "$pkg_tarball"
    77 
     102  #
    78103  # Manually remove the toolchain directories..
    79104  tc_phase=`echo $toolchain | sed -e 's@[0-9]\{3\}-@@' -e 's@-toolchain@@'`
    80   case $tc_phase in
    81     embryo | cocoon)  # toolchain phase
    82105(
    83106cat << EOF
     
    86109EOF
    87110) >> $MKFILE.tmp
    88     ;;   
    89     butterfly ) # system phase
    90 (
    91 cat << EOF
    92         @rm -r \$(SRC)/butterfly-toolchain && \\
    93         rm -r \$(SRC)/butterfly-build
    94 EOF
    95 ) >> $MKFILE.tmp
    96     ;;
    97   esac
    98111
    99112}
     
    377390    case "${this_script}" in
    378391      *kernfs*)
    379         wrt_run_as_root "${this_script}" "${file}"
     392        wrt_RunAsRoot "hlfs" "${this_script}" "${file}"
    380393        ;;
    381394      *)   # The rest of Chapter06
     
    422435      *usage)   continue  ;; # Contains example commands
    423436      *grub)    continue  ;;
    424       *reboot)  continue  ;;
    425437      *console) continue  ;; # Use the file generated by lfs-bootscripts
    426438
Note: See TracChangeset for help on using the changeset viewer.