Hi,
I am facing a problem in Makefile. I will try to explain it here.
#Makefile fragment
target1:
TIME_STAMP = `date +%d_%b_%H:%M`
NEW_DIR = ${LABEL}_${TIME_STAMP}
run_job.pl
target2:
extract_results
target3:
analyze_results
#End of fragment
In my makefile, for one target, I create a new directory structure for
this particular run in target1. I also need to pass this this new
directory name to another TCL script (For which I want to use awk to
edit this TCL script). Then Perl script runs the job.
Now, for next target, I need to analyze the results for the last
run. which implies that i need to save the directory name. The problem
I am facing is that..Since Makefile executes the commands in target in
new shell, storing the directory name in the variable is not visible
in the next target. Even, seting a environment variable does not help
because it does not set the environment variable in the parent shell.
<1> Is there anyway to set the environment variable in parent shell
from the Makefile?
<2> If I do not define the NEW_DIR in the target, Everytime, for all
targets NEW_DIR will get new value (because of the date command).
I'll really appreciate any help from you experts in this group.
Thanks in advance,
Arvind Kumar,
Sr. Design Engineer,
Sasken Communication Technologies, Ltd.
139/25 Amar Jyothi Layout,
Bangalore, India