[9c9775f] | 1 | #!/bin/bash
|
---|
| 2 |
|
---|
| 3 | # $Id$
|
---|
| 4 |
|
---|
| 5 |
|
---|
[55d2c3e] | 6 | #----------------------------------#
|
---|
| 7 | blfs_tool_clean_scripts() { # Remove unselected dependencies scripts
|
---|
| 8 | #----------------------------------#
|
---|
[9c9775f] | 9 |
|
---|
[55d2c3e] | 10 | for file in ${PROGNAME}-commands/blfs-tool-deps/* ; do
|
---|
| 11 | # Keep the script file name
|
---|
| 12 | this_script=`basename $file`
|
---|
[9c9775f] | 13 |
|
---|
[55d2c3e] | 14 | case "${this_script}" in
|
---|
| 15 | *libxml2 ) [[ "${DEP_LIBXML}" = "n" ]] && rm ${file} ;;
|
---|
| 16 | *libxslt ) [[ "${DEP_LIBXSLT}" = "n" ]] && rm ${file} ;;
|
---|
| 17 | *tidy ) [[ "${DEP_TIDY}" = "n" ]] && rm ${file} ;;
|
---|
| 18 | *unzip ) [[ "${DEP_UNZIP}" = "n" ]] && rm ${file} ;;
|
---|
| 19 | *docbook-xml ) [[ "${DEP_DBXML}" = "n" ]] && rm ${file} ;;
|
---|
| 20 | *docbook-xsl ) [[ "${DEP_DBXSL}" = "n" ]] && rm ${file} ;;
|
---|
| 21 | *gpm ) [[ "${DEP_GPM}" = "n" ]] && rm ${file} ;;
|
---|
| 22 | *lynx ) [[ "${DEP_LYNX}" = "n" ]] && rm ${file} ;;
|
---|
| 23 | *sudo ) [[ "${DEP_SUDO}" = "n" ]] && rm ${file} ;;
|
---|
| 24 | *wget ) [[ "${DEP_WGET}" = "n" ]] && rm ${file} ;;
|
---|
| 25 | *subversion ) [[ "${DEP_SVN}" = "n" ]] && rm ${file} ;;
|
---|
| 26 | esac
|
---|
| 27 | done
|
---|
[9c9775f] | 28 | }
|
---|
| 29 |
|
---|
| 30 |
|
---|
| 31 | #----------------------------------#
|
---|
| 32 | wrt_blfs_tool_targets() { #
|
---|
| 33 | #----------------------------------#
|
---|
| 34 | PREV=""
|
---|
| 35 |
|
---|
| 36 | echo "${tab_}${GREEN}Processing... ${L_arrow}BLFS_TOOL ${R_arrow}"
|
---|
| 37 |
|
---|
| 38 | for file in blfs-tool-deps/* ; do
|
---|
| 39 | # Keep the script file name
|
---|
| 40 | this_script=`basename $file`
|
---|
| 41 |
|
---|
[55d2c3e] | 42 | # Grab the phase name to be used with INSTALL_LOG and tracking dir touch
|
---|
| 43 | name=`grep "^PKG_PHASE=" ${file} | sed -e 's@PKG_PHASE=@@'`
|
---|
| 44 | # Grab also the package version
|
---|
| 45 | pkg_ver=`grep "^VERSION=" ${file} | sed -e 's@VERSION=@@'`
|
---|
[9c9775f] | 46 |
|
---|
| 47 | # Append each name of the script files to a list (this will become
|
---|
| 48 | # the names of the targets in the Makefile)
|
---|
| 49 | blfs_tool="$blfs_tool ${this_script}"
|
---|
| 50 |
|
---|
| 51 | #--------------------------------------------------------------------#
|
---|
| 52 | # >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< #
|
---|
| 53 | #--------------------------------------------------------------------#
|
---|
| 54 | #
|
---|
| 55 | # Drop in the name of the target on a new line, and the previous target
|
---|
| 56 | # as a dependency. Also call the echo_message function.
|
---|
[55d2c3e] | 57 | wrt_target "${this_script}" "$PREV"
|
---|
[9c9775f] | 58 |
|
---|
[55d2c3e] | 59 | # Touch timestamp file if installed files logs will be created.
|
---|
| 60 | if [ "$name" != "" ] && [ "${INSTALL_LOG}" = "y" ] ; then
|
---|
| 61 | wrt_TouchTimestamp
|
---|
[9c9775f] | 62 | fi
|
---|
| 63 |
|
---|
| 64 | # Run the script.
|
---|
[55d2c3e] | 65 | wrt_RunScript "$file"
|
---|
[9c9775f] | 66 |
|
---|
[55d2c3e] | 67 | # Write installed files log
|
---|
| 68 | if [ "$name" != "" ] && [ "${INSTALL_LOG}" = "y" ] ; then
|
---|
| 69 | wrt_LogNewFiles "$name"
|
---|
[9c9775f] | 70 | fi
|
---|
| 71 |
|
---|
| 72 | # Touch the tracking file.
|
---|
| 73 | if [ "$PROGNAME" = "clfs2" ]; then
|
---|
[55d2c3e] | 74 | echo -e "\t@touch \$(MOUNT_PT)$TRACKING_DIR/${name}-${pkg_ver}" >> $MKFILE.tmp
|
---|
[9c9775f] | 75 | else
|
---|
[55d2c3e] | 76 | echo -e "\t@touch $TRACKING_DIR/${name}-${pkg_ver}" >> $MKFILE.tmp
|
---|
[9c9775f] | 77 | fi
|
---|
| 78 |
|
---|
| 79 | # Include a touch of the target name so make can check
|
---|
| 80 | # if it's already been made.
|
---|
| 81 | wrt_touch
|
---|
| 82 | #
|
---|
| 83 | #--------------------------------------------------------------------#
|
---|
| 84 | # >>>>>>>> END OF Makefile ENTRY <<<<<<<< #
|
---|
| 85 | #--------------------------------------------------------------------#
|
---|
| 86 |
|
---|
| 87 | # Keep the script file name for Makefile dependencies.
|
---|
| 88 | PREV=${this_script}
|
---|
| 89 | done
|
---|
| 90 | }
|
---|