I want to have file, when I can list of names (one in the line), so that when make is invoked, rules are generated on the fly from this names with some string appended to it.
Example:
file contents:
target1
target2
target3
String to concatenate: my_task_
From this I want to have 3 rules:
my_task_target1:
<some things to do>
my_task_target2:
<some things to do>
my_task_target3:
<some things to do>
I know, that when I have array with all this targets names, I can do this like in this answer, but I need to read data from file.
I want it to be this way, because I will have many targets, and there is different list of tasks for every target. Each task will have it's own file with list of targets. At the end I will also create rules with names after target, but without prefix, and this rules will have all tasks, that are assigned to some target, so that I can invoke separated tasks, and also all needed tasks for target with one make command.
How can I achieve this? Or maybe there is a better way to do what I want to do?