2007-09-19 18:50:48 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# $Id$
|
|
|
|
|
|
|
|
|
2007-09-29 17:53:56 +02:00
|
|
|
#----------------------------------#
|
|
|
|
blfs_tool_clean_scripts() { # Remove unselected dependencies scripts
|
|
|
|
#----------------------------------#
|
2007-09-19 18:50:48 +02:00
|
|
|
|
2007-09-29 17:53:56 +02:00
|
|
|
for file in ${PROGNAME}-commands/blfs-tool-deps/* ; do
|
|
|
|
# Keep the script file name
|
|
|
|
this_script=`basename $file`
|
2007-09-19 18:50:48 +02:00
|
|
|
|
2007-09-29 17:53:56 +02:00
|
|
|
case "${this_script}" in
|
|
|
|
*libxml2 ) [[ "${DEP_LIBXML}" = "n" ]] && rm ${file} ;;
|
|
|
|
*libxslt ) [[ "${DEP_LIBXSLT}" = "n" ]] && rm ${file} ;;
|
|
|
|
*tidy ) [[ "${DEP_TIDY}" = "n" ]] && rm ${file} ;;
|
|
|
|
*unzip ) [[ "${DEP_UNZIP}" = "n" ]] && rm ${file} ;;
|
|
|
|
*docbook-xml ) [[ "${DEP_DBXML}" = "n" ]] && rm ${file} ;;
|
|
|
|
*docbook-xsl ) [[ "${DEP_DBXSL}" = "n" ]] && rm ${file} ;;
|
|
|
|
*gpm ) [[ "${DEP_GPM}" = "n" ]] && rm ${file} ;;
|
|
|
|
*lynx ) [[ "${DEP_LYNX}" = "n" ]] && rm ${file} ;;
|
|
|
|
*sudo ) [[ "${DEP_SUDO}" = "n" ]] && rm ${file} ;;
|
|
|
|
*wget ) [[ "${DEP_WGET}" = "n" ]] && rm ${file} ;;
|
|
|
|
*subversion ) [[ "${DEP_SVN}" = "n" ]] && rm ${file} ;;
|
|
|
|
esac
|
|
|
|
done
|
2007-09-19 18:50:48 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#----------------------------------#
|
|
|
|
wrt_blfs_tool_targets() { #
|
|
|
|
#----------------------------------#
|
|
|
|
PREV=""
|
|
|
|
|
|
|
|
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`
|
|
|
|
|
2007-09-29 17:53:56 +02:00
|
|
|
# Grab the phase name to be used with INSTALL_LOG and tracking dir touch
|
|
|
|
name=`grep "^PKG_PHASE=" ${file} | sed -e 's@PKG_PHASE=@@'`
|
|
|
|
# Grab also the package version
|
|
|
|
pkg_ver=`grep "^VERSION=" ${file} | sed -e 's@VERSION=@@'`
|
2007-09-19 18:50:48 +02:00
|
|
|
|
|
|
|
# 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.
|
2007-09-29 17:53:56 +02:00
|
|
|
wrt_target "${this_script}" "$PREV"
|
2007-09-19 18:50:48 +02:00
|
|
|
|
2007-09-29 17:53:56 +02:00
|
|
|
# Touch timestamp file if installed files logs will be created.
|
|
|
|
if [ "$name" != "" ] && [ "${INSTALL_LOG}" = "y" ] ; then
|
|
|
|
wrt_TouchTimestamp
|
2007-09-19 18:50:48 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Run the script.
|
2007-09-29 17:53:56 +02:00
|
|
|
wrt_RunScript "$file"
|
2007-09-19 18:50:48 +02:00
|
|
|
|
2007-09-29 17:53:56 +02:00
|
|
|
# Write installed files log
|
|
|
|
if [ "$name" != "" ] && [ "${INSTALL_LOG}" = "y" ] ; then
|
|
|
|
wrt_LogNewFiles "$name"
|
2007-09-19 18:50:48 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Touch the tracking file.
|
|
|
|
if [ "$PROGNAME" = "clfs2" ]; then
|
2007-09-29 17:53:56 +02:00
|
|
|
echo -e "\t@touch \$(MOUNT_PT)$TRACKING_DIR/${name}-${pkg_ver}" >> $MKFILE.tmp
|
2007-09-19 18:50:48 +02:00
|
|
|
else
|
2007-09-29 17:53:56 +02:00
|
|
|
echo -e "\t@touch $TRACKING_DIR/${name}-${pkg_ver}" >> $MKFILE.tmp
|
2007-09-19 18:50:48 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
# 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
|
|
|
|
}
|