%% Henning Makholm <[EMAIL PROTECTED]> writes:
>> .foobar.temp: foobar.sml
>> mosmlc $<
>> touch $@
>> binary: .foobar.temp
>> Gross, but it usually works.
hm> Only when nothing (or at least nothing with commands) depends on
hm> `binary': since the empty command does not change its timestamp, make
hm> will assume that it is not necessary to to futher recompilations even
hm> if `binary' did change as the result of the mosmlc command. Here is
hm> what I get, testing your construction:
hm> pc-043:~/tmp/foo$ cat Makefile
hm> final: interm
hm> cat interm > final
hm> interm: stamp
hm> stamp: source
hm> cat source > interm
hm> touch stamp
Sorry, I guess I wasn't explicit enough. When I said "binary" I meant
the actual target that uses the files, _NOT_ some intermediate file with
no rules. In other words, to rewrite your example, I meant something
like this:
final: stamp
cat interm > final
stamp: source
cat source > interm
touch stamp
IOW, you don't make targets depend on the output files (because make
can't be instructed on how to properly create them); instead you make
targets depend on the stamp file, but use the output files in the rule.
Like I said, gross, but it usually works :).
--
-------------------------------------------------------------------------------
Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
_______________________________________________
Bug-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-make