Essentially, when using multiple target specific variable assignments
with multiple targets,
some of such variable assignments destroy other variable values.  
The variable values that are destroyed are those of other target
specific assignments.

The makefile demonstrating the problem runs as follows:
################################################################
# propogate value of FLAG1
targ1:  targ2
targ1:  FLAG1 = some_particular_val

# propogate value of FLAG2
targ2: targ3
        @echo MAKING TARG2: flag1 is  % $(FLAG1) %, flag2 is % $(FLAG2)
%
targ2: FLAG2=some_other_val
# screen output   MAKING TARG2: flag1 is % some_particular_val %, flag2
is % some_other_val %


# FLAG1 no longer defined.
targ3:
        @echo MAKING TARG3: flag1 is  % $(FLAG1) %, flag2 is % $(FLAG2)
%
# screen output   MAKING TARG3: flag1 is % %, flag2 is % some_other_val
%
###################################################################
You may wish to get rid of the comments when examining the results
during running the make script.  They add a little extra line noise.

At any rate, when making targ3, I thought that I should be told that the
value of FLAG1 is "some_particular_val".  The value of FLAG1 while
making targ3 is actually displayed as undefined.  

The "higher level" value of FLAG1, associated with the independent
target that calls in targ2, was lost during the making of targ3.  In the
makefile that I have been writing elsewhere, the variable value
associated with the the independent target was kept, and the variable
values associated with the dependent targets were lost.  This is a
different result, but a similar problem.

Is something within the make sourcecode stomping something else?

My platform is cygwin b20, on winnt.  The make version is 3.77, and was
compiled from source that I downloaded from the prep.ai.mit.edu site.

A tarball containing another copy of the same makefile, and my config.h
is enclosed.  I hope outlook sends it out in MIME format.

I hope this bug report helps.

Thanks,
Dean Fitzgerald

 

make_report.tar

Reply via email to