[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master f8d4676 11/16: Improve and compress output tr
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master f8d4676 11/16: Improve and compress output trace |
Date: |
Sat, 18 May 2019 20:53:37 -0400 (EDT) |
branch: master
commit f8d4676cc8df6846195febe9121062e3e61837a1
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Improve and compress output trace
Made the 'source_env_vars' recipe a single statement so that sourced
values are displayed. Consolidated other display statements for brevity.
For production use, of course, such statements are to be removed.
---
gwc/child.make | 4 +---
gwc/parent.make | 15 +++++----------
gwc/set.sh | 7 ++-----
3 files changed, 8 insertions(+), 18 deletions(-)
diff --git a/gwc/child.make b/gwc/child.make
index 431a1fb..81fe44e 100644
--- a/gwc/child.make
+++ b/gwc/child.make
@@ -1,5 +1,3 @@
.PHONY: all
all:
- @echo "LMI_IN in 'child.make': $$LMI_IN"
- @echo "LMI_OUT1 in 'child.make': $$LMI_OUT1"
- @echo "LMI_OUT2 in 'child.make': $$LMI_OUT2"
+ @echo "targets in 'child.make': LMI_IN $$LMI_IN; LMI_OUT1 $$LMI_OUT1;
LMI_OUT2 $$LMI_OUT2"
diff --git a/gwc/parent.make b/gwc/parent.make
index 13c03cc..4ac8d4d 100644
--- a/gwc/parent.make
+++ b/gwc/parent.make
@@ -16,23 +16,18 @@ export LMI_ENV_FILE := env_$(shell date -u +'%s_%N').eraseme
parent.make:: source_env_vars ;
$(eval include $(LMI_ENV_FILE))
- @echo "eval: LMI_IN in 'parent.make': $$LMI_IN"
- @echo "eval: LMI_OUT1 in 'parent.make': $$LMI_OUT1"
- @echo "eval: LMI_OUT2 in 'parent.make': $$LMI_OUT2"
+ @echo "eval in 'parent.make': LMI_IN $$LMI_IN; LMI_OUT1 $$LMI_OUT1;
LMI_OUT2 $$LMI_OUT2"
# '--force': the file won't be there when this makefile is remade
rm --force $(LMI_ENV_FILE)
.PHONY: source_env_vars
source_env_vars:
- @echo "Sourcing 'set.sh'"
- . ./set.sh
- @echo "target: LMI_IN in 'parent.make': $$LMI_IN"
- @echo "target: LMI_OUT1 in 'parent.make': $$LMI_OUT1 ...but wait..."
- @echo "target: LMI_OUT2 in 'parent.make': $$LMI_OUT2 ...but wait..."
+ @echo "Sourcing 'set.sh'"; \
+ . ./set.sh ; \
+ echo "sourced in 'parent.make': LMI_IN $$LMI_IN; LMI_OUT1 $$LMI_OUT1;
LMI_OUT2 $$LMI_OUT2"
all:
- @echo "LMI_OUT1 for targets in 'parent.make': $$LMI_OUT1"
- @echo "LMI_OUT2 for targets in 'parent.make': $$LMI_OUT2"
+ @echo "targets in 'parent.make': LMI_IN $$LMI_IN; LMI_OUT1 $$LMI_OUT1;
LMI_OUT2 $$LMI_OUT2"
$(MAKE) --no-print-directory -f child.make
# Obviously one could simply write a cover script to replace direct
diff --git a/gwc/set.sh b/gwc/set.sh
index 73e2f1d..9229288 100755
--- a/gwc/set.sh
+++ b/gwc/set.sh
@@ -5,9 +5,7 @@ foo()
# $LMI_ENV_FILE is defined by the makefile that sources this script.
# shellcheck disable=SC2154
echo "LMI_ENV_FILE in 'set.sh': $LMI_ENV_FILE"
-echo "LMI_IN in 'set.sh': $LMI_IN"
-echo "LMI_OUT1 entering 'set.sh': $LMI_OUT1"
-echo "LMI_OUT2 entering 'set.sh': $LMI_OUT2"
+echo "entering 'set.sh': LMI_IN $LMI_IN; LMI_OUT1 $LMI_OUT1; LMI_OUT2
$LMI_OUT2"
export LMI_OUT1="$LMI_IN"
export LMI_OUT2="$LANG"
@@ -17,8 +15,7 @@ case "$LMI_IN" in
(*) ;;
esac
-echo "LMI_OUT1 leaving 'set.sh': $LMI_OUT1"
-echo "LMI_OUT2 leaving 'set.sh': $LMI_OUT2"
+echo "leaving 'set.sh': LMI_IN $LMI_IN; LMI_OUT1 $LMI_OUT1; LMI_OUT2 $LMI_OUT2"
if [ -n "$LMI_ENV_FILE" ]; then
{
echo "export LMI_OUT1 := $LMI_OUT1"
- [lmi-commits] [lmi] master updated (e0988be -> 3ff6c00), Greg Chicares, 2019/05/18
- [lmi-commits] [lmi] master 20f6dd2 15/16: Add git instructions to copy a branch into a master subdirectory, Greg Chicares, 2019/05/18
- [lmi-commits] [lmi] master 8b0a768 14/16: Invoke 'rm' without '--force', Greg Chicares, 2019/05/18
- [lmi-commits] [lmi] master 3ff6c00 16/16: Rewrite for clarity, Greg Chicares, 2019/05/18
- [lmi-commits] [lmi] master fa96c05 13/16: Make tracing information easier to follow, Greg Chicares, 2019/05/18
- [lmi-commits] [lmi] master f8d4676 11/16: Improve and compress output trace,
Greg Chicares <=
- [lmi-commits] [lmi] master b00ad83 10/16: Remove duplicated target name; improve documentation, Greg Chicares, 2019/05/18
- [lmi-commits] [lmi] master 0ca7d61 09/16: Don't write env file if its name is empty or unset, Greg Chicares, 2019/05/18
- [lmi-commits] [lmi] master 294f232 12/16: Improve documentation, Greg Chicares, 2019/05/18
- [lmi-commits] [lmi] master c10b229 08/16: Actually perform some work in the script, Greg Chicares, 2019/05/18
- [lmi-commits] [lmi] master a87426e 07/16: Name temporary environment-variables file OAOO, Greg Chicares, 2019/05/18
- [lmi-commits] [lmi] master 01aee1e 04/16: Construct a unique temporary filename to avoid collisions, Greg Chicares, 2019/05/18
- [lmi-commits] [lmi] master 315d415 03/16: Improve encapsulation, Greg Chicares, 2019/05/18
- [lmi-commits] [lmi] master b4dd6ce 06/16: Resolve an open issue, Greg Chicares, 2019/05/18
- [lmi-commits] [lmi] master 65cbb2f 05/16: Remove obsolete commentary, Greg Chicares, 2019/05/18
- [lmi-commits] [lmi] master 6eace72 01/16: Source a shell script in a makefile, Greg Chicares, 2019/05/18