A
A
Anton Kashcheev2015-07-13 22:59:59
GNU Make
Anton Kashcheev, 2015-07-13 22:59:59

Is it possible to use string functions in specifying dependencies for targets?

There was such a question.
Let's say there is a file src/Test/Test.cpp. After compilation, I want to get src_Test_Test.o.
Previously, in the makefile, I get the final name of the objects.
To return to the full name (with directory names) I write the following thing:

%.o : $(subst _,/,%.cpp)
     <...>

Actually the question is: is it possible to do this at all? It's just make that says no.
Or are there alternatives to this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Kashcheev, 2015-07-19
@kachsheev

And I answer again.
No.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question