r2782 - jhalfs/branches/experimental/BLFS/libs

georgeb at linuxfromscratch.org georgeb at linuxfromscratch.org
Tue Jun 13 06:00:47 PDT 2006


Author: georgeb
Date: 2006-06-13 07:00:46 -0600 (Tue, 13 Jun 2006)
New Revision: 2782

Modified:
   jhalfs/branches/experimental/BLFS/libs/func_makefile
Log:
housekeeping on func_makefile

Modified: jhalfs/branches/experimental/BLFS/libs/func_makefile
===================================================================
--- jhalfs/branches/experimental/BLFS/libs/func_makefile	2006-06-13 01:39:44 UTC (rev 2781)
+++ jhalfs/branches/experimental/BLFS/libs/func_makefile	2006-06-13 13:00:46 UTC (rev 2782)
@@ -12,8 +12,8 @@
 declare BUILD_SCRIPTS=scripts
 declare TRACKING_DIR=/var/lib/jhalfs/BLFS
 declare BUILDDIR=~/TRIAL
-declare LOGDIR=$BUILDDIR/logs
 
+
 #----------------------------------#
 __wrt_target() {                   # Create target and initialize log file
 #----------------------------------#
@@ -24,6 +24,7 @@
 
 $i:  $PREV
 	@\$(call echo_message, Building)
+	@./progress_bar.sh \$@ &
 EOF
 ) >> $MKFILE.tmp
 }
@@ -31,13 +32,13 @@
 
 
 #----------------------------------#
-__write_build_cmd() {              # Some scripts must be run as root..
+__write_build_cmd() {              #
 #----------------------------------#
   local this_script=$1
   local file=$2
 (
 cat << EOF
-	@( time { export LFS=\$(MOUNT_PT) && ${BUILD_SCRIPTS}/$file >>\$(LOGDIR)/$this_script 2>&1 ; } ) 2>>\$(LOGDIR)/$this_script
+	@( time { export LFS=\$(MOUNT_PT) && ${BUILD_SCRIPTS}/${file} >>logs/${this_script} 2>&1 ; } ) 2>>logs/${this_script}
 EOF
 ) >> $MKFILE.tmp
 }
@@ -45,10 +46,11 @@
 #----------------------------------#
 __wrt_touch() {                    #
 #----------------------------------#
+  local pkg_name=$1
 (
 cat << EOF
 	@touch  \$@ && \\
-	touch /var/lib/jhalfs/BLFS/${1#*-} && \\
+	touch \$(TRACKING_DIR)/${pkg_name#*-} && \\
 	sleep .25 && \\
 	echo -e "\n\n "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
 	echo --------------------------------------------------------------------------------\$(WHITE)
@@ -60,9 +62,9 @@
 #----------------------------#
 __write_entry() {            #
 #----------------------------#
-  local pkg_name=$1
+  local script_name=$1
 
-  echo "${tab_}${tab_} entry for <$pkg_name>"
+  echo -n "${tab_}${tab_} entry for <$script_name>"
 
   #--------------------------------------------------------------------#
   #         >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<<          #
@@ -70,17 +72,17 @@
   #
   # Drop in the name of the target on a new line, and the previous target
   # as a dependency. Also call the echo_message function.
-  __wrt_target "${pkg_name}" "$PREV_PACKAGE"
-  __write_build_cmd "${pkg_name}" "${pkg_name}"
+  __wrt_target "${script_name}" "$PREV_PACKAGE"
+  __write_build_cmd "${script_name}" "${script_name}"
 
   # Include a touch of the target name so make can check
   # if it's already been made.
-  __wrt_touch "${pkg_name}"
+  __wrt_touch "${script_name}"
   #
   #--------------------------------------------------------------------#
   #              >>>>>>>> END OF Makefile ENTRY <<<<<<<<               #
   #--------------------------------------------------------------------#
-
+  echo " .. OK"
 }
 
 #----------------------------#
@@ -113,8 +115,8 @@
 
 SRC= /sources
 MOUNT_PT= $BUILDDIR
-LOGDIR= $LOGDIR
 PACKAGE= "`basename $PKGXML .xml`"
+TRACKING_DIR= $TRACKING_DIR
 
 BOLD= ""
 RED= ""
@@ -143,9 +145,9 @@
 EOF
 ) > $MKFILE
 
- 
   cat $MKFILE.tmp >> $MKFILE
-
   echo "${tab_}Creating Makefile... ${BOLD}DONE${OFF}"
 
+  rm $MKFILE.tmp
+
 }




More information about the alfs-log mailing list