In a Makefile recipe, I can refer to the current target name by using '$@'.
Assuming you have:
%.foo:
@echo "Blah!"
And you call that with:
make bar
'$@' would return 'bar.foo'. Is there a way to refer just to 'bar'?
Use $* to get the % part of the target:
%.foo:
@echo $*
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With