r3143 - in jhalfs/branches/experimental: . common

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Sun Oct 1 03:46:46 PDT 2006


Author: manuel
Date: 2006-10-01 04:46:45 -0600 (Sun, 01 Oct 2006)
New Revision: 3143

Modified:
   jhalfs/branches/experimental/common/common-functions
   jhalfs/branches/experimental/jhalfs
Log:
Added function to write blfs-tool dependencies targets

Modified: jhalfs/branches/experimental/common/common-functions
===================================================================
--- jhalfs/branches/experimental/common/common-functions	2006-10-01 10:45:36 UTC (rev 3142)
+++ jhalfs/branches/experimental/common/common-functions	2006-10-01 10:46:45 UTC (rev 3143)
@@ -315,6 +315,70 @@
 ) >> $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 at 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              #
 #------------------------------------------------------#

Modified: jhalfs/branches/experimental/jhalfs
===================================================================
--- jhalfs/branches/experimental/jhalfs	2006-10-01 10:45:36 UTC (rev 3142)
+++ jhalfs/branches/experimental/jhalfs	2006-10-01 10:46:45 UTC (rev 3143)
@@ -159,7 +159,8 @@
        branch-* )  BLFS_TREE=branches/${BLFS_BRANCH_ID#branch-}/BOOK ;;
               * )  BLFS_TREE=tags/${BLFS_BRANCH_ID}/BOOK ;;
   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
   LIBXML_PKG="libxml2-2.6.26.tar.gz"
   LIBXML_URL="ftp://xmlsoft.org/libxml2/${LIBXML_PKG}"




More information about the alfs-log mailing list