Added function to write blfs-tool dependencies targets

This commit is contained in:
Manuel Canales Esparcia 2006-10-01 10:46:45 +00:00
parent d6a3bad3eb
commit 4fb2c33999
2 changed files with 66 additions and 1 deletions

View file

@ -315,6 +315,70 @@ EOF
) >> $MKFILE.tmp ) >> $MKFILE.tmp
} }
#----------------------------------#
wrt_blfs_tool_targets() { #
#----------------------------------#
echo "${tab_}${GREEN}Processing... ${L_arrow}BLFS_TOOL ${R_arrow}"
for file in blfs-tool-deps/* ; do
# Keep the script file name
this_script=`basename $file`
# Grab the name of the target
name=`echo ${this_script} | sed -e 's@[0-9]\{3\}-@@'`
# Find the package.
case $name in
tidy ) pkg_tarball=${TIDY_PKG} ;;
unzip ) pkg_tarball=${UNZIP_PKG} ;;
* ) pkg_tarball=$(get_package_tarball_name $name) ;;
esac
# Append each name of the script files to a list (this will become
# the names of the targets in the Makefile)
blfs_tool="$blfs_tool ${this_script}"
#--------------------------------------------------------------------#
# >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< #
#--------------------------------------------------------------------#
#
# Drop in the name of the target on a new line, and the previous target
# as a dependency. Also call the echo_message function.
CHROOT_wrt_target "${this_script}" "$PREV"
# Insert instructions for unpacking the package and changing directories
# DocBook-XML is a zip, the build script will handle that.
[[ ! "$name" = "docbook-xml" ]] && CHROOT_Unpack "$pkg_tarball"
# Run the script.
CHROOT_wrt_RunAsRoot "$file"
# Remove the build directory(ies) except if the package build fails.
[[ ! "$name" = "docbook-xml" ]] && CHROOT_wrt_RemoveBuildDirs "$name"
# Touch the tracking file.
case $name in
tidy ) pkg_ver=tidy-051026 ;;
unzip ) pkg_ver=unzip-5.52 ;;
* ) pkg_ver=$(echo $pkg_tarball | sed -e 's/.tar.*//;s/.tgz//;s/.zip//') ;;
esac
echo -e "\t@touch $TRACKING_DIR/$pkg_ver" >> $MKFILE.tmp
# Include a touch of the target name so make can check
# if it's already been made.
wrt_touch
#
#--------------------------------------------------------------------#
# >>>>>>>> END OF Makefile ENTRY <<<<<<<< #
#--------------------------------------------------------------------#
# Keep the script file name for Makefile dependencies.
PREV=${this_script}
done
}
#------------------------------------------------------# #------------------------------------------------------#
# END Makefile scripting functions # # END Makefile scripting functions #
#------------------------------------------------------# #------------------------------------------------------#

3
jhalfs
View file

@ -159,7 +159,8 @@ if [[ "${BLFS_TOOL}" = "y" ]] ; then
branch-* ) BLFS_TREE=branches/${BLFS_BRANCH_ID#branch-}/BOOK ;; branch-* ) BLFS_TREE=branches/${BLFS_BRANCH_ID#branch-}/BOOK ;;
* ) BLFS_TREE=tags/${BLFS_BRANCH_ID}/BOOK ;; * ) BLFS_TREE=tags/${BLFS_BRANCH_ID}/BOOK ;;
esac esac
# dependencies envars, to can update it more easy. # Dependencies envars, to can update it more easy.
# Tidy and Unzip version are harcoded also in wrt_blfs_tool_targets()
# libxml2 # libxml2
LIBXML_PKG="libxml2-2.6.26.tar.gz" LIBXML_PKG="libxml2-2.6.26.tar.gz"
LIBXML_URL="ftp://xmlsoft.org/libxml2/${LIBXML_PKG}" LIBXML_URL="ftp://xmlsoft.org/libxml2/${LIBXML_PKG}"