Changeset d81c640
- Timestamp:
- 07/30/2006 10:17:29 AM (18 years ago)
- Branches:
- 2.3, 2.3.x, 2.4, ablfs, ablfs-more, legacy, new_features, trunk
- Children:
- ccc7c2b
- Parents:
- cb39f79
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
HLFS/hlfs.xsl
rcb39f79 rd81c640 27 27 1 = only chapter06 Glibc, GCC and Binutils testsuites 28 28 2 = all chapter06 testsuites 29 3 = al l chapter05 and chapter06 testsuites-->29 3 = alias to 2 --> 30 30 <xsl:param name="testsuite" select="1"/> 31 31 … … 95 95 </xsl:choose> 96 96 <xsl:if test="(sect2[@role='installation'] and 97 not(@id='bootable-kernel')) or 98 @id='ch-tools-adjusting' or 99 @id='ch-system-readjusting'"> 97 not(@id='bootable-kernel'))"> 100 98 <xsl:text>cd $PKGDIR
</xsl:text> 101 99 <xsl:if test="@id='ch-tools-uclibc' or @id='ch-system-uclibc'"> 102 100 <xsl:text>pushd ../; tar -xvf gettext-&gettext-version;.*; popd; 
</xsl:text> 103 101 </xsl:if> 104 <xsl:if test="@id='ch-tools-glibc' or @id='ch-system-glibc'"> 105 <xsl:text>tar -xvf ../glibc-libidn-&glibc-version;.*
</xsl:text> 106 </xsl:if> 107 <xsl:if test="@id='ch-tools-gcc' or @id='ch-system-gcc'"> 108 <xsl:text>pushd ../; tar -xvf gcc-g++-&gcc-version;.*; popd; 
</xsl:text> 109 </xsl:if> 110 <xsl:if test="@id='ch-tools-gcc' and $testsuite = '3'"> 111 <xsl:text>pushd ../; tar -xvf gcc-testsuite-&gcc-version;.*; popd; 
</xsl:text> 112 </xsl:if> 113 <xsl:if test="@id='ch-system-gcc' and $testsuite != '0'"> 114 <xsl:text>pushd ../; tar -xvf gcc-testsuite-&gcc-version;.*; popd; 
</xsl:text> 115 </xsl:if> 102 103 <!-- NEW toolchain format, from inside ./sources dir unpack binutils and gcc --> 104 <xsl:if test="@id='ch-tools-embryo-toolchain' or 105 @id='ch-tools-cocoon-toolchain' or 106 @id='ch-system-butterfly-toolchain'"> 107 <xsl:text>tar -xvf gcc-core-&gcc-version;.*; 
</xsl:text> 108 <xsl:text>tar -xvf gcc-g++-&gcc-version;.*; 
</xsl:text> 109 <xsl:text>tar -xvf binutils-&binutils-version;.*; 
</xsl:text> 110 </xsl:if> 111 <!-- ONLY butterfly has a testsuite --> 112 <xsl:if test="@id='ch-tools-butterfly-toolchain' and $testsuite != '0'"> 113 <xsl:text>tar -xvf gcc-testsuite-&gcc-version;.*; 
</xsl:text> 114 </xsl:if> 115 <!-- END new toolchain format --> 116 116 117 <xsl:if test="@id='bootable-bootscripts'"> 117 118 <xsl:text>pushd ../; tar -xvf blfs-bootscripts-&blfs-bootscripts-version;.* ; popd; 
</xsl:text> 118 119 </xsl:if> 119 </xsl:if>120 <xsl:if test="@id='ch-system-kernfs'">121 <xsl:text>export HLFS=$LFS
</xsl:text>122 120 </xsl:if> 123 121 <xsl:apply-templates select=".//para/userinput | .//screen"/> … … 136 134 <xsl:template match="para/userinput"> 137 135 <xsl:if test="(contains(string(),'test') or 138 contains(string(),'check')) and 139 (($testsuite = '1' and 140 (ancestor::sect1[@id='ch-system-gcc'] or 141 ancestor::sect1[@id='ch-system-glibc'])) or 142 ($testsuite = '2' and 143 ancestor::chapter[@id='chapter-building-system']) or 144 $testsuite = '3')"> 145 <xsl:choose> 146 <xsl:when test="ancestor::sect1[@id='ch-system-gcc']"> 147 <xsl:text>make -k check >> $TEST_LOG 2>&1 || true
</xsl:text> 148 </xsl:when> 149 <xsl:otherwise> 150 <xsl:value-of select="substring-before(string(),'make')"/> 151 <xsl:text>make -k</xsl:text> 152 <xsl:value-of select="substring-after(string(),'make')"/> 153 <xsl:text> >> $TEST_LOG 2>&1 || true
</xsl:text> 154 </xsl:otherwise> 155 </xsl:choose> 136 contains(string(),'check')) and 137 ($testsuite = '2' or $testsuite = '3')"> 138 <xsl:value-of select="substring-before(string(),'make')"/> 139 <xsl:text>make -k</xsl:text> 140 <xsl:value-of select="substring-after(string(),'make')"/> 141 <xsl:text> >> $TEST_LOG 2>&1 || true
</xsl:text> 156 142 </xsl:if> 157 143 </xsl:template> … … 228 214 </xsl:choose> 229 215 </xsl:when> 230 <!-- Fixing toolchain test suites run --> 231 <xsl:when test="string() = 'make check' or 232 string() = 'make -k check'"> 233 <xsl:choose> 234 <xsl:when test="(($testsuite = '1' or $testsuite = '2') and 235 ancestor::chapter[@id='chapter-building-system']) or 236 $testsuite = '3'"> 216 <!-- Fixing butterfly toolchain test suites run --> 217 <xsl:when test="string() = 'make -k check'"> 218 <xsl:choose> 219 <xsl:when test="$testsuite != '0'"> 237 220 <xsl:text>make -k check >> $TEST_LOG 2>&1 || true
</xsl:text> 238 221 </xsl:when> 239 222 </xsl:choose> 240 223 </xsl:when> 241 < xsl:when test="contains(string(),'make check') and242 ancestor::sect1[@id='ch-system-binutils']">224 <!-- Fixing Glbc test suite --> 225 <xsl:when test="contains(string(),'glibc-check-log')"> 243 226 <xsl:choose> 244 227 <xsl:when test="$testsuite != '0'"> 245 <xsl:value-of select="substring-before(string(),'make check')"/> 246 <xsl:text>make -k check >> $TEST_LOG 2>&1 || true
</xsl:text> 247 </xsl:when> 248 </xsl:choose> 249 </xsl:when> 250 <xsl:when test="contains(string(),'hardened-specs') and 251 ancestor::sect1[@id='ch-system-binutils'] 252 and $testsuite = '0'"/> 228 <xsl:value-of select="substring-before(string(),'> glibc-')"/> 229 <xsl:text>>> $TEST_LOG 2>&1 || true
</xsl:text> 230 </xsl:when> 231 </xsl:choose> 232 </xsl:when> 253 233 <!-- Don't stop on strip run and chapter05 GCC installation test--> 254 234 <xsl:when test="contains(string(),'strip ') or … … 266 246 </xsl:template> 267 247 248 <xsl:template match="literal"> 249 <xsl:if test="@condition=$model or not(@condition)"> 250 <xsl:apply-templates/> 251 </xsl:if> 252 </xsl:template> 253 268 254 <xsl:template match="replaceable"> 269 255 <xsl:choose> -
HLFS/master.sh
rcb39f79 rd81c640 8 8 ################################### 9 9 10 #----------------------------------# 11 wrt_ExecuteAsUser() { # Execute the file ($3) under the users account ($1), log in $2 12 #----------------------------------# 13 local this_user=$1 14 local this_script=$2 15 local file=$3 16 17 ( 18 cat << EOF 19 @( time { su - ${this_user} -c "source /home/${this_user}/.bashrc && $JHALFSDIR/${PROGNAME}-commands/$file" >>logs/$this_script 2>&1 ; } ) 2>>logs/$this_script && \\ 20 echo -e "\nKB: \`du -skx --exclude=${SCRIPT_ROOT} \$(MOUNT_PT)\`\n" >>logs/$this_script 21 EOF 22 ) >> $MKFILE.tmp 23 } 24 25 26 #----------------------------------# 27 wrt_Unpack_SetOwner() { # Unpack and set owner. Assign 'ROOT' var 28 #----------------------------------# 29 local USER_ACCT=$1 30 local FILE=$2 31 local optSAVE_PREVIOUS=$3 32 33 if [ "${optSAVE_PREVIOUS}" != "1" ]; then 34 wrt_remove_existing_dirs "$FILE" 35 fi 36 ( 37 cat << EOF 38 @\$(call unpack,$FILE) 39 @ROOT=\`head -n1 \$(MOUNT_PT)\$(SRC)/\$(PKG_LST) | sed 's@^./@@;s@/.*@@'\` && \\ 40 echo "export PKGDIR=\$(MOUNT_PT)\$(SRC)/\$\$ROOT" > envars && \\ 41 chown -R ${USER_ACCT} \$(MOUNT_PT)\$(SRC)/\$\$ROOT 42 EOF 43 ) >> $MKFILE.tmp 44 } 45 46 #----------------------------------# 47 wrt_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 ( 54 cat << 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 57 EOF 58 ) >> $MKFILE.tmp 59 } 60 61 62 #----------------------------# 63 process_toolchain() { # embryo,cocoon and butterfly need special handling 64 #----------------------------# 65 local toolchain=$1 66 local this_script=$2 67 local tc_phase 68 69 echo "${tab_}${tab_}${GREEN}toolchain ${L_arrow}${toolchain}${R_arrow}" 70 71 case ${toolchain} in 72 *butterfly*) 73 [[ "$TEST" != "0" ]] && wrt_test_log2 "${this_script}" 74 ( 75 cat << EOF 76 @echo "export PKGDIR=\$(SRC)" > envars 77 EOF 78 ) >> $MKFILE.tmp 79 wrt_run_as_chroot1 "$toolchain" "$this_script" 80 ;; 81 82 *) 83 ( 84 cat << EOF 85 @echo "export PKGDIR=\$(MOUNT_PT)\$(SRC)" > envars 86 EOF 87 ) >> $MKFILE.tmp 88 wrt_ExecuteAsUser "hlfs" "$toolchain" "$this_script" 89 ;; 90 esac 91 # 92 # Safe method to remove packages unpacked outside the toolchain 93 pkg_tarball=$(get_package_tarball_name "binutils") 94 wrt_remove_existing_dirs "$pkg_tarball" 95 pkg_tarball=$(get_package_tarball_name "gcc-core") 96 wrt_remove_existing_dirs "$pkg_tarball" 97 # 98 # Manually remove the toolchain directories.. 99 tc_phase=`echo $toolchain | sed -e 's@[0-9]\{3\}-@@' -e 's@-toolchain@@'` 100 ( 101 cat << EOF 102 @rm -r \$(MOUNT_PT)\$(SRC)/${tc_phase}-toolchain && \\ 103 rm -r \$(MOUNT_PT)\$(SRC)/${tc_phase}-build 104 EOF 105 ) >> $MKFILE.tmp 106 107 } 108 10 109 11 110 #----------------------------# 12 111 chapter3_Makefiles() { # Initialization of the system 13 112 #----------------------------# 14 local TARGET LOADER15 113 16 114 echo "${tab_}${GREEN}Processing... ${L_arrow}Chapter3${R_arrow}" … … 18 116 # Define a few model dependant variables 19 117 if [[ ${MODEL} = "uclibc" ]]; then 20 TARGET=" tools-linux-uclibc"; LOADER="ld-uClibc.so.0"118 TARGET="pc-linux-gnu"; LOADER="ld-uClibc.so.0" 21 119 else 22 TARGET=" tools-linux-gnu"; LOADER="ld-linux.so.2"120 TARGET="pc-linux-gnu"; LOADER="ld-linux.so.2" 23 121 fi 24 122 25 # NOTE: We use the lfs username and groupname also in HLFS 26 # If /home/lfs is already present in the host, we asume that the 27 # lfs user and group are also presents in the host, and a backup 123 # If /home/hlfs is already present in the host, we asume that the 124 # hlfs user and group are also presents in the host, and a backup 28 125 # of their bash init files is made. 29 126 ( … … 44 141 021-addinguser: 020-creatingtoolsdir 45 142 @\$(call echo_message, Building) 46 @if [ ! -d /home/ lfs ]; then \\47 groupadd lfs; \\48 useradd -s /bin/bash -g lfs -m -k /dev/nulllfs; \\143 @if [ ! -d /home/hlfs ]; then \\ 144 groupadd hlfs; \\ 145 useradd -s /bin/bash -g hlfs -m -k /dev/null hlfs; \\ 49 146 else \\ 50 touch user- lfs-exist; \\51 fi; 52 @chown lfs \$(MOUNT_PT)/tools && \\53 chown lfs \$(MOUNT_PT)/sources && \\147 touch user-hlfs-exist; \\ 148 fi; 149 @chown hlfs \$(MOUNT_PT)/tools && \\ 150 chown hlfs \$(MOUNT_PT)/sources && \\ 54 151 touch \$@ && \\ 55 152 echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\ … … 58 155 022-settingenvironment: 021-addinguser 59 156 @\$(call echo_message, Building) 60 @if [ -f /home/ lfs/.bashrc -a ! -f /home/lfs/.bashrc.XXX ]; then \\61 mv /home/ lfs/.bashrc /home/lfs/.bashrc.XXX; \\62 fi; 63 @if [ -f /home/ lfs/.bash_profile -a ! -f /home/lfs/.bash_profile.XXX ]; then \\64 mv /home/ lfs/.bash_profile /home/lfs/.bash_profile.XXX; \\65 fi; 66 @echo "set +h" > /home/ lfs/.bashrc && \\67 echo "umask 022" >> /home/ lfs/.bashrc && \\68 echo "HLFS=\$(MOUNT_PT)" >> /home/ lfs/.bashrc && \\69 echo "LC_ALL=POSIX" >> /home/ lfs/.bashrc && \\70 echo "PATH=/tools/bin:/bin:/usr/bin" >> /home/ lfs/.bashrc && \\71 echo "export HLFS LC_ALL PATH" >> /home/ lfs/.bashrc && \\72 echo "" >> /home/ lfs/.bashrc && \\157 @if [ -f /home/hlfs/.bashrc -a ! -f /home/hlfs/.bashrc.XXX ]; then \\ 158 mv /home/hlfs/.bashrc /home/hlfs/.bashrc.XXX; \\ 159 fi; 160 @if [ -f /home/hlfs/.bash_profile -a ! -f /home/hlfs/.bash_profile.XXX ]; then \\ 161 mv /home/hlfs/.bash_profile /home/hlfs/.bash_profile.XXX; \\ 162 fi; 163 @echo "set +h" > /home/hlfs/.bashrc && \\ 164 echo "umask 022" >> /home/hlfs/.bashrc && \\ 165 echo "HLFS=\$(MOUNT_PT)" >> /home/hlfs/.bashrc && \\ 166 echo "LC_ALL=POSIX" >> /home/hlfs/.bashrc && \\ 167 echo "PATH=/tools/bin:/bin:/usr/bin" >> /home/hlfs/.bashrc && \\ 168 echo "export HLFS LC_ALL PATH" >> /home/hlfs/.bashrc && \\ 169 echo "" >> /home/hlfs/.bashrc && \\ 73 170 echo "target=$(uname -m)-${TARGET}" >> /home/lfs/.bashrc && \\ 74 171 echo "ldso=/tools/lib/${LOADER}" >> /home/lfs/.bashrc && \\ 75 172 echo "export target ldso" >> /home/lfs/.bashrc && \\ 76 echo "source $JHALFSDIR/envars" >> /home/ lfs/.bashrc && \\77 chown lfs:lfs /home/lfs/.bashrc && \\173 echo "source $JHALFSDIR/envars" >> /home/hlfs/.bashrc && \\ 174 chown hlfs:hlfs /home/hlfs/.bashrc && \\ 78 175 touch envars && \\ 79 176 touch \$@ && \\ … … 114 211 chapter5="$chapter5 $this_script" 115 212 116 # Grab the name of the target (minus the -headers or -cross in the case of gcc 117 # and binutils in chapter 5) 118 name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' -e 's@-cross@@' -e 's@-headers@@'` 213 # Grab the name of the target 214 name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@'` 119 215 120 216 # Adjust 'name' 121 217 case $name in 122 linux-libc) name="linux-libc-headers" ;;123 gcc) name="gcc-core" ;;124 218 uclibc) name="uClibc" ;; 125 219 esac … … 134 228 # Drop in the name of the target on a new line, and the previous target 135 229 # as a dependency. Also call the echo_message function. 230 231 # This is a very special script and requires manual processing 232 # NO Optimization allowed 233 if [[ ${name} = "embryo-toolchain" ]] || \ 234 [[ ${name} = "cocoon-toolchain" ]]; then 235 wrt_target "$this_script" "$PREV" 236 process_toolchain "${this_script}" "${file}" 237 wrt_touch 238 PREV=$this_script 239 continue 240 fi 241 # 136 242 wrt_target "$this_script" "$PREV" 137 138 243 # Find the version of the command files, if it corresponds with the building of 139 244 # a specific package … … 142 247 if [ "$pkg_tarball" != "" ] ; then 143 248 # Insert instructions for unpacking the package and to set the PKGDIR variable. 144 case $this_script in 145 *binutils* ) wrt_unpack "$pkg_tarball" 1 ;; # Do not delete an existing package directories 146 *) wrt_unpack "$pkg_tarball" ;; 147 esac 249 wrt_Unpack_SetOwner "hlfs" "$pkg_tarball" 148 250 # If the testsuites must be run, initialize the log file 149 251 [[ "$TEST" = "3" ]] && wrt_test_log "${this_script}" … … 151 253 [[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name" 152 254 fi 153 154 case $this_script in155 *binutils* ) # Dump the path to sources directory for later removal156 (157 cat << EOF158 @ROOT=\`head -n1 \$(MOUNT_PT)\$(SRC)/\$(PKG_LST) | sed 's@^./@@;s@/.*@@'\` && \\159 echo "\$(MOUNT_PT)\$(SRC)/\$\$ROOT" >> sources-dir160 EOF161 ) >> $MKFILE.tmp162 ;;163 *adjusting* ) # For the Adjusting phase we must to cd to the binutils-build directory.164 echo -e '\t@echo "export PKGDIR=$(MOUNT_PT)$(SRC)/binutils-build" > envars' >> $MKFILE.tmp165 ;;166 esac167 168 255 # Insert date and disk usage at the top of the log file, the script run 169 256 # and date and disk usage again at the bottom of the log file. 170 wrt_ run_as_su "${this_script}" "${file}"257 wrt_ExecuteAsUser "hlfs" "$this_script" "${file}" 171 258 172 259 # Remove the build directory(ies) except if the package build fails 173 260 # (so we can review config.cache, config.log, etc.) 174 # For Binutils the sources must be retained for some time.175 261 if [ "$pkg_tarball" != "" ] ; then 176 case "${this_script}" in 177 *binutils*) : ;; # do NOTHING 178 *gcc*) wrt_remove_build_dirs "gcc" ;; 179 *) wrt_remove_build_dirs "$name" ;; 180 esac 262 wrt_remove_build_dirs "$name" 181 263 fi 182 183 # Remove the Binutils pass 1 sources after a successful Adjusting phase.184 case "${this_script}" in185 *adjusting*)186 (187 cat << EOF188 @rm -r \`cat sources-dir\` && \\189 rm -r \$(MOUNT_PT)\$(SRC)/binutils-build && \\190 rm sources-dir191 EOF192 ) >> $MKFILE.tmp193 ;;194 esac195 264 196 265 # Include a touch of the target name so make can check if it's already been made. … … 210 279 chapter6_Makefiles() { # sysroot or chroot build phase 211 280 #----------------------------# 212 local TARGET LOADER213 281 local file 214 282 local this_script … … 238 306 239 307 echo "${tab_}${GREEN}Processing... ${L_arrow}Chapter6$N${R_arrow}" 240 #241 # Set these definitions early and only once242 #243 if [[ ${MODEL} = "uclibc" ]]; then244 TARGET="pc-linux-uclibc"; LOADER="ld-uClibc.so.0"245 else246 TARGET="pc-linux-gnu"; LOADER="ld-linux.so.2"247 fi248 308 249 309 for file in chapter06$N/* ; do … … 263 323 name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@'` 264 324 265 #266 # Sed replacement to fix some rm command that could fail.267 # That should be fixed in the book sources.268 #269 325 case $name in 270 glibc) sed 's/rm /rm -f /' -i chapter06$N/$this_script ;;271 gcc) sed 's/rm /rm -f /' -i chapter06$N/$this_script ;;272 esac273 274 case $name in275 gcc) name="gcc-core" ;;276 326 uclibc) name="uClibc" ;; 277 327 esac … … 302 352 # 303 353 # Drop in the name of the target on a new line, and the previous target 304 # as a dependency. Also call the echo_message function. 354 # as a dependency. Also call the echo_message function. 355 if [[ ${name} = "butterfly-toolchain" ]]; then 356 wrt_target "$this_script" "$PREV" 357 process_toolchain "${this_script}" "${file}" 358 wrt_touch 359 PREV=$this_script 360 continue 361 fi 362 305 363 wrt_target "${this_script}${N}" "$PREV" 306 364 … … 309 367 if [ "$pkg_tarball" != "" ] ; then 310 368 wrt_unpack2 "$pkg_tarball" 311 wrt_target_vars312 369 # If the testsuites must be run, initialize the log file 313 370 case $name in 314 binutils | gcc-core |glibc )371 glibc ) 315 372 [[ "$TEST" != "0" ]] && wrt_test_log2 "${this_script}" 316 373 ;; … … 323 380 fi 324 381 325 case $this_script in 326 *readjusting*) # For the Re-Adjusting phase we must to cd to the binutils-build directory. 327 echo -e '\t@echo "export PKGDIR=$(SRC)/binutils-build" > envars' >> $MKFILE.tmp 328 ;; 329 esac 330 331 # In the mount of kernel filesystems we need to set LFS and not to use chroot. 382 # In the mount of kernel filesystems we need to set HLFS and not to use chroot. 332 383 case "${this_script}" in 333 384 *kernfs*) 334 wrt_ run_as_root"${this_script}" "${file}"385 wrt_RunAsRoot "hlfs" "${this_script}" "${file}" 335 386 ;; 336 387 *) # The rest of Chapter06 … … 344 395 fi 345 396 # 346 # Remove the Binutils pass 2 sources after a successful Re-Adjusting phase.347 case "${this_script}" in348 *readjusting*)349 (350 cat << EOF351 @rm -r \`cat sources-dir\` && \\352 rm -r \$(MOUNT_PT)\$(SRC)/binutils-build && \\353 rm sources-dir354 EOF355 ) >> $MKFILE.tmp356 ;;357 esac358 359 397 # Include a touch of the target name so make can check if it's already been made. 360 398 wrt_touch … … 390 428 *usage) continue ;; # Contains example commands 391 429 *grub) continue ;; 392 *reboot) continue ;;393 430 *console) continue ;; # Use the file generated by lfs-bootscripts 394 431 … … 520 557 chapter3: 020-creatingtoolsdir 021-addinguser 022-settingenvironment 521 558 522 chapter5: chapter3 $chapter5 restore- lfs-env559 chapter5: chapter3 $chapter5 restore-hlfs-env 523 560 524 561 chapter6: chapter5 $chapter6 … … 534 571 535 572 clean-chapter3: 536 -if [ ! -f user- lfs-exist ]; then \\537 userdel lfs; \\538 rm -rf /home/ lfs; \\573 -if [ ! -f user-hlfs-exist ]; then \\ 574 userdel hlfs; \\ 575 rm -rf /home/hlfs; \\ 539 576 fi; 540 577 rm -rf \$(MOUNT_PT)/tools 541 578 rm -f /tools 542 rm -f envars user- lfs-exist579 rm -f envars user-hlfs-exist 543 580 rm -f 02* logs/02*.log 544 581 545 582 clean-chapter5: 546 583 rm -rf \$(MOUNT_PT)/tools/* 547 rm -f $chapter5 restore- lfs-env sources-dir584 rm -f $chapter5 restore-hlfs-env sources-dir 548 585 cd logs && rm -f $chapter5 && cd .. 549 586 … … 562 599 cd logs && rm -f $chapter7 && cd .. 563 600 564 restore- lfs-env:601 restore-hlfs-env: 565 602 @\$(call echo_message, Building) 566 @if [ -f /home/ lfs/.bashrc.XXX ]; then \\567 mv -f /home/ lfs/.bashrc.XXX /home/lfs/.bashrc; \\568 fi; 569 @if [ -f /home/ lfs/.bash_profile.XXX ]; then \\570 mv /home/ lfs/.bash_profile.XXX /home/lfs/.bash_profile; \\571 fi; 572 @chown lfs:lfs /home/lfs/.bash* && \\603 @if [ -f /home/hlfs/.bashrc.XXX ]; then \\ 604 mv -f /home/hlfs/.bashrc.XXX /home/hlfs/.bashrc; \\ 605 fi; 606 @if [ -f /home/hlfs/.bash_profile.XXX ]; then \\ 607 mv /home/hlfs/.bash_profile.XXX /home/hlfs/.bash_profile; \\ 608 fi; 609 @chown hlfs:hlfs /home/hlfs/.bash* && \\ 573 610 touch \$@ && \\ 574 611 echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\ … … 581 618 @-umount \$(MOUNT_PT)/sys 582 619 @-umount \$(MOUNT_PT)/proc 583 @-if [ ! -f user- lfs-exist ]; then \\584 userdel lfs; \\585 rm -rf /home/ lfs; \\620 @-if [ ! -f user-hlfs-exist ]; then \\ 621 userdel hlfs; \\ 622 rm -rf /home/hlfs; \\ 586 623 fi; 587 624 588 625 restart_code: 589 @echo ">>> This feature is experimental, BUGS may exist" 590 626 @echo ">>> This feature is experimental, BUGS may exist" 627 591 628 @if [ ! -L /tools ]; then \\ 592 629 echo -e "\\nERROR::\\n /tools is NOT a symlink.. /tools must point to \$(MOUNT_PT)/tools\\n" && false;\\ 593 630 fi; 594 631 595 632 @if [ ! -e /tools ]; then \\ 596 633 echo -e "\\nERROR::\\nThe target /tools points to does not exist.\\nVerify the target.. \$(MOUNT_PT)/tools\\n" && false;\\ 597 634 fi; 598 635 599 636 @if ! stat -c %N /tools | grep "\$(MOUNT_PT)/tools" >/dev/null ; then \\ 600 637 echo -e "\\nERROR::\\nThe symlink \\"/tools\\" does not point to \\"\$(MOUNT_PT)/tools\\".\\nCorrect the problem and rerun\\n" && false;\\ 601 fi; 638 fi; 602 639 603 640 @if [ -f ???-kernfs ]; then \\ -
common/common-functions
rcb39f79 rd81c640 83 83 2 = all final system testsuites 84 84 3 = all temporary tools and final system testsuites 85 In CLFS , 3 is an alias to 285 In CLFS and HLFS, 3 is an alias to 2 86 86 87 87 ${BOLD} -W, --working-copy DIR${OFF} -
common/config
rcb39f79 rd81c640 17 17 18 18 #=== Getting packages === 19 # Files will be retrieved from the local archive SRC_ARCHIVE 19 # Files will be retrieved from the local archive SRC_ARCHIVE 20 20 # (if defined) or the 'net and will be stored in $BUILDDIR/sources 21 21 #--- Download the source packages 0(no)/1(yes) … … 49 49 # 2 = all chapter06 testsuites 50 50 # 3 = all chapter05 and chapter06 testsuites 51 # (in CLFS , alias to 2)51 # (in CLFS and HLFS, alias to 2) 52 52 TEST=1 53 53
Note:
See TracChangeset
for help on using the changeset viewer.