lundi 1 décembre 2014

Makefile: extract pattern from a full path string


Vote count:

0




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.



asked 1 min ago







Makefile: extract pattern from a full path string

Aucun commentaire:

Enregistrer un commentaire