bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

'... | Avoiding implicit rule recursion for rule '%/dir: %'. | ...'


From: WaitronCharm
Subject: '... | Avoiding implicit rule recursion for rule '%/dir: %'. | ...'
Date: Tue, 05 Nov 2024 13:35:53 +0000

Hello

Here is a makefile, it is rather 'synthetic', just to illustrate the question. 
One variation:

%/dir: %; # mkdir $@
target/dir/dir/file: target/dir/dir; # touch $@
target:; # mkdir $@

The other:

%/dir: %; # mkdir $@
%/dir2: %; # mkdir $@
target/dir/dir2/file: target/dir/dir2; # touch $@
target:; # mkdir $@

Is there any design rationale why 'make' does not like applying the same 
pattern rule more than once for the same target? It stops resolving potential 
graph paths with the error:

...
   Looking for a rule with intermediate file 'target/dir'.
    Avoiding implicit rule recursion for rule '%/dir: %'.
   No implicit rule found for 'target/dir'.
...

I am sure there are legitimate cases where recursively (but not infinitely) 
applying pattern rules should be useful.

Could this restriction be relaxed with an extra command line option? Or, this 
would create complications (internal logic, graph structures etc.)?


Thanks, cheers



reply via email to

[Prev in Thread] Current Thread [Next in Thread]