- Timestamp:
- 10/24/2005 07:21:09 PM (19 years ago)
- Branches:
- 0.2, 1.0, 2.3, 2.3.x, 2.4, ablfs, ablfs-more, legacy, new_features, trunk
- Children:
- 7d4b863
- Parents:
- 49aea5e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
jhalfs
r49aea5e re1093cd 4 4 # Load the configuration file 5 5 # 6 .jhalfs.conf6 source jhalfs.conf 7 7 8 8 … … 278 278 } 279 279 280 #-----------------------------------------------# 281 _IS_() # Function to test build scripts names 282 #-----------------------------------------------# 283 { 284 # Returns substr $2 or null str 285 # Must use string testing 286 case $1 in 287 *$2*) echo "$2" ;; 288 *) echo "" ;; 289 esac 290 } 291 280 292 #----------------------------# 281 293 chapter4_Makefiles() { … … 322 334 # If no testsuites will be run, then TCL, Expect and DejaGNU isn't needed 323 335 if [ "$TOOLCHAINTEST" = "0" ]; then 324 if echo $i | grep -q "tcl" ; then 325 continue 326 elif echo $i | grep -q "expect" ; then 327 continue 328 elif echo $i | grep -q "dejagnu" ; then 336 if [[ `_IS_ $i tcl` ]] || [[ `_IS_ $i expect` ]] || [[ `_IS_ $i dejagnu` ]] ; then 329 337 continue 330 338 fi … … 379 387 380 388 # Dump the path to the Binutils or TCL sources directory. 381 if [ ${i:4:8} = "binutils" -o ${i:4:3} = "tcl"] ; then389 if [[ `_IS_ $i binutils` ]] || [[ `_IS_ $i tcl` ]] ; then 382 390 ( 383 391 cat << EOF … … 387 395 388 396 # For the Adjusting phase we must to cd to the binutils-build directory. 389 elif [ ${i:4:9} = "adjusting"] ; then397 elif [[ `_IS_ $i adjusting` ]] ; then 390 398 ( 391 399 cat << EOF … … 396 404 397 405 # For the Expect build we need to set the TCLPATH envar. 398 elif [ ${i:4:6} = "expect"] ; then406 elif [[ `_IS_ $i expect` ]] ; then 399 407 ( 400 408 cat << EOF … … 427 435 # For Binutils and TCL the sources must be retained some time. 428 436 if [ "$vrs" != "" ] ; then 429 if [ ${i:4:8} != "binutils" ] && [ ${i:4:3} != "tcl"] ; then437 if [[ ! `_IS_ $i binutils` ]] && [[ ! `_IS_ $i tcl` ]] ; then 430 438 ( 431 439 cat << EOF … … 441 449 442 450 # Remove the Binutils pass 1 sources after a successful Adjusting phase. 443 if [ ${i:4:9} = "adjusting"] ; then451 if [[ `_IS_ $i adjusting` ]] ; then 444 452 ( 445 453 cat << EOF … … 452 460 453 461 # Remove the TCL sources after a successful Expect build. 454 if [ ${i:4:6} = "expect"] ; then462 if [[ `_IS_ $i expect` ]] ; then 455 463 ( 456 464 cat << EOF … … 483 491 # We'll run the chroot commands differently than the others, so skip them in the 484 492 # dependencies and target creation. 485 if echo $i | grep -q "chroot"; then493 if [[ `_IS_ $i chroot` ]] ; then 486 494 continue 487 495 fi … … 523 531 524 532 # For the Re-Adjusting phase we must to cd to the binutils-build directory. 525 if [ ${i:4:11} = "readjusting"] ; then533 if [[ `_IS_ $i readjusting` ]] ; then 526 534 ( 527 535 cat << EOF … … 530 538 EOF 531 539 ) >> $MKFILE.tmp 532 fi533 540 534 541 # For Glibc we need to set TIMEZONE envar. 535 if [ ${i:4:5} = "glibc"] ; then542 elif [[ `_IS_ $i glibc` ]] ; then 536 543 ( 537 544 cat << EOF … … 540 547 EOF 541 548 ) >> $MKFILE.tmp 542 fi543 549 544 550 # For Groff we need to set PAGE envar. 545 if [ ${i:4:5} = "groff"] ; then551 elif [[ `_IS_ $i groff` ]] ; then 546 552 ( 547 553 cat << EOF … … 554 560 # In the mount of kernel filesystems we need to set LFS 555 561 # and not to use chroot. 556 if [ ${i:4:6} = "kernfs"] ; then562 if [[ `_IS_ $i kernfs` ]] ; then 557 563 ( 558 564 cat << EOF … … 572 578 EOF 573 579 ) >> $MKFILE.tmp 574 575 580 fi 576 581 … … 589 594 590 595 # Remove the Binutils pass 2 sources after a successful Re-Adjusting phase. 591 if [ ${i:4:11} = "readjusting"] ; then596 if [[ `_IS_ $i readjusting` ]] ; then 592 597 ( 593 598 cat << EOF … … 619 624 i=`basename $file` 620 625 621 # Grub must be configured manually 622 if echo $i | grep -q "grub" ; then 626 # Grub must be configured manually. 627 # The filesystems can't be unmounted via Makefile and the user 628 # should to enter to the chroot environment to create the root 629 # password, edit several files and setup Grub, 630 if [[ `_IS_ $i grub` ]] || [[ `_IS_ $i reboot` ]] ; then 623 631 continue 624 # The filesystems can't be unmounted yet due that the user must625 # to enter to the chroot environment to create the root password,626 # edit several files and setup Grub,627 elif echo $i | grep -q "reboot" ; then628 continue629 632 fi 630 633 631 634 # If no .config file is supplied, the kernel build is skipped 632 if [ -z $CONFIG ] ; then 633 if echo $i | grep -q "kernel" ; then 634 continue 635 fi 635 if [ -z $CONFIG ] && [[ `_IS_ $i kernel` ]] ; then 636 continue 636 637 fi 637 638 … … 651 652 652 653 # Find the the bootscripts and kernel package names 653 if [ ${i:4:11} = "bootscripts" -o ${i:4:6} = "kernel"] ; then654 if [ ${i:4:11} = "bootscripts"] ; then654 if [[ `_IS_ $i bootscripts` ]] || [[ `_IS_ $i kernel` ]] ; then 655 if [[ `_IS_ $i bootscripts` ]] ; then 655 656 vrs=`grep "^lfs-bootscripts-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'` 656 657 FILE="lfs-bootscripts-$vrs.tar.bz2" 657 elif [ ${i:4:6} = "kernel"] ; then658 elif [[ `_IS_ $i kernel` ]] ; then 658 659 vrs=`grep "^linux-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'` 659 660 FILE="linux-$vrs.tar.bz2" … … 670 671 671 672 # Put in place the kernel .config file 672 if [ ${i:4:6} = "kernel"] ; then673 if [[ `_IS_ $i kernel` ]] ; then 673 674 ( 674 675 cat << EOF … … 679 680 680 681 # Check if we have a real /etc/fstab file 681 if [ ${i:4:5} = "fstab" ] && [ -n "$FSTAB"] ; then682 if [[ `_IS_ $i fstab` ]] && [[ -n "$FSTAB" ]] ; then 682 683 ( 683 684 cat << EOF … … 699 700 700 701 # Remove the build directory except if the package build fails. 701 if [ ${i:4:11} = "bootscripts" -o ${i:4:6} = "kernel"] ; then702 if [[ `_IS_ $i bootscripts` ]] || [[ `_IS_ $i kernel` ]] ; then 702 703 ( 703 704 cat << EOF … … 831 832 echo "You must be logged in as root to successfully build LFS." 832 833 exit 1 833 fi834 835 # Find the download client to use, if not already specified.836 837 if [ -z $DL ] ; then838 if [ `type -p wget` ] ; then839 DL=wget840 elif [ `type -p curl` ] ; then841 DL=curl842 else843 eval "$no_dl_client"844 fi845 834 fi 846 835 … … 966 955 done 967 956 957 # Find the download client to use, if not already specified. 958 959 if [ -z $DL ] ; then 960 if [ `type -p wget` ] ; then 961 DL=wget 962 elif [ `type -p curl` ] ; then 963 DL=curl 964 else 965 eval "$no_dl_client" 966 fi 967 fi 968 968 969 [[ ! -d $JHALFSDIR ]] && mkdir -pv $JHALFSDIR 969 970 [[ "$PWD" != "$JHALFSDIR" ]] && cp -v $0 $XSL $FILES $JHALFSDIR/
Note:
See TracChangeset
for help on using the changeset viewer.