Last active
September 12, 2018 12:24
-
-
Save AndreaRigoni/87d4186075b781259244175a24f00594 to your computer and use it in GitHub Desktop.
include a local variable for each target
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
| AC_VARIABLES = MYVAR | |
| $(foreach v,$(AC_VARIABLES),$(eval %: $v := $$($v) $$(ac__$v) )) | |
| ac__MYVAR = two | |
| ac__MYVAR += three |
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
| inlcude common.mk | |
| MYVAR = one | |
| print: | |
| @ echo $(MYVAR) | |
| ## this should return: one two three |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment