Skip to content

Instantly share code, notes, and snippets.

@leaveye
Last active August 29, 2015 14:08
Show Gist options
  • Save leaveye/72effc55ba5ed246a7df to your computer and use it in GitHub Desktop.
Save leaveye/72effc55ba5ed246a7df to your computer and use it in GitHub Desktop.
exporting make variables
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 $@
.PHONY: default_rule
default_rule:
# $(call FUN,arg-a,arg-b)
#!/bin/sh
make -f 1.mk
@leaveye
Copy link
Author

leaveye commented Oct 28, 2014

my output on Ubuntu 14.04 with GNU Make 3.81 is:

# pattern-of-arg-a-and-arg-b
make[1]: Entering directory `.../testmake'
# pattern-of--and-
make[1]: Leaving directory `.../testmake'

which is supposed to be same pattern output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment