I have a variable in Makefile
:
JAVABIN = $(shell dirname $(which java))
And when I echo the JAVA_HOME
variable in Makefile
, the variable definition complains:
dirname: missing operand
Try 'dirname --help' for more information.
When I quote the $(which java)
, the JAVABIN
is .
, so the result is wrong. And I didn't understand how make reads a Makefile, maybe it is the cause. Thank you very much.