Reputation: 21
I want to perform operations on a file inside the folder. There are 1000 folders and inside each folder there is one such file on which I have to perform some actions. Can I use the following? If not suggest me some method.
$(obj)/%.log : $(PATH)/%./%.c
Upvotes: 2
Views: 41
Reputation: 100936
No. GNU make only supports a single percent sign per target or prerequisite. Any percents after the first are treated as literal %
characters.
You can use secondary expansion for this:
.SECONDEXPANSION:
$(obj)/%.log : $(PATH)/$$*./$$*.c
run my command
Upvotes: 3