-
-
Save leaveye/72effc55ba5ed246a7df to your computer and use it in GitHub Desktop.
exporting make variables
This file contains 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
define RULE | |
blah blah | |
and blah blah | |
endef | |
define FUN | |
pattern-of-$(1)-and-$(2) | |
endef | |
export FUN RULE | |
.PHONY: default_rule | |
default_rule: | |
# $(call FUN,arg-a,arg-b) | |
@$(MAKE) -f 2.mk $@ |
This file contains 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
.PHONY: default_rule | |
default_rule: | |
# $(call FUN,arg-a,arg-b) |
This file contains 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
#!/bin/sh | |
make -f 1.mk |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
my output on Ubuntu 14.04 with GNU Make 3.81 is:
which is supposed to be same pattern output.