Changeset a160d86 for CLFS/master.sh
- Timestamp:
- 06/20/2006 09:14:44 PM (18 years ago)
- Branches:
- 1.0, 2.3, 2.3.x, 2.4, ablfs, ablfs-more, legacy, new_features, trunk
- Children:
- ddde18e
- Parents:
- c044e3c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CLFS/master.sh
rc044e3c ra160d86 118 118 -e 's@-static@@' \ 119 119 -e 's@-final@@' \ 120 -e 's@-headers@@' \ 121 -e 's@-64@@' \ 120 -e 's@-64@@' \ 122 121 -e 's@-n32@@'` 123 # Adjust 'name' and patch a few scripts on the fly.. 124 case $name in 125 linux-libc) name=linux-libc-headers ;; 126 linux) name=linux-headers ;; 127 esac 128 # 129 # Find the version of the command files, if it corresponds with the building of a specific package 130 131 # oh-oh.. This small ugly is necessary to handle the LFS headers naming scheme 132 if [ "${name}" = "linux-headers" ]; then 133 linux_vrs=`grep "^linux-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'` 134 vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'` 135 vrs=${linux_vrs}-${vrs##*-} 136 else 137 vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'` 138 fi 122 pkg_tarball=$(get_package_tarball_name $name) 123 139 124 #--------------------------------------------------------------------# 140 125 # >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< # … … 145 130 wrt_target "${this_script}" "$PREV" 146 131 # 147 # If $ vrsisn't empty, we've got a package...148 # 149 [[ "$ vrs" != "" ]] && wrt_unpack "$name-$vrs.tar.*"132 # If $pkg_tarball isn't empty, we've got a package... 133 # 134 [[ "$pkg_tarball" != "" ]] && wrt_unpack "$pkg_tarball" 150 135 # 151 136 wrt_run_as_su "${this_script}" "${file}" 152 137 # 153 [[ "$ vrs" != "" ]] && wrt_remove_build_dirs "${name}"138 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}" 154 139 # 155 140 # Include a touch of the target name so make can check if it's already been made. … … 184 169 name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@'` 185 170 # 186 # Find the version of the command files, if it corresponds with the building of a specific package 187 vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'` 188 171 pkg_tarball=$(get_package_tarball_name $name) 189 172 190 173 #--------------------------------------------------------------------# … … 196 179 wrt_target "${this_script}" "$PREV" 197 180 # 198 # If $ vrsisn't empty, we've got a package...181 # If $pkg_tarball isn't empty, we've got a package... 199 182 # Insert instructions for unpacking the package and to set the PKGDIR variable. 200 183 # 201 [[ "$ vrs" != "" ]] && wrt_unpack "$name-$vrs.tar.*"202 [[ "$ vrs" != "" ]] && [[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name"184 [[ "$pkg_tarball" != "" ]] && wrt_unpack "$pkg_tarball" 185 [[ "$pkg_tarball" != "" ]] && [[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name" 203 186 # 204 187 wrt_run_as_su "${this_script}" "${file}" 205 188 # 206 [[ "$ vrs" != "" ]] && wrt_remove_build_dirs "${name}"189 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}" 207 190 # 208 191 # Include a touch of the target name so make can check if it's already been made. … … 258 241 esac 259 242 # Identify the unique version naming scheme for the clfs bootscripts..(bad boys) 260 case $name in 261 bootscripts-cross-lfs) 262 vrs=`grep "^clfs-bootscripts-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'` 263 ;; 264 *) vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'` 265 ;; 266 esac 243 pkg_tarball=$(get_package_tarball_name $name) 244 267 245 #--------------------------------------------------------------------# 268 246 # >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< # … … 273 251 wrt_target "${this_script}" "$PREV" 274 252 # 275 # If $ vrsisn't empty, we've got a package...253 # If $pkg_tarball isn't empty, we've got a package... 276 254 # Insert instructions for unpacking the package and changing directories 277 255 # 278 [[ "$ vrs" != "" ]] && wrt_unpack "$name-$vrs.tar.*"279 [[ "$ vrs" != "" ]] && [[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name"256 [[ "$pkg_tarball" != "" ]] && wrt_unpack "$pkg_tarball" 257 [[ "$pkg_tarball" != "" ]] && [[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name" 280 258 # 281 259 # Select a script execution method … … 293 271 # 294 272 # Housekeeping...remove any build directory(ies) except if the package build fails. 295 [[ "$ vrs" != "" ]] && wrt_remove_build_dirs "${name}"273 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}" 296 274 # 297 275 # Include a touch of the target name so make can check if it's already been made. … … 330 308 # Grab the name of the target, strip id number, XXX-script 331 309 name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@'` 332 vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'` 310 311 pkg_tarball=$(get_package_tarball_name $name) 333 312 334 313 #--------------------------------------------------------------------# … … 340 319 wrt_target "${this_script}" "$PREV" 341 320 # 342 # If $ vrsisn't empty, we've got a package...321 # If $pkg_tarball isn't empty, we've got a package... 343 322 # Insert instructions for unpacking the package and changing directories 344 323 # 345 if [ "$ vrs" != "" ] ; then324 if [ "$pkg_tarball" != "" ] ; then 346 325 case $this_script in 347 *util-linux) wrt_unpack "$ name-$vrs.tar.*" ;;348 *) wrt_unpack2 "$ name-$vrs.tar.*" ;;326 *util-linux) wrt_unpack "$pkg_tarball" ;; 327 *) wrt_unpack2 "$pkg_tarball" ;; 349 328 esac 350 329 [[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name" … … 354 333 case $this_script in 355 334 *kernfs) wrt_run_as_root "${this_script}" "${file}" ;; 356 *util-linux) wrt_run_as_su "${this_script}" "${file}" ;;335 *util-linux) wrt_run_as_su "${this_script}" "${file}" ;; 357 336 *) wrt_run_as_chroot1 "${this_script}" "${file}" ;; 358 337 esac 359 338 # 360 339 # Housekeeping...remove the build directory(ies), except if the package build fails. 361 [[ "$ vrs" != "" ]] && wrt_remove_build_dirs "${name}"340 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}" 362 341 # 363 342 # Include a touch of the target name so make can check if it's already been made. … … 395 374 -e 's@n32@@'` 396 375 397 vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`376 pkg_tarball=$(get_package_tarball_name $name) 398 377 399 378 #--------------------------------------------------------------------# … … 406 385 # 407 386 case $name in 408 tcl) wrt_unpack2 "$name$vrs-src.tar.*";;409 *) wrt_unpack2 "$ name-$vrs.tar.*" ;;387 tcl) wrt_unpack2 `grep "^tcl" $JHALFSDIR/my_packages` ;; 388 *) wrt_unpack2 "$pkg_tarball" ;; 410 389 esac 411 390 [[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name" … … 450 429 -e 's@n32@@'` 451 430 452 vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`431 pkg_tarball=$(get_package_tarball_name $name) 453 432 454 433 #--------------------------------------------------------------------# … … 461 440 # 462 441 case $name in 463 tcl) wrt_unpack3 "$name$vrs-src.tar.*";;464 *) wrt_unpack3 "$ name-$vrs.tar.*" ;;442 tcl) wrt_unpack3 `grep "^tcl" $JHALFSDIR/my_packages` ;; 443 *) wrt_unpack3 "$pkg_tarball" ;; 465 444 esac 466 445 [[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name" … … 532 511 # a specific package. We need this here to can skip scripts not needed for 533 512 # iterations rebuilds 534 535 # oh-oh.. This small ugly is necessary to handle the LFS headers naming scheme 536 if [ "${name}" = "linux-headers" ]; then 537 linux_vrs=`grep "^linux-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'` 538 vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'` 539 vrs=${linux_vrs}-${vrs##*-} 540 else 541 vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'` 542 fi 543 544 if [[ "$vrs" = "" ]] && [[ -n "$N" ]] ; then 513 pkg_tarball=$(get_package_tarball_name $name) 514 515 if [[ "$pkg_tarball" = "" ]] && [[ -n "$N" ]] ; then 545 516 case "${this_script}" in 546 517 *stripping*) ;; … … 565 536 wrt_target "${this_script}${N}" "$PREV" 566 537 567 # If $vrs isn't empty, we've got a package... 568 if [ "$vrs" != "" ] ; then 569 FILE="$name-$vrs.tar.*" 570 wrt_unpack2 "$FILE" 538 # If $pkg_tarball isn't empty, we've got a package... 539 if [ "$pkg_tarball" != "" ] ; then 540 wrt_unpack2 "$pkg_tarball" 571 541 # If the testsuites must be run, initialize the log file 572 542 case $name in … … 584 554 wrt_run_as_chroot1 "${this_script}" "${file}" 585 555 # 586 [[ "$ vrs" != "" ]] && wrt_remove_build_dirs "${name}"556 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}" 587 557 # 588 558 # Include a touch of the target name so make can check if it's already been made. … … 651 621 # a specific package. We need this here to can skip scripts not needed for 652 622 # iterations rebuilds 653 vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'` 654 655 if [[ "$vrs" = "" ]] && [[ -n "$N" ]] ; then 623 624 pkg_tarball=$(get_package_tarball_name $name) 625 626 if [[ "$pkg_tarball" = "" ]] && [[ -n "$N" ]] ; then 656 627 case "${this_script}" in 657 628 *stripping*) ;; … … 676 647 wrt_target "${this_script}${N}" "$PREV" 677 648 678 # If $ vrsisn't empty, we've got a package...679 if [ "$ vrs" != "" ] ; then680 FILE="$ name-$vrs.tar.*"649 # If $pkg_tarball isn't empty, we've got a package... 650 if [ "$pkg_tarball" != "" ] ; then 651 FILE="$pkg_tarball" 681 652 wrt_unpack3 "$FILE" 682 653 # If the testsuites must be run, initialize the log file … … 695 666 wrt_run_as_root2 "${this_script}" "${file}" 696 667 # 697 [[ "$ vrs" != "" ]] && wrt_remove_build_dirs2 "${name}"668 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs2 "${name}" 698 669 # 699 670 # Include a touch of the target name so make can check if it's already been made. … … 742 713 esac 743 714 744 # Identify the unique version naming scheme for the clfs bootscripts..(bad boys) 745 case $name in 746 bootscripts-cross-lfs) 747 vrs=`grep "^clfs-bootscripts-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'` 748 ;; 749 *) vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'` 750 ;; 751 esac 715 pkg_tarball=$(get_package_tarball_name $name) 752 716 753 717 #--------------------------------------------------------------------# … … 759 723 wrt_target "${this_script}" "$PREV" 760 724 # 761 # If $ vrsisn't empty, we've got a package...762 # 763 [[ "$ vrs" != "" ]] && wrt_unpack2 "$name-$vrs.tar.*"725 # If $pkg_tarball isn't empty, we've got a package... 726 # 727 [[ "$pkg_tarball" != "" ]] && wrt_unpack2 "$pkg_tarball" 764 728 # 765 729 wrt_run_as_chroot1 "${this_script}" "${file}" 766 730 # 767 [[ "$ vrs" != "" ]] && wrt_remove_build_dirs "${name}"731 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}" 768 732 # 769 733 # Include a touch of the target name so make can check if it's already been made. … … 810 774 ;; 811 775 esac 812 vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'` 776 777 pkg_tarball=$(get_package_tarball_name $name) 813 778 814 779 #--------------------------------------------------------------------# … … 820 785 wrt_target "${this_script}" "$PREV" 821 786 # 822 # If $ vrsisn't empty, we've got a package...823 # 824 [[ "$ vrs" != "" ]] && wrt_unpack3 "$name-$vrs.tar.*"787 # If $pkg_tarball isn't empty, we've got a package... 788 # 789 [[ "$pkg_tarball" != "" ]] && wrt_unpack3 "$pkg_tarball" 825 790 # 826 791 wrt_run_as_root2 "${this_script}" "${file}" 827 792 # 828 [[ "$ vrs" != "" ]] && wrt_remove_build_dirs2 "${name}"793 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs2 "${name}" 829 794 # 830 795 # Include a touch of the target name so make can check if it's already been made. … … 873 838 ;; 874 839 esac 875 vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'` 840 841 pkg_tarball=$(get_package_tarball_name $name) 876 842 877 843 #--------------------------------------------------------------------# … … 883 849 wrt_target "${this_script}" "$PREV" 884 850 # 885 # If $ vrsisn't empty, we've got a package...851 # If $pkg_tarball isn't empty, we've got a package... 886 852 # Insert instructions for unpacking the package and changing directories 887 853 # 888 [[ "$ vrs" != "" ]] && wrt_unpack2 "$name-$vrs.tar.*"854 [[ "$pkg_tarball" != "" ]] && wrt_unpack2 "$pkg_tarball" 889 855 # 890 856 # Select a script execution method … … 900 866 # 901 867 # Housekeeping...remove any build directory(ies) except if the package build fails. 902 [[ "$ vrs" != "" ]] && wrt_remove_build_dirs "${name}"868 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}" 903 869 # 904 870 # Include a touch of the target name so make can check if it's already been made. … … 946 912 # Grab the name of the target, strip id number and misc words. 947 913 case $this_script in 948 *kernel) name=linux 949 ;; 914 *kernel) name=linux ;; 950 915 *) name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' -e 's@-build@@' ` ;; 951 916 esac 952 917 953 vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`918 pkg_tarball=$(get_package_tarball_name $name) 954 919 955 920 #--------------------------------------------------------------------# … … 961 926 wrt_target "${this_script}" "$PREV" 962 927 # 963 # If $ vrsisn't empty, we've got a package...928 # If $pkg_tarball isn't empty, we've got a package... 964 929 # Insert instructions for unpacking the package and changing directories 965 930 # 966 [[ "$ vrs" != "" ]] && wrt_unpack3 "$name-$vrs.tar.*"931 [[ "$pkg_tarball" != "" ]] && wrt_unpack3 "$pkg_tarball" 967 932 # 968 933 # Select a script execution method … … 980 945 # 981 946 # Housekeeping...remove any build directory(ies) except if the package build fails. 982 [[ "$ vrs" != "" ]] && wrt_remove_build_dirs2 "${name}"947 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs2 "${name}" 983 948 # 984 949 # Include a touch of the target name so make can check if it's already been made. … … 1092 1057 clean: clean-chapter4 clean-chapter3 clean-chapter2 1093 1058 1059 restart: 1060 @echo "This feature does not exist for the CLFS makefile. (yet)" 1061 1094 1062 clean-chapter2: 1095 1063 -if [ ! -f user-lfs-exist ]; then \\ … … 1171 1139 clean: clean-makesys clean-makeboot clean-jhalfs 1172 1140 1141 restart: 1142 @echo "This feature does not exist for the CLFS makefile. (yet)" 1143 1173 1144 clean-jhalfs: 1174 1145 -if [ ! -f user-lfs-exist ]; then \\
Note:
See TracChangeset
for help on using the changeset viewer.