Ignore:
Timestamp:
10/01/2006 10:46:45 AM (18 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
experimental
Children:
fd7455c
Parents:
d6a3bad
Message:

Added function to write blfs-tool dependencies targets

File:
1 edited

Legend:

Unmodified
Added
Removed
  • common/common-functions

    rd6a3bad r4fb2c33  
    314314EOF
    315315) >> $MKFILE.tmp
     316}
     317
     318
     319#----------------------------------#
     320wrt_blfs_tool_targets() {          #
     321#----------------------------------#
     322
     323  echo "${tab_}${GREEN}Processing... ${L_arrow}BLFS_TOOL ${R_arrow}"
     324
     325  for file in blfs-tool-deps/* ; do
     326    # Keep the script file name
     327    this_script=`basename $file`
     328
     329    # Grab the name of the target
     330    name=`echo ${this_script} | sed -e 's@[0-9]\{3\}-@@'`
     331
     332    # Find the package.
     333    case $name in
     334      tidy )  pkg_tarball=${TIDY_PKG} ;;
     335      unzip ) pkg_tarball=${UNZIP_PKG} ;;
     336      * )     pkg_tarball=$(get_package_tarball_name $name) ;;
     337    esac
     338
     339    # Append each name of the script files to a list (this will become
     340    # the names of the targets in the Makefile)
     341    blfs_tool="$blfs_tool ${this_script}"
     342
     343    #--------------------------------------------------------------------#
     344    #         >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<<          #
     345    #--------------------------------------------------------------------#
     346    #
     347    # Drop in the name of the target on a new line, and the previous target
     348    # as a dependency. Also call the echo_message function.
     349    CHROOT_wrt_target "${this_script}" "$PREV"
     350
     351    # Insert instructions for unpacking the package and changing directories
     352    # DocBook-XML is a zip, the build script will handle that.
     353    [[ ! "$name" = "docbook-xml" ]] && CHROOT_Unpack "$pkg_tarball"
     354
     355    # Run the script.
     356    CHROOT_wrt_RunAsRoot "$file"
     357
     358    # Remove the build directory(ies) except if the package build fails.
     359    [[ ! "$name" = "docbook-xml" ]] && CHROOT_wrt_RemoveBuildDirs "$name"
     360
     361    # Touch the tracking file.
     362    case $name in
     363      tidy )  pkg_ver=tidy-051026 ;;
     364      unzip ) pkg_ver=unzip-5.52 ;;
     365      * )     pkg_ver=$(echo $pkg_tarball | sed -e 's/.tar.*//;s/.tgz//;s/.zip//') ;;
     366    esac
     367    echo -e "\t@touch $TRACKING_DIR/$pkg_ver" >>  $MKFILE.tmp
     368
     369    # Include a touch of the target name so make can check
     370    # if it's already been made.
     371    wrt_touch
     372    #
     373    #--------------------------------------------------------------------#
     374    #              >>>>>>>> END OF Makefile ENTRY <<<<<<<<               #
     375    #--------------------------------------------------------------------#
     376
     377    # Keep the script file name for Makefile dependencies.
     378    PREV=${this_script}
     379  done
    316380}
    317381
Note: See TracChangeset for help on using the changeset viewer.