I am trying to create a Makefile with target file name = folder name. Instead of hard coding it I used the function
FILE=$(PWD##*/)
I also tried
FILE=$(echo PWD##*/) and FILE=$(echo $(PWD##*/)).
But I am getting an error: un-terminated variable reference.
I know it's difficult to do such variable manipulations in Makefile. Is there a work around?
Thanks
##*/syntax works with shell variables, inside shell scripts. It won't work with make variables, within makefiles.