summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2019-02-18 09:07:39 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2019-02-19 07:33:03 +0100
commit714827b6023e7dd248bcdbce4b47b02cc5aa5f35 (patch)
tree9459caa010731181e32d36b4e7f410086b5ac5ca
parentb1854484a0f2b701b198d55887bd30efc375cc11 (diff)
downloadptxdist-714827b6023e7dd248bcdbce4b47b02cc5aa5f35.tar.gz
ptxdist-714827b6023e7dd248bcdbce4b47b02cc5aa5f35.tar.xz
progress: count image stages
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--rules/post/function-finish.make6
-rw-r--r--rules/post/function-touch.make10
-rw-r--r--scripts/lib/ptxd_make_progress.sh6
3 files changed, 9 insertions, 13 deletions
diff --git a/rules/post/function-finish.make b/rules/post/function-finish.make
index 22018a98d..a2ad32bca 100644
--- a/rules/post/function-finish.make
+++ b/rules/post/function-finish.make
@@ -9,9 +9,7 @@
#
finish = \
- target="$(strip $(@))"; \
- target="$${target\#\#*/}"; \
- $(_touch_opt_output) \
- echo "finished target $${target}"
+ $(call _touch_opt_output,$(@)) \
+ echo "finished target $(notdir $(@))"
# vim: syntax=make
diff --git a/rules/post/function-touch.make b/rules/post/function-touch.make
index 730d41b57..ff0b26003 100644
--- a/rules/post/function-touch.make
+++ b/rules/post/function-touch.make
@@ -14,15 +14,13 @@
#
ifdef PTXDIST_QUIET
ifdef PTXDIST_FD_STDOUT
-_touch_opt_output := echo "$$(ptxd_make_print_progress stop $${target})finished: $(PTX_COLOR_GREEN)$${target}$(PTX_COLOR_OFF)" >&$(PTXDIST_FD_STDOUT);
+_touch_opt_output = echo "$$(ptxd_make_print_progress stop $(1))finished: $(PTX_COLOR_GREEN)$(notdir $(1))$(PTX_COLOR_OFF)" >&$(PTXDIST_FD_STDOUT);
endif
endif
touch = \
- target="$(strip $(@))"; \
- touch "$${target}"; \
- target="$${target\#\#*/}"; \
- $(_touch_opt_output) \
- echo "finished target $${target}"
+ touch "$(@)"; \
+ $(call _touch_opt_output,$(@)) \
+ echo "finished target $(notdir $(@))"
# vim: syntax=make
diff --git a/scripts/lib/ptxd_make_progress.sh b/scripts/lib/ptxd_make_progress.sh
index 917548cac..f66e9261f 100644
--- a/scripts/lib/ptxd_make_progress.sh
+++ b/scripts/lib/ptxd_make_progress.sh
@@ -12,8 +12,8 @@ ptxd_make_setup_progress() {
if [ -n "${PTXDIST_PROGRESS}" -a -n "${PTXDIST_QUIET}" ]; then
ptxd_make_target_count=$( \
MAKE=false "${PTXCONF_SETUP_HOST_MAKE}" --dry-run \
- -f "${RULESDIR}/other/Toplevel.make" "${@}" | \
- grep -E '^target=.*\.(get|extract|prepare|compile|install|targetinstall|report).* touch' | \
+ -f "${RULESDIR}/other/Toplevel.make" "${@}" | tee a | \
+ grep -E '^target=.*(\.(get|extract|prepare|compile|install|targetinstall|report)|/images/).*finished:' | \
wc -l ; exit ${PIPESTATUS[0]})
if [ $? -ne 0 ]; then
echo "Failed to initialize progress data!" >&2
@@ -30,7 +30,7 @@ ptxd_make_setup_progress() {
ptxd_make_print_progress() {
if [ -n "${ptxd_make_target_count}" ]; then
local start stop len
- if [[ "${2}" =~ .*\.(get|extract|prepare|compile|install|targetinstall|report).* ]]; then
+ if [[ "${2}" =~ .*(\.(get|extract|prepare|compile|install|targetinstall|report)|/images/).* ]]; then
local ptr="ptxd_make_target_count_${1}"
echo -n + >&${!ptr}
if [ "${2}" = "world.targetinstall" ]; then