ak> THEFILE = thefile.$$$$
ak> targer: dep
ak> touch $(THEFILE)
ak> ...
ak> rm $(THEFILE)
ak> Works ok in most situations.
>> No. This will break the same way as Barry's BAD example.
>> Make does simple text substitution for variables, so there is _NO_
>> difference in behavior between your version and Barry's BAD example.
jt> Unless AFAIK if you use (at least for GNU make, I haven't dealt
jt> with too many others)
jt> THEFILE := thefile.$$$$
No. This will not help.
Yes, this will resolve the value immediately rather than later, but
remember it's the _shell_ that is evaluating "$$", not make! So
$(THEFILE) will contain the string thefile.$$ instead of thefile.$$$$,
but still every line in the script is run in a different shell and the
expansion of $$ will yield a different number on the two different lines
above.
You _MUST_ use backslashes to ensure that all the lines are invoked
inside the same shell or this will _not_ work.
--
-------------------------------------------------------------------------------
http://www.gnu.org http://www.paulandlesley.org/gmake/
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist