What does "$ (@: H)" do in a MakeFile?

I spoke with one of my fellow practitioners at dinner today, who works almost exclusively on the Makefile this summer, and he mentioned that he has no idea what $ (@: H) means or does. My google-fu is failing since I can't find it anywhere on the internet and was hoping you guys could help me.

+5
source share
1 answer

Assuming it's GNU make, it's just an extension of the (oddly named) @:H variable. Which is not a default variable (and is not a variable that can be set using normal assignment syntax) and would be a strange choice for a variable name, since it is very close to actual decomposition variables.

Most likely, this refers to BSD make where :H is a variable modifier, which (excerpt from the man page )

: N

Replaces every word in a variable with everything except the last component.

+3
source

All Articles