Last active
September 26, 2019 14:23
-
-
Save aprxi/fa96407524e771595c5c093d361ad411 to your computer and use it in GitHub Desktop.
Makefile-readvar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Retrieve a variable from a file in to Makefile | |
# Strips off any quotes as well, \47 represents a strong-quote | |
MODULE_NAME = \ | |
$(shell awk -F= '/^NAME\ ?=/{gsub(/\47|"/, "", $$NF);print $$NF;exit}' variables) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment