Changeset 4c62c61
- Timestamp:
- 10/03/2005 10:00:09 PM (19 years ago)
- Branches:
- 0.2, 1.0, 2.3, 2.3.x, 2.4, ablfs, ablfs-more, legacy, new_features, trunk
- Children:
- a6d9007
- Parents:
- 7d98315
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
functions
r7d98315 r4c62c61 7 7 8 8 define echo_message 9 @echo $(BRW) 10 @echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 11 @echo $(BRW)$(1) target $(BLUE)$@$(BRW) 12 @echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~$(WHITE) 13 endef 14 15 define unpack-lfs 16 @cd $(LFS)$(SRC) ; tar -xvjf $(1) > /tmp/unpacked 9 @echo $(BRW) 10 @echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 11 @echo $(BRW)$(1) target $(BLUE)$@$(BRW) 12 @echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~$(WHITE) 17 13 endef 18 14 19 15 define unpack 20 @cd $( SRC) ; tar -xvf $(1) > /tmp/unpacked16 @cd $(LFS)$(SRC) ; tar -xvjf $(1) > /tmp/unpacked 21 17 endef -
jhalfs
r7d98315 r4c62c61 144 144 if [ -z $BUILDDIR ] ; then BUILDDIR=/mnt/lfs ; fi 145 145 JHALFSDIR=$BUILDDIR/jhalfs 146 LOGDIR= /jhalfs/logs146 LOGDIR=$JHALFSDIR/logs 147 147 LOG=000-jhalfs.log 148 148 MKFILE=$JHALFSDIR/Makefile … … 186 186 else 187 187 if [ $LFSVRS = development ] ; then 188 svn co $SVN/LFS/trunk/BOOK lfs-$LFSVRS >>$ BUILDDIR$LOGDIR/$LOG 2>&1188 svn co $SVN/LFS/trunk/BOOK lfs-$LFSVRS >>$LOGDIR/$LOG 2>&1 189 189 else 190 svn co $SVN/LFS/branches/$LFSVRS/BOOK lfs-$LFSVRS >>$ BUILDDIR$LOGDIR/$LOG 2>&1190 svn co $SVN/LFS/branches/$LFSVRS/BOOK lfs-$LFSVRS >>$LOGDIR/$LOG 2>&1 191 191 fi 192 192 echo -ne "done\n" … … 211 211 # Dump the commands in shell script form from the LFS book. 212 212 xsltproc --nonet --xinclude --stringparam testsuite $TEST -o ./commands/ \ 213 $XSL $BOOK/index.xml >>$ BUILDDIR$LOGDIR/$LOG 2>&1213 $XSL $BOOK/index.xml >>$LOGDIR/$LOG 2>&1 214 214 215 215 # Grab the patches and package names. … … 345 345 # Insert instructions for unpacking the package and to set 346 346 # the PKGDIR variable. 347 echo -e "\t@\$(call unpack -lfs,$FILE)" >> $MKFILE.tmp347 echo -e "\t@\$(call unpack,$FILE)" >> $MKFILE.tmp 348 348 echo -e "\t@ROOT=\`head -n1 /tmp/unpacked | sed 's@/.*@@'\` && \\" >> $MKFILE.tmp 349 349 echo -e "\tchown -R lfs \$(LFS)\$(SRC)/\$\$ROOT && \\" >> $MKFILE.tmp … … 352 352 fi 353 353 354 # Dump the path to the Binutils pass1or TCL sources directory.355 if [ "$i" = "027-binutils-pass1" -o "$i" = "032-tcl" ] ; then354 # Dump the path to the Binutils or TCL sources directory. 355 if [ "$i" = "027-binutils-pass1" -o "$i" = "032-tcl" -o "$i" = "036-binutils-pass2" ] ; then 356 356 echo -e "\techo \"\$(LFS)\$(SRC)/\$\$ROOT\" > sources-dir" >> $MKFILE.tmp 357 358 # Dump the path to the Binutils pass2 sources directory.359 elif [ "$i" = "036-binutils-pass2" ] ; then360 echo -e "\techo \"\$(SRC)/\$\$ROOT\" > sources-dir" >> $MKFILE.tmp361 357 362 358 # For the Adjusting phase we must to cd to the binutils-build directory. 363 359 elif [ "$i" = "031-adjusting" ] ; then 364 echo -e "\t echo \"PKGDIR=\$(LFS)\$(SRC)/binutils-build\" > envars && \\" >> $MKFILE.tmp360 echo -e "\t@echo \"PKGDIR=\$(LFS)\$(SRC)/binutils-build\" > envars && \\" >> $MKFILE.tmp 365 361 echo -e "\techo \"export PKGDIR\" >> envars" >> $MKFILE.tmp 366 362 … … 449 445 450 446 # Drop in the name of the target on a new line, and the previous target 451 # as a dependency. 447 # as a dependency. Also call the echo_message function. 452 448 if echo $i | grep -q "chroot" ; then 453 449 continue 454 450 else 455 echo -e "\n$i: $PREV" >> $MKFILE.tmp 451 echo -e "\n$i: $PREV" >> $MKFILE.tmp 452 echo -e "\t@\$(call echo_message, Building)" >> $MKFILE.tmp 456 453 fi 457 454 … … 468 465 echo -e "\t@ROOT=\`head -n1 /tmp/unpacked | sed 's@/.*@@'\` && \\" >> $MKFILE.tmp 469 466 echo -e "\techo \"PKGDIR=\$(SRC)/\$\$ROOT\" > envars && \\" >> $MKFILE.tmp 470 echo -e "\techo \"export PKGDIR\" >> envars &&\\" >> $MKFILE.tmp467 echo -e "\techo \"export PKGDIR\" >> envars\\" >> $MKFILE.tmp 471 468 fi 472 469 473 470 # For the Re-Adjusting phase we must to cd to the binutils-build directory. 474 471 if [ "$i" = "067-readjusting" ] ; then 475 echo -e "\t echo \"PKGDIR=\$(SRC)/binutils-build\" > envars && \\" >> $MKFILE.tmp472 echo -e "\t@echo \"PKGDIR=\$(SRC)/binutils-build\" > envars && \\" >> $MKFILE.tmp 476 473 echo -e "\techo \"export PKGDIR\" >> envars" >> $MKFILE.tmp 477 478 # Insert the script run 479 # For the mount of kernel filesystems we need to set LFS. 480 elif [ "$i" = "057-kernfs" ] ; then 481 echo -e "\techo \"LFS=\$(LFS)\" > envars && \\" >> $MKFILE.tmp 474 fi 475 476 # For the mount of kernel filesystems we need to set LFS and not to use 477 # chroot. 478 if [ "$i" = "057-kernfs" ] ; then 479 echo -e "\t@echo \"LFS=\$(LFS)\" > envars && \\" >> $MKFILE.tmp 482 480 echo -e "\techo \"export LFS\" >> envars && \\" >> $MKFILE.tmp 483 481 # Insert date and disk usage at the top of the log file. 484 482 echo -e "\techo -e \"\\\n\`date\`\\\n\\\nKB: \`du -sk --exclude=0??-* \$(LFS)\`\\\n\" >logs/$i && \\" >> $MKFILE.tmp 483 # Insert the script run 485 484 echo -e "\t. envars && commands/$file >>logs/$i 2>&1 && \\" >> $MKFILE.tmp 486 485 # Insert date and disk usage at the bottom of the log file. 487 486 echo -e "\techo -e \"\\\n\`date\`\\\n\\\nKB: \`du -sk --exclude=0??-* \$(LFS)\`\\\n\" >>logs/$i" >> $MKFILE.tmp 487 # The rest of Chapter06 use CHROOT1 function 488 488 else 489 489 # Insert date and disk usage at the top of the log file. 490 echo -e "\techo -e \"\\\n\`date\`\\\n\\\nKB: \`du -sk --exclude=0??-* /\`\\\n\" >logs/$i && \\" >> $MKFILE.tmp 491 echo -e "\t. envars && \$(CHROOT1) 'cd /jhalfs && commands/$file >>logs/$i 2>&1' && \\" >> $MKFILE.tmp 490 echo -e "\techo -e \"\\\n\`date\`\\\n\\\nKB: \`du -skx --exclude=0??-* \$(LFS)\`\\\n\" >logs/$i && \\" >> $MKFILE.tmp 491 # Insert the script run 492 echo -e "\t\$(CHROOT1) 'cd /jhalfs && . envars && commands/$file >>logs/$i 2>&1' && \\" >> $MKFILE.tmp 492 493 # Insert date and disk usage at the bottom of the log file. 493 echo -e "\techo -e \"\\\n\`date\`\\\n\\\nKB: \`du -sk --exclude=0??-* /\`\\\n\" >>logs/$i" >> $MKFILE.tmp494 echo -e "\techo -e \"\\\n\`date\`\\\n\\\nKB: \`du -skx --exclude=0??-* \$(LFS)\`\\\n\" >>logs/$i" >> $MKFILE.tmp 494 495 fi 495 496 … … 497 498 if [ "$vrs" != "" ] ; then 498 499 echo -e "\t@ROOT=\`head -n1 /tmp/unpacked | sed 's@/.*@@'\` && \\" >> $MKFILE.tmp 499 echo -e "\trm -r \$( SRC)/\$\$ROOT && \\" >> $MKFILE.tmp500 echo -e "\tif [ -e \$( SRC)/$name-build ]; then \\" >> $MKFILE.tmp501 echo -e "\t\trm -r \$( SRC)/$name-build; \\" >> $MKFILE.tmp500 echo -e "\trm -r \$(LFS)\$(SRC)/\$\$ROOT && \\" >> $MKFILE.tmp 501 echo -e "\tif [ -e \$(LFS)\$(SRC)/$name-build ]; then \\" >> $MKFILE.tmp 502 echo -e "\t\trm -r \$(LFS)\$(SRC)/$name-build; \\" >> $MKFILE.tmp 502 503 echo -e "\tfi;" >> $MKFILE.tmp 503 504 fi … … 506 507 if [ "$i" = "067-readjusting" ] ; then 507 508 echo -e "\t@rm -r \`cat sources-dir\` && \\" >> $MKFILE.tmp 508 echo -e "\trm -r \$( SRC)/binutils-build && \\" >> $MKFILE.tmp509 echo -e "\trm -r \$(LFS)\$(SRC)/binutils-build && \\" >> $MKFILE.tmp 509 510 echo -e "\trm sources-dir" >> $MKFILE.tmp 510 511 fi … … 523 524 # Add some variables and include the functions file 524 525 echo "SRC= /sources" >> $MKFILE 525 echo "LFS= $BUILDDIR" >> $MKFILE 526 echo -e "LOGDIR= $LOGDIR\n" >> $MKFILE 526 echo -e "LFS= $BUILDDIR\n" >> $MKFILE 527 527 echo -e "include functions\n" >> $MKFILE 528 528 … … 541 541 echo -e "\t@echo -e \"\\\n\\\tYour new LFS system has been successfully built\"\n" >> $MKFILE 542 542 echo -e "chapter4: 020-creatingtoolsdir 021-addinguser 022-settingenvironment\n" >> $MKFILE 543 echo -e "chapter5: chapter4 $chapter5\n" >> $MKFILE >> $MKFILE543 echo -e "chapter5: chapter4 $chapter5\n" >> $MKFILE 544 544 echo -e "chapter6: chapter5 $chapter6\n" >> $MKFILE 545 545 … … 620 620 fi 621 621 622 if [ ! -d $ BUILDDIR$LOGDIR ] ; then623 mkdir $ BUILDDIR$LOGDIR622 if [ ! -d $LOGDIR ] ; then 623 mkdir $LOGDIR 624 624 fi 625 625 626 >$ BUILDDIR$LOGDIR/$LOG626 >$LOGDIR/$LOG 627 627 628 628 if [ "$PWD" != "$JHALFSDIR" ] ; then
Note:
See TracChangeset
for help on using the changeset viewer.