Changeset cf7f294
- Timestamp:
- 10/08/2005 07:48:42 PM (19 years ago)
- Branches:
- 0.2, 1.0, 2.3, 2.3.x, 2.4, ablfs, ablfs-more, legacy, new_features, trunk
- Children:
- 2b73842
- Parents:
- ee09e34
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
jhalfs
ree09e34 rcf7f294 38 38 disables also the build of TCL, Expect 39 39 and DejaGNU 40 41 -M, --run-make run make on the generated Makefile42 40 43 41 --page_size PAGE set PAGE as the default page size (letter, … … 45 43 build Groff. If not specified, \"letter\" 46 44 will be used. 45 46 -C, --kernel-config FILE use the kernel configuration file specified 47 in FILE to build the kernel. If not found, 48 the kernel build is skipped. 49 50 -M, --run-make run make on the generated Makefile 51 47 52 " 48 53 … … 132 137 --no-toolchain-test ) 133 138 TOOLCHAINTEST=0 139 shift 140 ;; 141 142 --kernel-config | -C ) 143 test $# = 1 && eval "$exit_missing_arg" 144 shift 145 if [ -f $1 ] ; then 146 CONFIG=$1 147 else 148 echo -e "\nFile $1 not found, Skipping kernel build.\n" 149 fi 134 150 shift 135 151 ;; … … 448 464 ) >> $MKFILE.tmp 449 465 450 # Remove the build directory(ies) e ven if the package build fails, except for451 # Binutils and TCL. In that cases the sources directories are removed452 # only if the build fails.466 # Remove the build directory(ies) except if the package build fails 467 # (to can review config.cache, config.log, and like.) 468 # For Binutils and TCL the sources must be retained some time. 453 469 if [ "$vrs" != "" ] ; then 454 470 if [ "$i" != "027-binutils-pass1" ] && [ "$i" != "032-tcl" ] && [ "$i" != "036-binutils-pass2" ] ; then … … 494 510 ) >> $MKFILE.tmp 495 511 496 # The next two "if" must be after the touch to can check if the sources497 # directories should be retained or deleted.498 if [ "$i" = "027-binutils-pass1" -o "$i" = "036-binutils-pass2" ] ; then499 (500 cat << EOF501 @if [ ! -e \$@ ] ; then \\502 ROOT=\`head -n1 /tmp/unpacked | sed 's@^./@@;s@/.*@@'\` && \\503 rm -r \$(LFS)\$(SRC)/\$\$ROOT && \\504 rm -r \$(LFS)\$(SRC)/binutils-build; \\505 fi;506 EOF507 ) >> $MKFILE.tmp508 fi509 510 if [ "$i" = "032-tcl" ] ; then511 (512 cat << EOF513 @if [ ! -e \$@ ] ; then \\514 ROOT=\`head -n1 /tmp/unpacked | sed 's@^./@@;s@/.*@@'\` && \\515 rm -r \$(LFS)\$(SRC)/\$\$ROOT; \\516 fi;517 EOF518 ) >> $MKFILE.tmp519 fi520 521 512 # Keep the script file name for Makefile dependencies. 522 513 PREV=$i … … 614 605 fi 615 606 616 # Remove the build directory(ies) e venif the package build fails.607 # Remove the build directory(ies) except if the package build fails. 617 608 if [ "$vrs" != "" ] ; then 618 609 ( … … 634 625 rm -r \$(LFS)\$(SRC)/binutils-build && \\ 635 626 rm sources-dir 627 EOF 628 ) >> $MKFILE.tmp 629 fi 630 631 # Include a touch of the target name so make can check 632 # if it's already been made. 633 ( 634 cat << EOF 635 @touch \$@ 636 EOF 637 ) >> $MKFILE.tmp 638 639 # Keep the script file name for Makefile dependencies. 640 PREV=$i 641 done 642 643 for file in chapter0{7,8,9}/* ; do 644 # Keep the script file name 645 i=`basename $file` 646 647 # Grub must be configured manually 648 if echo $i | grep -q "grub" ; then 649 continue 650 fi 651 652 # If no .config file is supplied, the kernel build is skipped 653 if [ -z $CONFIG ] ; then 654 if echo $i | grep -q "kernel" ; then 655 continue 656 fi 657 fi 658 659 # First append each name of the script files to a list (this will become 660 # the names of the targets in the Makefile 661 chapter789="$chapter789 $i" 662 663 # Set the dependency for the first target. 664 if [ -z $PREV ] ; then PREV=116-strippingagain ; fi 665 666 # Drop in the name of the target on a new line, and the previous target 667 # as a dependency. Also call the echo_message function. 668 ( 669 cat << EOF 670 671 $i: $PREV 672 @\$(call echo_message, Building) 673 EOF 674 ) >> $MKFILE.tmp 675 676 # Find the the bootscripts and kernel package names 677 if [ "$i" = "119-bootscripts" -o "$i" = "132-kernel" ] ; then 678 if [ "$i" = "119-bootscripts" ] ; then 679 vrs=`grep "^lfs-bootscripts-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'` 680 FILE="lfs-bootscripts-$vrs.tar.bz2" 681 elif [ "$i" = "132-kernel" ] ; then 682 vrs=`grep "^linux-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'` 683 FILE="linux-$vrs.tar.bz2" 684 fi 685 ( 686 cat << EOF 687 @\$(call unpack,$FILE) 688 @ROOT=\`head -n1 /tmp/unpacked | sed 's@^./@@;s@/.*@@'\` && \\ 689 echo "PKGDIR=\$(SRC)/\$\$ROOT" > envars && \\ 690 echo "export PKGDIR" >> envars 691 EOF 692 ) >> $MKFILE.tmp 693 fi 694 695 # Put in place the kernel .config file 696 elif [ "$i" = "132-kernel" ] ; then 697 ( 698 cat << EOF 699 @source envars && cp $CONFIG \$(LFS)\$(PKGDIR) 700 EOF 701 ) >> $MKFILE.tmp 702 fi 703 704 # Initialize the log an run the script 705 ( 706 cat << EOF 707 @echo -e "\n\`date\`\n\nKB: \`du -skx --exclude=0??-* \$(LFS)\`\n" >logs/$i && \\ 708 \$(CHROOT2) 'cd /jhalfs && source envars && /jhalfs/commands/$file >>/jhalfs/logs/$i 2>&1' && \\ 709 echo -e "\n\`date\`\n\nKB: \`du -skx --exclude=0??-* \$(LFS)\`\n" >>logs/$i 710 EOF 711 ) >> $MKFILE.tmp 712 713 # Remove the build directory except if the package build fails. 714 if [ "$i" = "119-bootscripts" -o "$i" = "132-kernel" ] ; then 715 ( 716 cat << EOF 717 @ROOT=\`head -n1 /tmp/unpacked | sed 's@^./@@;s@/.*@@'\` && \\ 718 rm -r \$(LFS)\$(SRC)/\$\$ROOT 636 719 EOF 637 720 ) >> $MKFILE.tmp … … 679 762 ( 680 763 cat << EOF 681 all: chapter4 chapter5 chapter6 764 all: chapter4 chapter5 chapter6 chapter789 682 765 @echo -e "\n\tYour new LFS system has been successfully built" 683 766 … … 687 770 688 771 chapter6: chapter5 $chapter6 772 773 chapter789: chapter6 $chapter789 689 774 690 775 clean-all: clean
Note:
See TracChangeset
for help on using the changeset viewer.