Changeset ca6b261 for CLFS/master.sh
- Timestamp:
- 11/12/2006 09:55:20 AM (18 years ago)
- Branches:
- 2.3, 2.3.x, 2.4, ablfs, ablfs-more, legacy, new_features, trunk
- Children:
- 1f81129
- Parents:
- 8f2c086
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CLFS/master.sh
r8f2c086 rca6b261 4 4 5 5 orphan_scripts="" # 2 scripts do not fit BOOT_Makefiles LUSER environment 6 7 ###################################8 ### FUNCTIONS ###9 ###################################10 11 #--------------------------------------#12 BOOT_wrt_target() { # "${this_script}" "$PREV"13 #--------------------------------------#14 local i=$115 local PREV=$216 case $i in17 iteration* ) local LOGFILE=$this_script.log ;;18 * ) local LOGFILE=$this_script ;;19 esac20 (21 cat << EOF22 23 $i: $PREV24 @\$(call echo_message, Building)25 @./progress_bar.sh \$@ \$\$PPID &26 @echo -e "\n\`date\`\n\nKB: \`du -skx --exclude=${SCRIPT_ROOT}\`\n" >logs/$LOGFILE27 EOF28 ) >> $MKFILE.tmp29 }30 31 #--------------------------------------#32 BOOT_wrt_Unpack() { # "$pkg_tarball"33 #--------------------------------------#34 local FILE=$135 local optSAVE_PREVIOUS=$236 37 if [ "${optSAVE_PREVIOUS}" != "1" ]; then38 (39 cat << EOF40 @\$(call remove_existing_dirs2,$FILE)41 EOF42 ) >> $MKFILE.tmp43 fi44 (45 cat << EOF46 @\$(call unpack3,$FILE)47 @\$(call get_pkg_root2)48 EOF49 ) >> $MKFILE.tmp50 }51 52 #----------------------------------#53 BOOT_wrt_RunAsRoot() { # "${this_script}" "${file}"54 #----------------------------------#55 local this_script=$156 local file=$257 (58 cat << EOF59 @( time { source envars && ${PROGNAME}-commands/`dirname $file`/\$@ >>logs/\$@ 2>&1 ; } ) 2>>logs/\$@ && \\60 echo -e "\nKB: \`du -skx --exclude=${SCRIPT_ROOT} \`\n" >>logs/\$@61 EOF62 ) >> $MKFILE.tmp63 }64 65 #--------------------------------------#66 BOOT_wrt_RemoveBuildDirs() { # "${name}"67 #--------------------------------------#68 local name=$169 (70 cat << EOF71 @\$(call remove_build_dirs2,$name)72 EOF73 ) >> $MKFILE.tmp74 }75 76 #----------------------------------#77 BOOT_wrt_test_log() { #78 #----------------------------------#79 local TESTLOGFILE=$180 (81 cat << EOF82 @echo "export TEST_LOG=/\$(SCRIPT_ROOT)/test-logs/$TESTLOGFILE" >> envars && \\83 echo -e "\n\`date\`\n" >test-logs/$TESTLOGFILE84 EOF85 ) >> $MKFILE.tmp86 }87 88 #----------------------------------#89 BOOT_wrt_CopyFstab() { #90 #----------------------------------#91 (92 cat << EOF93 @( time { cp -v /sources/fstab /etc/fstab >>logs/${this_script} 2>&1 ; } ) 2>>logs/${this_script}94 EOF95 ) >> $MKFILE.tmp96 }97 98 99 ########################################100 6 101 7 … … 559 465 # Drop in the name of the target on a new line, and the previous target 560 466 # as a dependency. Also call the echo_message function. 561 BOOT_wrt_target "${this_script}" "$PREV"562 # 563 BOOT_wrt_Unpack "$pkg_tarball"467 CHROOT_wrt_target "${this_script}" "$PREV" 468 # 469 CHROOT_Unpack "$pkg_tarball" 564 470 [[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name" 565 471 # 566 BOOT_wrt_RunAsRoot "${this_script}""${file}"567 # 568 BOOT_wrt_RemoveBuildDirs "${name}"472 CHROOT_wrt_RunAsRoot "${file}" 473 # 474 CHROOT_wrt_RemoveBuildDirs "${name}" 569 475 # 570 476 # Include a touch of the target name so make can check if it's already been made. … … 764 670 # Drop in the name of the target on a new line, and the previous target 765 671 # as a dependency. Also call the echo_message function. 766 BOOT_wrt_target "${this_script}${N}" "$PREV"672 CHROOT_wrt_target "${this_script}${N}" "$PREV" 767 673 768 674 # If $pkg_tarball isn't empty, we've got a package... 769 675 if [ "$pkg_tarball" != "" ] ; then 770 676 FILE="$pkg_tarball" 771 BOOT_wrt_Unpack "$FILE"677 CHROOT_Unpack "$FILE" 772 678 # If the testsuites must be run, initialize the log file 773 679 case $name in 774 680 binutils | gcc | glibc ) 775 [[ "$TEST" != "0" ]] && BOOT_wrt_test_log "${this_script}"681 [[ "$TEST" != "0" ]] && CHROOT_wrt_test_log "${this_script}" 776 682 ;; 777 683 * ) 778 [[ "$TEST" = "2" ]] || [[ "$TEST" = "3" ]] && BOOT_wrt_test_log "${this_script}"684 [[ "$TEST" = "2" ]] || [[ "$TEST" = "3" ]] && CHROOT_wrt_test_log "${this_script}" 779 685 ;; 780 686 esac … … 783 689 fi 784 690 # 785 BOOT_wrt_RunAsRoot "${this_script}""${file}"786 # 787 [[ "$pkg_tarball" != "" ]] && BOOT_wrt_RemoveBuildDirs "${name}"691 CHROOT_wrt_RunAsRoot "${file}" 692 # 693 [[ "$pkg_tarball" != "" ]] && CHROOT_wrt_RemoveBuildDirs "${name}" 788 694 # 789 695 # Include a touch of the target name so make can check if it's already been made. … … 901 807 # Drop in the name of the target on a new line, and the previous target 902 808 # as a dependency. Also call the echo_message function. 903 BOOT_wrt_target "${this_script}" "$PREV"809 CHROOT_wrt_target "${this_script}" "$PREV" 904 810 # 905 811 # If $pkg_tarball isn't empty, we've got a package... 906 812 # 907 [[ "$pkg_tarball" != "" ]] && BOOT_wrt_Unpack "$pkg_tarball"908 # 909 BOOT_wrt_RunAsRoot "${this_script}""${file}"910 # 911 [[ "$pkg_tarball" != "" ]] && BOOT_wrt_RemoveBuildDirs "${name}"813 [[ "$pkg_tarball" != "" ]] && CHROOT_Unpack "$pkg_tarball" 814 # 815 CHROOT_wrt_RunAsRoot "${file}" 816 # 817 [[ "$pkg_tarball" != "" ]] && CHROOT_wrt_RemoveBuildDirs "${name}" 912 818 # 913 819 # Include a touch of the target name so make can check if it's already been made. … … 1036 942 # Drop in the name of the target on a new line, and the previous target 1037 943 # as a dependency. Also call the echo_message function. 1038 BOOT_wrt_target "${this_script}" "$PREV"944 CHROOT_wrt_target "${this_script}" "$PREV" 1039 945 # 1040 946 # If $pkg_tarball isn't empty, we've got a package... 1041 947 # Insert instructions for unpacking the package and changing directories 1042 948 # 1043 [[ "$pkg_tarball" != "" ]] && BOOT_wrt_Unpack "$pkg_tarball"949 [[ "$pkg_tarball" != "" ]] && CHROOT_Unpack "$pkg_tarball" 1044 950 # 1045 951 # Select a script execution method … … 1048 954 # Minimal boot mode has no access to original file, store in /sources 1049 955 cp $FSTAB $BUILDDIR/sources/fstab 1050 BOOT_wrt_CopyFstab "${this_script}"956 CHROOT_wrt_CopyFstab 1051 957 else 1052 BOOT_wrt_RunAsRoot "${this_script}""${file}"958 CHROOT_wrt_RunAsRoot "${file}" 1053 959 fi 1054 960 ;; 1055 *) BOOT_wrt_RunAsRoot "${this_script}""${file}" ;;961 *) CHROOT_wrt_RunAsRoot "${file}" ;; 1056 962 esac 1057 963 # 1058 964 # Housekeeping...remove any build directory(ies) except if the package build fails. 1059 [[ "$pkg_tarball" != "" ]] && BOOT_wrt_RemoveBuildDirs "${name}"965 [[ "$pkg_tarball" != "" ]] && CHROOT_wrt_RemoveBuildDirs "${name}" 1060 966 # 1061 967 # Include a touch of the target name so make can check if it's already been made.
Note:
See TracChangeset
for help on using the changeset viewer.