Changeset d55a1a1 for CLFS/master.sh
- Timestamp:
- 11/13/2006 09:01:21 PM (18 years ago)
- Branches:
- 2.3, 2.3.x, 2.4, ablfs, ablfs-more, legacy, new_features, trunk
- Children:
- 010627d
- Parents:
- 1838bc7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CLFS/master.sh
r1838bc7 rd55a1a1 388 388 389 389 #--------------------------------------# 390 chroot_testsuite_tools_Makefiles() { # 391 #--------------------------------------# 392 echo "${tab_}${GREEN}Processing... ${L_arrow}(chroot) testsuite tools ( CHROOT ) ${R_arrow}" 390 testsuite_tools_Makefiles() { # 391 #--------------------------------------# 392 393 if [[ "${METHOD}" = "chroot" ]]; then 394 echo "${tab_}${GREEN}Processing... ${L_arrow}(chroot) testsuite tools ( CHROOT ) ${R_arrow}" 395 else 396 echo "${tab_}${GREEN}Processing... ${L_arrow}(boot) testsuite tools ( ROOT ) ${R_arrow}" 397 fi 393 398 394 399 for file in testsuite-tools/* ; do … … 437 442 } 438 443 439 #--------------------------------------# 440 boot_testsuite_tools_Makefiles() { # 441 #--------------------------------------# 442 echo "${tab_}${GREEN}Processing... ${L_arrow}(boot) testsuite tools ( ROOT ) ${R_arrow}" 443 for file in testsuite-tools/* ; do 444 # Keep the script file name 445 this_script=`basename $file` 446 447 # First append each name of the script files to a list (this will become 448 # the names of the targets in the Makefile 449 PREV= 450 testsuitetools="$testsuitetools $this_script" 451 452 # Grab the name of the target, strip id number, XXX-script 453 name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@'\ 454 -e 's@-64bit@@' \ 455 -e 's@-64@@' \ 456 -e 's@64@@' \ 457 -e 's@n32@@'` 458 459 pkg_tarball=$(get_package_tarball_name $name) 460 461 #--------------------------------------------------------------------# 462 # >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< # 463 #--------------------------------------------------------------------# 464 # 465 # Drop in the name of the target on a new line, and the previous target 466 # as a dependency. Also call the echo_message function. 467 CHROOT_wrt_target "${this_script}" "$PREV" 468 # 469 CHROOT_Unpack "$pkg_tarball" 470 [[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name" 471 # 472 CHROOT_wrt_RunAsRoot "${file}" 473 # 474 CHROOT_wrt_RemoveBuildDirs "${name}" 475 # 476 # Include a touch of the target name so make can check if it's already been made. 477 wrt_touch 478 # 479 #--------------------------------------------------------------------# 480 # >>>>>>>> END OF Makefile ENTRY <<<<<<<< # 481 #--------------------------------------------------------------------# 482 # 483 # Keep the script file name for Makefile dependencies. 484 PREV=$this_script 485 486 done 487 488 } 489 490 491 #--------------------------------------# 492 chroot_final_system_Makefiles() { # 444 445 #--------------------------------------# 446 final_system_Makefiles() { # 493 447 #--------------------------------------# 494 448 # Set envars and scripts for iteration targets … … 496 450 if [[ -z "$1" ]] ; then 497 451 local N="" 452 # In boot method the makesys phase was initiated in testsuite_tools_makefile 453 [[ "${METHOD}" = "boot" ]] && [[ "$TEST" = 0 ]] && PREV="" 498 454 else 499 455 local N=-build_$1 … … 513 469 fi 514 470 515 echo "${tab_}${GREEN}Processing... ${L_arrow}(chroot) final system$N ( CHROOT ) ${R_arrow}" 471 if [[ "${METHOD}" = "chroot" ]]; then 472 echo "${tab_}${GREEN}Processing... ${L_arrow}(chroot) final system$N ( CHROOT ) ${R_arrow}" 473 else 474 echo "${tab_}${GREEN}Processing... ${L_arrow}(boot) final system$N ( ROOT ) ${R_arrow}" 475 fi 516 476 517 477 for file in final-system$N/* ; do … … 597 557 598 558 #--------------------------------------# 599 boot_final_system_Makefiles() { # 600 #--------------------------------------# 601 # Set envars and scripts for iteration targets 602 LOGS="" # Start with an empty global LOGS envar 603 if [[ -z "$1" ]] ; then 604 local N="" 605 # The makesys phase was initiated in bm_testsuite_tools_makefile 606 [[ "$TEST" = 0 ]] && PREV="" 559 bootscripts_Makefiles() { # 560 #--------------------------------------# 561 562 if [[ "${METHOD}" = "chroot" ]]; then 563 echo "${tab_}${GREEN}Processing... ${L_arrow}(chroot) bootscripts ( CHROOT ) ${R_arrow}" 607 564 else 608 local N=-build_$1 609 local basicsystem="" 610 mkdir final-system$N 611 cp final-system/* final-system$N 612 for script in final-system$N/* ; do 613 # Overwrite existing symlinks, files, and dirs 614 sed -e 's/ln -sv/&f/g' \ 615 -e 's/mv -v/&f/g' \ 616 -e 's/mkdir -v/&p/g' -i ${script} 617 done 618 # Remove Bzip2 binaries before make install 619 sed -e 's@make install@rm -vf /usr/bin/bz*\n&@' -i final-system$N/*-bzip2 620 # Delete *old Readline libraries just after make install 621 sed -e 's@make install@&\nrm -v /lib/lib{history,readline}*old@' -i final-system$N/*-readline 565 echo "${tab_}${GREEN}Processing... ${L_arrow}(boot) bootscripts ( ROOT ) ${R_arrow}" 622 566 fi 623 624 echo "${tab_}${GREEN}Processing... ${L_arrow}(boot) final system$N ( ROOT ) ${R_arrow}"625 626 for file in final-system$N/* ; do627 # Keep the script file name628 this_script=`basename $file`629 630 # Test if the stripping phase must be skipped631 # Skip alsp temp-perl for iterative runs632 case $this_script in633 *stripping*) [[ "$STRIP" = "n" ]] && continue ;;634 *temp-perl*) [[ -n "$N" ]] && continue ;;635 esac636 637 # Grab the name of the target, strip id number, XXX-script638 name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' \639 -e 's@temp-@@' \640 -e 's@-64bit@@' \641 -e 's@-64@@' \642 -e 's@64@@' \643 -e 's@n32@@'`644 645 # Find the version of the command files, if it corresponds with the building of646 # a specific package. We need this here to can skip scripts not needed for647 # iterations rebuilds648 649 pkg_tarball=$(get_package_tarball_name $name)650 651 if [[ "$pkg_tarball" = "" ]] && [[ -n "$N" ]] ; then652 case "${this_script}" in653 *stripping*) ;;654 *) continue ;;655 esac656 fi657 658 # Append each name of the script files to a list (this will become659 # the names of the targets in the Makefile660 basicsystem="$basicsystem ${this_script}${N}"661 662 # Append each name of the script files to a list (this will become663 # the names of the logs to be moved for each iteration)664 LOGS="$LOGS ${this_script}"665 666 #--------------------------------------------------------------------#667 # >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< #668 #--------------------------------------------------------------------#669 #670 # Drop in the name of the target on a new line, and the previous target671 # as a dependency. Also call the echo_message function.672 CHROOT_wrt_target "${this_script}${N}" "$PREV"673 674 # If $pkg_tarball isn't empty, we've got a package...675 if [ "$pkg_tarball" != "" ] ; then676 FILE="$pkg_tarball"677 CHROOT_Unpack "$FILE"678 # If the testsuites must be run, initialize the log file679 case $name in680 binutils | gcc | glibc )681 [[ "$TEST" != "0" ]] && CHROOT_wrt_test_log "${this_script}"682 ;;683 * )684 [[ "$TEST" = "2" ]] || [[ "$TEST" = "3" ]] && CHROOT_wrt_test_log "${this_script}"685 ;;686 esac687 # If using optimizations, write the instructions688 [[ "$OPTIMIZE" != "0" ]] && wrt_optimize "$name" && wrt_makeflags "$name"689 fi690 #691 CHROOT_wrt_RunAsRoot "${file}"692 #693 [[ "$pkg_tarball" != "" ]] && CHROOT_wrt_RemoveBuildDirs "${name}"694 #695 # Include a touch of the target name so make can check if it's already been made.696 wrt_touch697 #698 #--------------------------------------------------------------------#699 # >>>>>>>> END OF Makefile ENTRY <<<<<<<< #700 #--------------------------------------------------------------------#701 #702 # Keep the script file name for Makefile dependencies.703 PREV=${this_script}${N}704 # Set system_build envar for iteration targets705 system_build=$basicsystem706 done # for file in final-system/* ...707 708 }709 710 #--------------------------------------#711 chroot_bootscripts_Makefiles() { #712 #--------------------------------------#713 echo "${tab_}${GREEN}Processing... ${L_arrow}(chroot) bootscripts ( CHROOT ) ${R_arrow}"714 567 715 568 for file in bootscripts/* ; do … … 770 623 771 624 #--------------------------------------# 772 boot_bootscripts_Makefiles() { # 773 #--------------------------------------# 774 echo "${tab_}${GREEN}Processing... ${L_arrow}(boot) bootscripts ( ROOT ) ${R_arrow}" 775 776 for file in bootscripts/* ; do 777 # Keep the script file name 778 this_script=`basename $file` 779 780 case $this_script in 781 *udev) continue ;; # This is not a script but a commentary 782 *console*) continue ;; # Use the files that came with the bootscripts 783 *) ;; 784 esac 785 786 # First append each name of the script files to a list (this will become 787 # the names of the targets in the Makefile 788 bootscripttools="$bootscripttools $this_script" 789 790 # Grab the name of the target, strip id number, XXX-script 791 name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@'\ 792 -e 's@-64bit@@' \ 793 -e 's@-64@@' \ 794 -e 's@64@@' \ 795 -e 's@n32@@'` 796 case $name in 797 *bootscripts*) name=bootscripts-cross-lfs ;; 798 *udev-rules) name=udev-cross-lfs ;; 799 esac 800 801 pkg_tarball=$(get_package_tarball_name $name) 802 803 #--------------------------------------------------------------------# 804 # >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< # 805 #--------------------------------------------------------------------# 806 # 807 # Drop in the name of the target on a new line, and the previous target 808 # as a dependency. Also call the echo_message function. 809 CHROOT_wrt_target "${this_script}" "$PREV" 810 # 811 # If $pkg_tarball isn't empty, we've got a package... 812 # 813 [[ "$pkg_tarball" != "" ]] && CHROOT_Unpack "$pkg_tarball" 814 # 815 CHROOT_wrt_RunAsRoot "${file}" 816 # 817 [[ "$pkg_tarball" != "" ]] && CHROOT_wrt_RemoveBuildDirs "${name}" 818 # 819 # Include a touch of the target name so make can check if it's already been made. 820 wrt_touch 821 # 822 #--------------------------------------------------------------------# 823 # >>>>>>>> END OF Makefile ENTRY <<<<<<<< # 824 #--------------------------------------------------------------------# 825 # 826 # Keep the script file name for Makefile dependencies. 827 PREV=$this_script 828 829 done # for file in bootscripts/* ... 830 } 831 832 #--------------------------------------# 833 chroot_bootable_Makefiles() { # 834 #--------------------------------------# 835 echo "${tab_}${GREEN}Processing... ${L_arrow}(chroot) make bootable ( CHROOT ) ${R_arrow}" 625 bootable_Makefiles() { # 626 #--------------------------------------# 627 628 if [[ "${METHOD}" = "chroot" ]]; then 629 echo "${tab_}${GREEN}Processing... ${L_arrow}(chroot) make bootable ( CHROOT ) ${R_arrow}" 630 else 631 echo "${tab_}${GREEN}Processing... ${L_arrow}(boot) make bootable ( ROOT ) ${R_arrow}" 632 fi 633 836 634 837 635 for file in {bootable,the-end}/* ; do … … 905 703 } 906 704 907 #--------------------------------------#908 boot_bootable_Makefiles() { #909 #--------------------------------------#910 echo "${tab_}${GREEN}Processing... ${L_arrow}(boot) make bootable ( ROOT ) ${R_arrow}"911 912 for file in {bootable,the-end}/* ; do913 # Keep the script file name914 this_script=`basename $file`915 916 # A little housekeeping on the scripts917 case $this_script in918 *grub | *aboot | *colo | *silo | *arcload | *lilo | *reboot* ) continue ;;919 *kernel) # if there is no kernel config file do not build the kernel920 [[ -z $CONFIG ]] && continue921 # Copy the named config file to /sources with a standardized name922 cp $CONFIG $BUILDDIR/sources/kernel-config923 ;;924 esac925 #926 # First append each name of the script files to a list (this will become927 # the names of the targets in the Makefile928 bootabletools="$bootabletools $this_script"929 #930 # Grab the name of the target, strip id number and misc words.931 case $this_script in932 *kernel) name=linux ;;933 *) name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' -e 's@-build@@' ` ;;934 esac935 936 pkg_tarball=$(get_package_tarball_name $name)937 938 #--------------------------------------------------------------------#939 # >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< #940 #--------------------------------------------------------------------#941 #942 # Drop in the name of the target on a new line, and the previous target943 # as a dependency. Also call the echo_message function.944 CHROOT_wrt_target "${this_script}" "$PREV"945 #946 # If $pkg_tarball isn't empty, we've got a package...947 # Insert instructions for unpacking the package and changing directories948 #949 [[ "$pkg_tarball" != "" ]] && CHROOT_Unpack "$pkg_tarball"950 #951 # Select a script execution method952 case $this_script in953 *fstab*) if [[ -n "$FSTAB" ]]; then954 # Minimal boot mode has no access to original file, store in /sources955 cp $FSTAB $BUILDDIR/sources/fstab956 CHROOT_wrt_CopyFstab957 else958 CHROOT_wrt_RunAsRoot "${file}"959 fi960 ;;961 *) CHROOT_wrt_RunAsRoot "${file}" ;;962 esac963 #964 # Housekeeping...remove any build directory(ies) except if the package build fails.965 [[ "$pkg_tarball" != "" ]] && CHROOT_wrt_RemoveBuildDirs "${name}"966 #967 # Include a touch of the target name so make can check if it's already been made.968 wrt_touch969 #970 #--------------------------------------------------------------------#971 # >>>>>>>> END OF Makefile ENTRY <<<<<<<< #972 #--------------------------------------------------------------------#973 #974 # Keep the script file name for Makefile dependencies.975 PREV=$this_script976 done977 978 }979 980 705 981 706 #--------------------------------------# … … 987 712 set +e 988 713 declare -f method_cmds 989 declare -f testsuite_cmds990 declare -f final_sys_cmds991 declare -f bootscripts_cmds992 declare -f bootable_cmds993 714 set -e 994 715 … … 1000 721 >$MKFILE.tmp 1001 722 1002 method_cmds=${METHOD}_Makefiles 1003 testsuite_cmds=${METHOD}_testsuite_tools_Makefiles 1004 final_sys_cmds=${METHOD}_final_system_Makefiles 1005 bootscripts_cmds=${METHOD}_bootscripts_Makefiles 1006 bootable_cmds=${METHOD}_bootable_Makefiles 723 method_cmds=${METHOD}_Makefiles 1007 724 1008 725 host_prep_Makefiles # mk_SETUP (SETUP) $host_prep … … 1011 728 $method_cmds # mk_SYSTOOLS (CHROOT) $chroottools/$boottools 1012 729 if [[ ! $TEST = "0" ]]; then 1013 $testsuite_cmds# mk_SYSTOOLS (CHROOT) $testsuitetools730 testsuite_tools_Makefiles # mk_SYSTOOLS (CHROOT) $testsuitetools 1014 731 fi 1015 $final_sys_cmds# mk_FINAL (CHROOT) $basicsystem732 final_system_Makefiles # mk_FINAL (CHROOT) $basicsystem 1016 733 # Add the iterations targets, if needed 1017 734 [[ "$COMPARE" = "y" ]] && wrt_compare_targets 1018 $bootscripts_cmds # mk_BOOTSCRIPT (CHROOT) $bootscripttools1019 $bootable_cmds # mk_BOOTABLE (CHROOT) $bootabletools735 bootscripts_Makefiles # mk_BOOTSCRIPT (CHROOT) $bootscripttools 736 bootable_Makefiles # mk_BOOTABLE (CHROOT) $bootabletools 1020 737 1021 738 # Add the BLFS_TOOL targets, if needed … … 1111 828 AS_LUSER: $cross_tools $temptools 1112 829 SUDO: $orphan_scripts 1113 CHROOT_JAIL: ${chroottools} ${boottools}$testsuitetools $basicsystem $bootscripttools $bootabletools830 CHROOT_JAIL: ${chroottools} $testsuitetools $basicsystem $bootscripttools $bootabletools 1114 831 BLFS_TOOL: $blfs_tool 1115 832 … … 1171 888 mk_SETUP: 1172 889 @\$(call echo_SU_request) 1173 @sudo make S ETUP890 @sudo make SHELL=/bin/bash SETUP 1174 891 @touch \$@ 1175 892 … … 1189 906 mk_FINAL: 1190 907 @\$(call echo_PHASE,Final System) 1191 @( make AS_ROOT )908 @( source /root/.bash_profile && make AS_ROOT ) 1192 909 @touch \$@ 1193 910 … … 1196 913 @if [ "\$(ADD_BLFS_TOOLS)" = "y" ]; then \\ 1197 914 mkdir -p $TRACKING_DIR; \\ 1198 make BLFS_TOOL; \\915 ( make BLFS_TOOL ); \\ 1199 916 fi 1200 917 @touch \$@ 1201 918 1202 919 SETUP: $host_prep 1203 AS_LUSER: $cross_tools $temptools ${ chroottools}${boottools}920 AS_LUSER: $cross_tools $temptools ${boottools} 1204 921 SUDO: $orphan_scripts 1205 922 AS_ROOT: $testsuitetools $basicsystem $bootscripttools $bootabletools
Note:
See TracChangeset
for help on using the changeset viewer.