In a Makefile, I can get the full path string by $(CURDIR)
. The result is like /home/jones/prj/platform/Application_UBUNTU/build_os
. How do I extract the UBUNTU
from the string?
I use subst to replace '/' as space.
DIR = $(subst /, " ", $(CURDIR))
I get result as home jones prj platform Application_UBUNTU build_os
.
Then I try to use filter command but I cannot use % or wildcard to match Application_UBUNTU
out. Thanks for help in advance.