- Timestamp:
- 07/26/2006 06:42:01 PM (18 years ago)
- Branches:
- experimental
- Children:
- 613d46b
- Parents:
- 1504208
- Location:
- CLFS
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
CLFS/clfs.xsl
r1504208 r3b63c8c 231 231 <xsl:value-of select="$page"/> 232 232 </xsl:when> 233 <xsl:when test="ancestor::sect1[@id='ch-boot-kernel'] or 234 ancestor::sect1[@id='ch-bootable-kernel']"> 235 <xsl:value-of select="$keymap"/> 236 </xsl:when> 233 237 <xsl:otherwise> 234 238 <xsl:text>**EDITME</xsl:text> -
CLFS/config
r1504208 r3b63c8c 23 23 # >>>> 64-64 BUILD <<<< 24 24 # ARCH=x86_64-64 ; TARGET="x86_64-unknown-linux-gnu" 25 # ARCH=mips64-64 ; TARGET="mips el-unknown-linux-gnu"26 # ARCH=mips64-64 ; TARGET="mips -unknown-linux-gnu"25 # ARCH=mips64-64 ; TARGET="mips64el-unknown-linux-gnu" 26 # ARCH=mips64-64 ; TARGET="mips64-unknown-linux-gnu" 27 27 # ARCH=sparc64-64 ; TARGET="sparc64-unknown-linux-gnu" 28 28 # ARCH=alpha ; TARGET="alpha-unknown-linux-gnu" … … 30 30 # >>>> MULTILIB 32/64 <<<< 31 31 # ARCH=x86_64 ; TARGET="x86_64-unknown-linux-gnu" ; TARGET32="i686-pc-linux-gnu" 32 # ARCH=mips64 ; TARGET="mips el-unknown-linux-gnu"; TARGET32="mipsel-unknown-linux-gnu"33 # ARCH=mips64 ; TARGET="mips -unknown-linux-gnu"; TARGET32="mips-unknown-linux-gnu"34 # ARCH=sparc64 ; TARGET="sparc64-unknown-linux-gnu" ; TARGET32="sparc v9-unknown-linux-gnu"32 # ARCH=mips64 ; TARGET="mips64el-unknown-linux-gnu" ; TARGET32="mipsel-unknown-linux-gnu" 33 # ARCH=mips64 ; TARGET="mips64-unknown-linux-gnu" ; TARGET32="mips-unknown-linux-gnu" 34 # ARCH=sparc64 ; TARGET="sparc64-unknown-linux-gnu" ; TARGET32="sparc-unknown-linux-gnu" 35 35 # ARCH=ppc64 ; TARGET="powerpc64-unknown-linux-gnu" ; TARGET32="powerpc-unknown-linux-gnu" 36 36 … … 69 69 #--- Book version 70 70 LFSVRS=development 71 TREE=trunk/BOOK 71 72 72 73 #--- Name of the makefile -
CLFS/master.sh
r1504208 r3b63c8c 11 11 host_prep_Makefiles() { # Initialization of the system 12 12 #----------------------------# 13 local LFS_HOST13 local CLFS_HOST 14 14 15 15 echo "${tab_}${GREEN}Processing... ${L_arrow}host prep files${R_arrow}" 16 16 17 17 # defined here, only for ease of reading 18 LFS_HOST="`echo ${MACHTYPE} | sed -e 's/unknown/cross/g' -e 's/-pc-/-cross-/g'`"18 CLFS_HOST="$(echo $MACHTYPE | sed "s/$(echo $MACHTYPE | cut -d- -f2)/cross/")" 19 19 ( 20 20 cat << EOF … … 42 42 025-addinguser: 024-creatingcrossdir 43 43 @\$(call echo_message, Building) 44 @if [ ! -d /home/ lfs ]; then \\45 groupadd lfs; \\46 useradd -s /bin/bash -g lfs -m -k /dev/nulllfs; \\44 @if [ ! -d /home/clfs ]; then \\ 45 groupadd clfs; \\ 46 useradd -s /bin/bash -g clfs -m -k /dev/null clfs; \\ 47 47 else \\ 48 touch user- lfs-exist; \\48 touch user-clfs-exist; \\ 49 49 fi; 50 @chown lfs \$(MOUNT_PT) && \\51 chown lfs \$(MOUNT_PT)/tools && \\52 chown lfs \$(MOUNT_PT)/cross-tools && \\53 chown lfs \$(MOUNT_PT)/sources && \\50 @chown clfs \$(MOUNT_PT) && \\ 51 chown clfs \$(MOUNT_PT)/tools && \\ 52 chown clfs \$(MOUNT_PT)/cross-tools && \\ 53 chown clfs \$(MOUNT_PT)/sources && \\ 54 54 touch \$@ && \\ 55 55 echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\ … … 58 58 026-settingenvironment: 025-addinguser 59 59 @\$(call echo_message, Building) 60 @if [ -f /home/ lfs/.bashrc -a ! -f /home/lfs/.bashrc.XXX ]; then \\61 mv /home/ lfs/.bashrc /home/lfs/.bashrc.XXX; \\60 @if [ -f /home/clfs/.bashrc -a ! -f /home/clfs/.bashrc.XXX ]; then \\ 61 mv /home/clfs/.bashrc /home/clfs/.bashrc.XXX; \\ 62 62 fi; 63 @if [ -f /home/ lfs/.bash_profile -a ! -f /home/lfs/.bash_profile.XXX ]; then \\64 mv /home/ lfs/.bash_profile /home/lfs/.bash_profile.XXX; \\63 @if [ -f /home/clfs/.bash_profile -a ! -f /home/clfs/.bash_profile.XXX ]; then \\ 64 mv /home/clfs/.bash_profile /home/clfs/.bash_profile.XXX; \\ 65 65 fi; 66 @echo "set +h" > /home/ lfs/.bashrc && \\67 echo "umask 022" >> /home/ lfs/.bashrc && \\68 echo " LFS=\$(MOUNT_PT)" >> /home/lfs/.bashrc && \\69 echo "LC_ALL=POSIX" >> /home/ lfs/.bashrc && \\70 echo "PATH=/cross-tools/bin:/bin:/usr/bin" >> /home/ lfs/.bashrc && \\71 echo "export LFS LC_ALL PATH" >> /home/lfs/.bashrc && \\72 echo "" >> /home/ lfs/.bashrc && \\73 echo "unset CFLAGS" >> /home/ lfs/.bashrc && \\74 echo "unset CXXFLAGS" >> /home/ lfs/.bashrc && \\75 echo "" >> /home/ lfs/.bashrc && \\76 echo "export LFS_HOST=\"${LFS_HOST}\"" >> /home/lfs/.bashrc && \\77 echo "export LFS_TARGET=\"${TARGET}\"" >> /home/lfs/.bashrc && \\78 echo "export LFS_TARGET32=\"${TARGET32}\"" >> /home/lfs/.bashrc && \\79 echo "source $JHALFSDIR/envars" >> /home/ lfs/.bashrc80 @chown lfs:lfs /home/lfs/.bashrc && \\66 @echo "set +h" > /home/clfs/.bashrc && \\ 67 echo "umask 022" >> /home/clfs/.bashrc && \\ 68 echo "CLFS=\$(MOUNT_PT)" >> /home/clfs/.bashrc && \\ 69 echo "LC_ALL=POSIX" >> /home/clfs/.bashrc && \\ 70 echo "PATH=/cross-tools/bin:/bin:/usr/bin" >> /home/clfs/.bashrc && \\ 71 echo "export CLFS LC_ALL PATH" >> /home/clfs/.bashrc && \\ 72 echo "" >> /home/clfs/.bashrc && \\ 73 echo "unset CFLAGS" >> /home/clfs/.bashrc && \\ 74 echo "unset CXXFLAGS" >> /home/clfs/.bashrc && \\ 75 echo "" >> /home/clfs/.bashrc && \\ 76 echo "export CLFS_HOST=\"${CLFS_HOST}\"" >> /home/clfs/.bashrc && \\ 77 echo "export CLFS_TARGET=\"${TARGET}\"" >> /home/clfs/.bashrc && \\ 78 echo "export CLFS_TARGET32=\"${TARGET32}\"" >> /home/clfs/.bashrc && \\ 79 echo "source $JHALFSDIR/envars" >> /home/clfs/.bashrc 80 @chown clfs:clfs /home/clfs/.bashrc && \\ 81 81 touch envars && \\ 82 82 touch \$@ && \\ … … 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 esac 127 # 128 # Find the version of the command files, if it corresponds with the building of a specific package 129 vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'` 130 122 pkg_tarball=$(get_package_tarball_name $name) 131 123 132 124 #--------------------------------------------------------------------# … … 138 130 wrt_target "${this_script}" "$PREV" 139 131 # 140 # If $ vrsisn't empty, we've got a package...141 # 142 [[ "$ vrs" != "" ]] && wrt_unpack "$name-$vrs.tar.*"143 # 144 wrt_run_as_ su "${this_script}" "${file}"145 # 146 [[ "$ vrs" != "" ]] && wrt_remove_build_dirs "${name}"132 # If $pkg_tarball isn't empty, we've got a package... 133 # 134 [[ "$pkg_tarball" != "" ]] && wrt_unpack_clfs "$pkg_tarball" 135 # 136 wrt_run_as_clfs_su "${this_script}" "${file}" 137 # 138 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}" 147 139 # 148 140 # Include a touch of the target name so make can check if it's already been made. … … 169 161 this_script=`basename $file` 170 162 # 163 # Deal with any odd scripts.. 164 case $this_script in 165 *choose) # The choose script will fail if you cannot enter the new environment 166 # If the 'boot' build method was chosen don't run the script 167 [[ $METHOD = "boot" ]] && continue; ;; 168 *) ;; 169 esac 170 171 # 171 172 # First append each name of the script files to a list (this will become 172 173 # the names of the targets in the Makefile … … 177 178 name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@'` 178 179 # 179 # Find the version of the command files, if it corresponds with the building of a specific package 180 vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'` 181 180 pkg_tarball=$(get_package_tarball_name $name) 182 181 183 182 #--------------------------------------------------------------------# … … 189 188 wrt_target "${this_script}" "$PREV" 190 189 # 191 # If $ vrsisn't empty, we've got a package...190 # If $pkg_tarball isn't empty, we've got a package... 192 191 # Insert instructions for unpacking the package and to set the PKGDIR variable. 193 192 # 194 [[ "$ vrs" != "" ]] && wrt_unpack "$name-$vrs.tar.*"195 [[ "$ vrs" != "" ]] && [[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name"196 # 197 wrt_run_as_ su "${this_script}" "${file}"198 # 199 [[ "$ vrs" != "" ]] && wrt_remove_build_dirs "${name}"193 [[ "$pkg_tarball" != "" ]] && wrt_unpack_clfs "$pkg_tarball" 194 [[ "$pkg_tarball" != "" ]] && [[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name" 195 # 196 wrt_run_as_clfs_su "${this_script}" "${file}" 197 # 198 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}" 200 199 # 201 200 # Include a touch of the target name so make can check if it's already been made. … … 250 249 *) name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' -e 's@-build@@' ` ;; 251 250 esac 252 253 vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`251 # Identify the unique version naming scheme for the clfs bootscripts..(bad boys) 252 pkg_tarball=$(get_package_tarball_name $name) 254 253 255 254 #--------------------------------------------------------------------# … … 261 260 wrt_target "${this_script}" "$PREV" 262 261 # 263 # If $ vrsisn't empty, we've got a package...262 # If $pkg_tarball isn't empty, we've got a package... 264 263 # Insert instructions for unpacking the package and changing directories 265 264 # 266 [[ "$ vrs" != "" ]] && wrt_unpack "$name-$vrs.tar.*"267 [[ "$ vrs" != "" ]] && [[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name"265 [[ "$pkg_tarball" != "" ]] && wrt_unpack_clfs "$pkg_tarball" 266 [[ "$pkg_tarball" != "" ]] && [[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name" 268 267 # 269 268 # Select a script execution method 270 269 case $this_script in 271 *changingowner*) wrt_run_as_ root "${this_script}" "${file}" ;;272 *devices*) wrt_run_as_ root "${this_script}" "${file}" ;;270 *changingowner*) wrt_run_as_clfs_root "${this_script}" "${file}" ;; 271 *devices*) wrt_run_as_clfs_root "${this_script}" "${file}" ;; 273 272 *fstab*) if [[ -n "$FSTAB" ]]; then 274 273 wrt_copy_fstab "${this_script}" 275 274 else 276 wrt_run_as_ su "${this_script}" "${file}"275 wrt_run_as_clfs_su "${this_script}" "${file}" 277 276 fi 278 277 ;; 279 *) wrt_run_as_ su "${this_script}" "${file}" ;;278 *) wrt_run_as_clfs_su "${this_script}" "${file}" ;; 280 279 esac 281 280 # 282 281 # Housekeeping...remove any build directory(ies) except if the package build fails. 283 [[ "$ vrs" != "" ]] && wrt_remove_build_dirs "${name}"282 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}" 284 283 # 285 284 # Include a touch of the target name so make can check if it's already been made. … … 318 317 # Grab the name of the target, strip id number, XXX-script 319 318 name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@'` 320 vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'` 319 320 pkg_tarball=$(get_package_tarball_name $name) 321 321 322 322 #--------------------------------------------------------------------# … … 328 328 wrt_target "${this_script}" "$PREV" 329 329 # 330 # If $ vrsisn't empty, we've got a package...330 # If $pkg_tarball isn't empty, we've got a package... 331 331 # Insert instructions for unpacking the package and changing directories 332 332 # 333 if [ "$ vrs" != "" ] ; then333 if [ "$pkg_tarball" != "" ] ; then 334 334 case $this_script in 335 *util-linux) wrt_unpack "$name-$vrs.tar.*" ;;336 *) wrt_unpack2 "$ name-$vrs.tar.*" ;;335 *util-linux) wrt_unpack_clfs "$pkg_tarball" ;; 336 *) wrt_unpack2 "$pkg_tarball" ;; 337 337 esac 338 338 [[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name" … … 341 341 # Select a script execution method 342 342 case $this_script in 343 *kernfs) wrt_run_as_ root"${this_script}" "${file}" ;;344 *util-linux) wrt_run_as_ su"${this_script}" "${file}" ;;345 *) wrt_run_as_chroot1 "${this_script}" "${file}" ;;343 *kernfs) wrt_run_as_clfs_root "${this_script}" "${file}" ;; 344 *util-linux) wrt_run_as_clfs_su "${this_script}" "${file}" ;; 345 *) wrt_run_as_chroot1 "${this_script}" "${file}" ;; 346 346 esac 347 347 # 348 348 # Housekeeping...remove the build directory(ies), except if the package build fails. 349 [[ "$ vrs" != "" ]] && wrt_remove_build_dirs "${name}"349 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}" 350 350 # 351 351 # Include a touch of the target name so make can check if it's already been made. … … 383 383 -e 's@n32@@'` 384 384 385 vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`385 pkg_tarball=$(get_package_tarball_name $name) 386 386 387 387 #--------------------------------------------------------------------# … … 393 393 wrt_target "${this_script}" "$PREV" 394 394 # 395 case $name in 396 tcl) wrt_unpack2 "$name$vrs-src.tar.*" ;; 397 *) wrt_unpack2 "$name-$vrs.tar.*" ;; 398 esac 395 wrt_unpack2 "$pkg_tarball" 399 396 [[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name" 400 397 # … … 438 435 -e 's@n32@@'` 439 436 440 vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`437 pkg_tarball=$(get_package_tarball_name $name) 441 438 442 439 #--------------------------------------------------------------------# … … 446 443 # Drop in the name of the target on a new line, and the previous target 447 444 # as a dependency. Also call the echo_message function. 448 wrt_target "${this_script}" "$PREV" 449 # 450 case $name in 451 tcl) wrt_unpack3 "$name$vrs-src.tar.*" ;; 452 *) wrt_unpack3 "$name-$vrs.tar.*" ;; 453 esac 445 wrt_target_boot "${this_script}" "$PREV" 446 # 447 wrt_unpack3 "$pkg_tarball" 454 448 [[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name" 455 449 # … … 520 514 # a specific package. We need this here to can skip scripts not needed for 521 515 # iterations rebuilds 522 vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`523 524 if [[ "$ vrs" = "" ]] && [[ -n "$N" ]] ; then516 pkg_tarball=$(get_package_tarball_name $name) 517 518 if [[ "$pkg_tarball" = "" ]] && [[ -n "$N" ]] ; then 525 519 case "${this_script}" in 526 520 *stripping*) ;; … … 545 539 wrt_target "${this_script}${N}" "$PREV" 546 540 547 # If $vrs isn't empty, we've got a package... 548 if [ "$vrs" != "" ] ; then 549 FILE="$name-$vrs.tar.*" 550 wrt_unpack2 "$FILE" 541 # If $pkg_tarball isn't empty, we've got a package... 542 if [ "$pkg_tarball" != "" ] ; then 543 wrt_unpack2 "$pkg_tarball" 551 544 # If the testsuites must be run, initialize the log file 552 545 case $name in … … 564 557 wrt_run_as_chroot1 "${this_script}" "${file}" 565 558 # 566 [[ "$ vrs" != "" ]] && wrt_remove_build_dirs "${name}"559 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}" 567 560 # 568 561 # Include a touch of the target name so make can check if it's already been made. … … 631 624 # a specific package. We need this here to can skip scripts not needed for 632 625 # iterations rebuilds 633 vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'` 634 635 if [[ "$vrs" = "" ]] && [[ -n "$N" ]] ; then 626 627 pkg_tarball=$(get_package_tarball_name $name) 628 629 if [[ "$pkg_tarball" = "" ]] && [[ -n "$N" ]] ; then 636 630 case "${this_script}" in 637 631 *stripping*) ;; … … 654 648 # Drop in the name of the target on a new line, and the previous target 655 649 # as a dependency. Also call the echo_message function. 656 wrt_target "${this_script}${N}" "$PREV"657 658 # If $ vrsisn't empty, we've got a package...659 if [ "$ vrs" != "" ] ; then660 FILE="$ name-$vrs.tar.*"650 wrt_target_boot "${this_script}${N}" "$PREV" 651 652 # If $pkg_tarball isn't empty, we've got a package... 653 if [ "$pkg_tarball" != "" ] ; then 654 FILE="$pkg_tarball" 661 655 wrt_unpack3 "$FILE" 662 656 # If the testsuites must be run, initialize the log file … … 675 669 wrt_run_as_root2 "${this_script}" "${file}" 676 670 # 677 [[ "$ vrs" != "" ]] && wrt_remove_build_dirs2 "${name}"671 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs2 "${name}" 678 672 # 679 673 # Include a touch of the target name so make can check if it's already been made. … … 721 715 *udev-rules) name=udev-cross-lfs ;; 722 716 esac 723 vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'` 717 718 pkg_tarball=$(get_package_tarball_name $name) 724 719 725 720 #--------------------------------------------------------------------# … … 731 726 wrt_target "${this_script}" "$PREV" 732 727 # 733 # If $ vrsisn't empty, we've got a package...734 # 735 [[ "$ vrs" != "" ]] && wrt_unpack2 "$name-$vrs.tar.*"728 # If $pkg_tarball isn't empty, we've got a package... 729 # 730 [[ "$pkg_tarball" != "" ]] && wrt_unpack2 "$pkg_tarball" 736 731 # 737 732 wrt_run_as_chroot1 "${this_script}" "${file}" 738 733 # 739 [[ "$ vrs" != "" ]] && wrt_remove_build_dirs "${name}"734 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}" 740 735 # 741 736 # Include a touch of the target name so make can check if it's already been made. … … 782 777 ;; 783 778 esac 784 vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'` 779 780 pkg_tarball=$(get_package_tarball_name $name) 785 781 786 782 #--------------------------------------------------------------------# … … 790 786 # Drop in the name of the target on a new line, and the previous target 791 787 # as a dependency. Also call the echo_message function. 792 wrt_target "${this_script}" "$PREV"793 # 794 # If $ vrsisn't empty, we've got a package...795 # 796 [[ "$ vrs" != "" ]] && wrt_unpack3 "$name-$vrs.tar.*"788 wrt_target_boot "${this_script}" "$PREV" 789 # 790 # If $pkg_tarball isn't empty, we've got a package... 791 # 792 [[ "$pkg_tarball" != "" ]] && wrt_unpack3 "$pkg_tarball" 797 793 # 798 794 wrt_run_as_root2 "${this_script}" "${file}" 799 795 # 800 [[ "$ vrs" != "" ]] && wrt_remove_build_dirs2 "${name}"796 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs2 "${name}" 801 797 # 802 798 # Include a touch of the target name so make can check if it's already been made. … … 845 841 ;; 846 842 esac 847 vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'` 843 844 pkg_tarball=$(get_package_tarball_name $name) 848 845 849 846 #--------------------------------------------------------------------# … … 855 852 wrt_target "${this_script}" "$PREV" 856 853 # 857 # If $ vrsisn't empty, we've got a package...854 # If $pkg_tarball isn't empty, we've got a package... 858 855 # Insert instructions for unpacking the package and changing directories 859 856 # 860 [[ "$ vrs" != "" ]] && wrt_unpack2 "$name-$vrs.tar.*"857 [[ "$pkg_tarball" != "" ]] && wrt_unpack2 "$pkg_tarball" 861 858 # 862 859 # Select a script execution method … … 872 869 # 873 870 # Housekeeping...remove any build directory(ies) except if the package build fails. 874 [[ "$ vrs" != "" ]] && wrt_remove_build_dirs "${name}"871 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}" 875 872 # 876 873 # Include a touch of the target name so make can check if it's already been made. … … 918 915 # Grab the name of the target, strip id number and misc words. 919 916 case $this_script in 920 *kernel) name=linux 921 ;; 917 *kernel) name=linux ;; 922 918 *) name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' -e 's@-build@@' ` ;; 923 919 esac 924 920 925 vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`921 pkg_tarball=$(get_package_tarball_name $name) 926 922 927 923 #--------------------------------------------------------------------# … … 931 927 # Drop in the name of the target on a new line, and the previous target 932 928 # as a dependency. Also call the echo_message function. 933 wrt_target "${this_script}" "$PREV"934 # 935 # If $ vrsisn't empty, we've got a package...929 wrt_target_boot "${this_script}" "$PREV" 930 # 931 # If $pkg_tarball isn't empty, we've got a package... 936 932 # Insert instructions for unpacking the package and changing directories 937 933 # 938 [[ "$ vrs" != "" ]] && wrt_unpack3 "$name-$vrs.tar.*"934 [[ "$pkg_tarball" != "" ]] && wrt_unpack3 "$pkg_tarball" 939 935 # 940 936 # Select a script execution method … … 952 948 # 953 949 # Housekeeping...remove any build directory(ies) except if the package build fails. 954 [[ "$ vrs" != "" ]] && wrt_remove_build_dirs2 "${name}"950 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs2 "${name}" 955 951 # 956 952 # Include a touch of the target name so make can check if it's already been made. … … 1032 1028 -e 's|exit||g' \ 1033 1029 -e 's|$| -c|' \ 1034 -e 's|"$$ LFS"|$(MOUNT_PT)|'\1030 -e 's|"$$CLFS"|$(MOUNT_PT)|'\ 1035 1031 -e 's|set -e||'` 1036 1032 echo -e "CHROOT1= $chroot\n" >> $MKFILE … … 1064 1060 clean: clean-chapter4 clean-chapter3 clean-chapter2 1065 1061 1062 restart: 1063 @echo "This feature does not exist for the CLFS makefile. (yet)" 1064 1066 1065 clean-chapter2: 1067 -if [ ! -f user- lfs-exist ]; then \\1068 userdel lfs; \\1069 rm -rf /home/ lfs; \\1066 -if [ ! -f user-clfs-exist ]; then \\ 1067 userdel clfs; \\ 1068 rm -rf /home/clfs; \\ 1070 1069 fi; 1071 1070 rm -rf \$(MOUNT_PT)/tools … … 1073 1072 rm -rf \$(MOUNT_PT)/cross-tools 1074 1073 rm -f /cross-tools 1075 rm -f envars user- lfs-exist1074 rm -f envars user-clfs-exist 1076 1075 rm -f 02* logs/02*.log 1077 1076 1078 1077 clean-chapter3: 1079 1078 rm -rf \$(MOUNT_PT)/tools/* 1080 rm -f $cross_tools restore- lfs-env sources-dir1079 rm -f $cross_tools restore-clfs-env sources-dir 1081 1080 cd logs && rm -f $cross_tools && cd .. 1082 1081 … … 1092 1091 1093 1092 1094 restore- lfs-env:1093 restore-clfs-env: 1095 1094 @\$(call echo_message, Building) 1096 @if [ -f /home/ lfs/.bashrc.XXX ]; then \\1097 mv -f /home/ lfs/.bashrc.XXX /home/lfs/.bashrc; \\1095 @if [ -f /home/clfs/.bashrc.XXX ]; then \\ 1096 mv -f /home/clfs/.bashrc.XXX /home/clfs/.bashrc; \\ 1098 1097 fi; 1099 @if [ -f /home/ lfs/.bash_profile.XXX ]; then \\1100 mv /home/ lfs/.bash_profile.XXX /home/lfs/.bash_profile; \\1098 @if [ -f /home/clfs/.bash_profile.XXX ]; then \\ 1099 mv /home/clfs/.bash_profile.XXX /home/clfs/.bash_profile; \\ 1101 1100 fi; 1102 @chown lfs:lfs /home/lfs/.bash* && \\1101 @chown clfs:clfs /home/clfs/.bash* && \\ 1103 1102 touch \$@ && \\ 1104 1103 echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\ … … 1111 1110 @-umount \$(MOUNT_PT)/sys 1112 1111 @-umount \$(MOUNT_PT)/proc 1113 @-if [ ! -f user- lfs-exist ]; then \\1114 userdel lfs; \\1115 rm -rf /home/ lfs; \\1112 @-if [ ! -f user-clfs-exist ]; then \\ 1113 userdel clfs; \\ 1114 rm -rf /home/clfs; \\ 1116 1115 fi; 1117 1116 … … 1143 1142 clean: clean-makesys clean-makeboot clean-jhalfs 1144 1143 1144 restart: 1145 @echo "This feature does not exist for the CLFS makefile. (yet)" 1146 1145 1147 clean-jhalfs: 1146 -if [ ! -f user- lfs-exist ]; then \\1147 userdel lfs; \\1148 rm -rf /home/ lfs; \\1148 -if [ ! -f user-clfs-exist ]; then \\ 1149 userdel clfs; \\ 1150 rm -rf /home/clfs; \\ 1149 1151 fi; 1150 1152 rm -rf \$(MOUNT_PT)/tools … … 1152 1154 rm -rf \$(MOUNT_PT)/cross-tools 1153 1155 rm -f /cross-tools 1154 rm -f envars user- lfs-exist1156 rm -f envars user-clfs-exist 1155 1157 rm -f 02* logs/02*.log 1156 1158 … … 1158 1160 rm -rf /tools/* 1159 1161 rm -f $cross_tools && rm -f $temptools && rm -f $chroottools && rm -f $boottools 1160 rm -f restore- lfs-env sources-dir1162 rm -f restore-clfs-env sources-dir 1161 1163 cd logs && rm -f $cross_tools && rm -f $temptools && rm -f $chroottools && rm -f $boottools && cd .. 1162 1164 … … 1174 1176 1175 1177 1176 restore- lfs-env:1178 restore-clfs-env: 1177 1179 @\$(call echo_message, Building) 1178 @if [ -f /home/ lfs/.bashrc.XXX ]; then \\1179 mv -fv /home/ lfs/.bashrc.XXX /home/lfs/.bashrc; \\1180 @if [ -f /home/clfs/.bashrc.XXX ]; then \\ 1181 mv -fv /home/clfs/.bashrc.XXX /home/clfs/.bashrc; \\ 1180 1182 fi; 1181 @if [ -f /home/ lfs/.bash_profile.XXX ]; then \\1182 mv -v /home/ lfs/.bash_profile.XXX /home/lfs/.bash_profile; \\1183 @if [ -f /home/clfs/.bash_profile.XXX ]; then \\ 1184 mv -v /home/clfs/.bash_profile.XXX /home/clfs/.bash_profile; \\ 1183 1185 fi; 1184 @chown lfs:lfs /home/lfs/.bash* && \\1186 @chown clfs:clfs /home/clfs/.bash* && \\ 1185 1187 touch \$@ && \\ 1186 1188 echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
Note:
See TracChangeset
for help on using the changeset viewer.