[bmake] replace characters in variables

Hello everyone,

I know this is kind of a trick question. But it would be nice to have a trick or solution.

I have a variable in the makefile defined like “myvar=was:immer:gefaellt” I like to have it as a file name like: “$(tmp)/$(myvar).txt

This will of course not work, ‘:’ is illegal in a file name. In a batch file I could do it this way to replace ‘:’ with ‘_’:

SET MYVAR=was:immer:gefaellt
:: => “C:\Users\SomeOne\AppData\Local\Temp\was_immer_gefaellt.TXT”

How could I do this trick in a bmake-file? I tried to call “@SET…” from the makefile. But I did not get the result back, because this would start some new child process.

Thanks a lot!

Parents Reply Children
No Data