%% Rodrigo de Salvo Braz <[EMAIL PROTECTED]> writes: rdsb> all: temp/t1 temp/t2 rdsb> echo Ok rdsb> temp/t%: t% rdsb> mkdir -p temp rdsb> ls > $@ rdsb> t1: rdsb> ls > t1 rdsb> ls > t2
rdsb> When I run 'make', I get the output: rdsb> ls > t1 rdsb> ls > t2 rdsb> mkdir -p temp rdsb> ls > temp/t1 rdsb> make: *** No rule to make target `temp/t2', needed by `all'. Stop. rdsb> My question is why do I get this error message? I expected the rule rdsb> temp/t%: t% Because make thinks there is no file "t2", so it can't apply the pattern you expect it to. Make caches the contents of the directory when it start, and it didn't run any rule that told it t2 would be created, so as far as make is concerned no file t2 exists. Your rule for t1 is "magically" creating files behind make's back, so make doesn't know about them and doesn't believe they exist. -- ------------------------------------------------------------------------------- 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 _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
