Skip to content
Advertisement

makefile substitute target pattern twice in its dependency

I have the following project architecture

JavaScript

My aim is to generate a png image for each directory present into doc/uml into build/doc/uml

The parent makefile is the following one

JavaScript

And the submakefile is the following one

JavaScript

However it’s failing when I’m launching it with make doc

JavaScript

It seems that the problem comes from the fact that ‘%’ can’t be replaced twice on the dependency.

I can’t find a way to achieve my goal without modifying the project architecture (I would like to keep it as close as it is now)

Is there a way to replace the pattern ‘%’ twice ?

Is there a better way to achieve my goal than trying to replace the uml name twice in the target’s dependency ?

Advertisement

Answer

You can also use secondary expansion:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement