Added " Target $@ OK" lines to the Makefile output.
Made more accurate the time meassured by progress_bar.sh.
This commit is contained in:
parent
aed6c72400
commit
e2ef1000ec
4 changed files with 36 additions and 16 deletions
|
@ -23,7 +23,9 @@ chapter4_Makefiles() {
|
|||
@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 @@ chapter4_Makefiles() {
|
|||
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 @@ chapter4_Makefiles() {
|
|||
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 @@ chapter5_Makefiles() {
|
|||
|
||||
# Include a touch of the target name so make can check
|
||||
# if it's already been made.
|
||||
echo -e '\t@touch $@' >> $MKFILE.tmp
|
||||
wrt_touch
|
||||
#
|
||||
#--------------------------------------------------------------------#
|
||||
# >>>>>>>> END OF Makefile ENTRY <<<<<<<< #
|
||||
|
@ -246,7 +252,7 @@ chapter6_Makefiles() {
|
|||
|
||||
# Include a touch of the target name so make can check
|
||||
# if it's already been made.
|
||||
echo -e '\t@touch $@' >> $MKFILE.tmp
|
||||
wrt_touch
|
||||
#
|
||||
#--------------------------------------------------------------------#
|
||||
# >>>>>>>> END OF Makefile ENTRY <<<<<<<< #
|
||||
|
@ -328,7 +334,7 @@ chapter789_Makefiles() {
|
|||
|
||||
# Include a touch of the target name so make can check
|
||||
# if it's already been made.
|
||||
echo -e '\t@touch $@' >> $MKFILE.tmp
|
||||
wrt_touch
|
||||
#
|
||||
#--------------------------------------------------------------------#
|
||||
# >>>>>>>> END OF Makefile ENTRY <<<<<<<< #
|
||||
|
@ -446,7 +452,9 @@ restore-lfs-env:
|
|||
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
|
||||
|
|
|
@ -464,6 +464,20 @@ EOF
|
|||
}
|
||||
|
||||
|
||||
#----------------------------------#
|
||||
wrt_touch() { #
|
||||
#----------------------------------#
|
||||
(
|
||||
cat << EOF
|
||||
@touch \$@ && \\
|
||||
sleep .25 && \\
|
||||
echo -e "\n "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK\$(WHITE) && \\
|
||||
echo --------------------------------------------------------------------------------
|
||||
EOF
|
||||
) >> $MKFILE.tmp
|
||||
}
|
||||
|
||||
|
||||
#----------------------------------#
|
||||
wrt_report() { #
|
||||
#----------------------------------#
|
||||
|
|
|
@ -7,13 +7,12 @@ GREEN= "[0;32m"
|
|||
ORANGE= "[0;33m"
|
||||
BLUE= "[1;34m"
|
||||
WHITE= "[00m"
|
||||
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 @@ define echo_finished
|
|||
@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 @@ define echo_boot_finished
|
|||
@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
|
||||
|
|
|
@ -27,10 +27,8 @@ write_or_exit() {
|
|||
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 ((MIN=0; MIN >= 0; MIN++)); do
|
|||
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. "
|
||||
|
|
Reference in a new issue