lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] odd/source_script_in_makefile 20d830d 4/8: Name temp


From: Greg Chicares
Subject: [lmi-commits] [lmi] odd/source_script_in_makefile 20d830d 4/8: Name temporary environment-variables file OAOO
Date: Fri, 17 May 2019 21:31:38 -0400 (EDT)

branch: odd/source_script_in_makefile
commit 20d830d9f9d0388121ce32b11458aa07717637c2
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Name temporary environment-variables file OAOO
---
 parent.make | 6 +++---
 set.sh      | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/parent.make b/parent.make
index 4059652..b9756ba 100644
--- a/parent.make
+++ b/parent.make
@@ -11,15 +11,15 @@
 #   $export LMI_IN=Mongolia; LANG=mn_MN make -f parent.make all
 # and check what appears on stdout.
 
-export LMI_TIMESTAMP := $(shell date -u +'%s.%N')
+export LMI_ENV_FILE := env_$(shell date -u +'%s_%N').eraseme
 
 parent.make parent.make:: source_env_vars ;
-       $(eval include env.$(LMI_TIMESTAMP).eraseme)
+       $(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"
 # '--force': the file won't be there when this makefile is remade
-       rm --force env.$(LMI_TIMESTAMP).eraseme
+       rm --force $(LMI_ENV_FILE)
 
 .PHONY: source_env_vars
 source_env_vars:
diff --git a/set.sh b/set.sh
index 07483b6..fa8df6c 100755
--- a/set.sh
+++ b/set.sh
@@ -2,9 +2,9 @@
 
 foo()
 {
-# $LMI_TIMESTAMP is defined by the makefile that sources this script.
+# $LMI_ENV_FILE is defined by the makefile that sources this script.
 # shellcheck disable=SC2154
-echo "LMI_TIMESTAMP in 'set.sh': $LMI_TIMESTAMP"
+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"
@@ -15,7 +15,7 @@ echo "LMI_OUT2 leaving 'set.sh': $LMI_OUT2"
 {
     echo "export LMI_OUT1 := $LMI_OUT1"
     echo "export LMI_OUT2 := $LMI_OUT2"
-} > env."$LMI_TIMESTAMP".eraseme
+} > "$LMI_ENV_FILE"
 }
 
 foo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]