r2762 - in jhalfs/trunk: LFS common

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Fri Jun 9 16:05:40 PDT 2006


Author: manuel
Date: 2006-06-09 17:05:39 -0600 (Fri, 09 Jun 2006)
New Revision: 2762

Modified:
   jhalfs/trunk/LFS/master.sh
   jhalfs/trunk/common/common-functions
   jhalfs/trunk/common/makefile-functions
   jhalfs/trunk/common/progress_bar.sh
Log:
Added " Target $@ OK" lines to the Makefile output.
Made more accurate the time meassured by progress_bar.sh.

Modified: jhalfs/trunk/LFS/master.sh
===================================================================
--- jhalfs/trunk/LFS/master.sh	2006-06-09 21:07:29 UTC (rev 2761)
+++ jhalfs/trunk/LFS/master.sh	2006-06-09 23:05:39 UTC (rev 2762)
@@ -23,7 +23,9 @@
 	@mkdir \$(MOUNT_PT)/tools && \\
 	rm -f /tools && \\
 	ln -s \$(MOUNT_PT)/tools / && \\
-	touch \$@
+	touch \$@ && \\
+	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK\$(WHITE) && \\
+	echo --------------------------------------------------------------------------------
 
 021-addinguser:  020-creatingtoolsdir
 	@\$(call echo_message, Building)
@@ -35,7 +37,9 @@
 	fi;
 	@chown lfs \$(MOUNT_PT)/tools && \\
 	chmod a+wt \$(MOUNT_PT)/sources && \\
-	touch \$@
+	touch \$@ && \\
+	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK\$(WHITE) && \\
+	echo --------------------------------------------------------------------------------
 
 022-settingenvironment:  021-addinguser
 	@\$(call echo_message, Building)
@@ -54,7 +58,9 @@
 	echo "source $JHALFSDIR/envars" >> /home/lfs/.bashrc && \\
 	chown lfs:lfs /home/lfs/.bashrc && \\
 	touch envars && \\
-	touch \$@
+	touch \$@ && \\
+	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK\$(WHITE) && \\
+	echo --------------------------------------------------------------------------------
 EOF
 ) >> $MKFILE.tmp
 }
@@ -134,7 +140,7 @@
 
     # Include a touch of the target name so make can check
     # if it's already been made.
-    echo -e '\t at touch $@' >> $MKFILE.tmp
+    wrt_touch
     #
     #--------------------------------------------------------------------#
     #              >>>>>>>> END OF Makefile ENTRY <<<<<<<<               #
@@ -246,7 +252,7 @@
 
     # Include a touch of the target name so make can check
     # if it's already been made.
-    echo -e '\t at touch $@' >> $MKFILE.tmp
+    wrt_touch
     #
     #--------------------------------------------------------------------#
     #              >>>>>>>> END OF Makefile ENTRY <<<<<<<<               #
@@ -328,7 +334,7 @@
 
     # Include a touch of the target name so make can check
     # if it's already been made.
-    echo -e '\t at touch $@' >> $MKFILE.tmp
+    wrt_touch
     #
     #--------------------------------------------------------------------#
     #              >>>>>>>> END OF Makefile ENTRY <<<<<<<<               #
@@ -446,7 +452,9 @@
 		mv /home/lfs/.bash_profile.XXX /home/lfs/.bash_profile; \\
 	fi;
 	@chown lfs:lfs /home/lfs/.bash* && \\
-	touch \$@
+	touch \$@ && \\
+	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK\$(WHITE) && \\
+	echo --------------------------------------------------------------------------------
 
 do_housekeeping:
 	-umount \$(MOUNT_PT)/sys

Modified: jhalfs/trunk/common/common-functions
===================================================================
--- jhalfs/trunk/common/common-functions	2006-06-09 21:07:29 UTC (rev 2761)
+++ jhalfs/trunk/common/common-functions	2006-06-09 23:05:39 UTC (rev 2762)
@@ -465,6 +465,20 @@
 
 
 #----------------------------------#
+wrt_touch() {                      #
+#----------------------------------#
+(
+cat << EOF
+	@touch  \$@ && \\
+	sleep .25 && \\
+	echo -e "\n "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK\$(WHITE) && \\
+	echo --------------------------------------------------------------------------------
+EOF
+) >> $MKFILE.tmp
+}
+
+
+#----------------------------------#
 wrt_report() {                     #
 #----------------------------------#
 (

Modified: jhalfs/trunk/common/makefile-functions
===================================================================
--- jhalfs/trunk/common/makefile-functions	2006-06-09 21:07:29 UTC (rev 2761)
+++ jhalfs/trunk/common/makefile-functions	2006-06-09 23:05:39 UTC (rev 2762)
@@ -7,13 +7,12 @@
 ORANGE= ""
 BLUE= ""
 WHITE= ""
-CURSOR_ON= "[?25h"
 
 define echo_message
   @echo $(BOLD)
   @echo --------------------------------------------------------------------------------
   @echo $(BOLD)$(1) target $(BLUE)$@$(BOLD)
-  @echo --------------------------------------------------------------------------------$(WHITE)
+  @echo $(WHITE)
 endef
 
 define unpack
@@ -73,7 +72,7 @@
   @echo that you already know and there is no need to discuss it here.
   @echo $(BOLD)
   @echo --------------------------------------------------------------------------------
-  @echo -e \\t\\t$(GREEN)Have a nice day $(ORANGE):-\)$(BOLD)$(CURSOR_ON)
+  @echo -e \\t\\t$(GREEN)Have a nice day $(ORANGE):-\)$(BOLD)
   @echo --------------------------------------------------------------------------------$(WHITE)
 endef
 
@@ -98,6 +97,6 @@
   @echo -e \\t $(BOLD)make makesys
   @echo  The build process should resume. Follow any instructions that appear.
   @echo --------------------------------------------------------------------------------
-  @echo -e \\t\\t$(GREEN)Have a nice day $(ORANGE):-\)$(BOLD)$(CURSOR_ON)
+  @echo -e \\t\\t$(GREEN)Have a nice day $(ORANGE):-\)$(BOLD)
   @echo --------------------------------------------------------------------------------$(WHITE)
 endef

Modified: jhalfs/trunk/common/progress_bar.sh
===================================================================
--- jhalfs/trunk/common/progress_bar.sh	2006-06-09 21:07:29 UTC (rev 2761)
+++ jhalfs/trunk/common/progress_bar.sh	2006-06-09 23:05:39 UTC (rev 2762)
@@ -27,10 +27,8 @@
   if ! fuser -v . 2>&1 | grep make >/dev/null ; then
      echo -n "${CURSOR_ON}" && exit
   fi
-    # Target build complete, leave. If we are here, make is alive and a new
-    # package target may has been started. Close this instance of the script.
-    # The cursor will be restored by echo-finished in makefile-functions.
-  [[ -f ${TARGET} ]] && exit
+    # Target build complete, leave.
+  [[ -f ${TARGET} ]] && echo -n "${CURSOR_ON}" && exit
     # It is safe to write to the screen
   echo -n "$1"
 }
@@ -42,7 +40,8 @@
   for ((SEC=1, POS=3; SEC <= 60; SEC++, POS++)); do
     for GRAPHIC_CHAR in ${GRAPHIC_STR} ; do
       write_or_exit "${CSI}${POS}G${GRAPHIC_CHAR}"
-      sleep .2
+      # Compensate code execution time (need verification on other machines)
+      sleep .137
     done
       # Display the accumulated time.
     write_or_exit "${TS_POSITION}${MIN} min. ${SEC} sec. "




More information about the alfs-log mailing list