Skip to content

Instantly share code, notes, and snippets.

@podhmo
Created July 19, 2020 02:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save podhmo/77eda8f2c4a30a6ee5c1f45ff366ab12 to your computer and use it in GitHub Desktop.
Save podhmo/77eda8f2c4a30a6ee5c1f45ff366ab12 to your computer and use it in GitHub Desktop.
foo = xxx
bar = $(foo) @ $(foo)
boo = [ $(bar) ]
# or
# foo := xxx
# bar := $(foo) @ $(foo)
# boo := [ $(bar) ]
$(info * $$(foo) is $(foo))
$(info * $$(bar) is $(bar))
$(info * $$(boo) is $(boo))
default:
foo = $(shell python echo.py xxx)
bar = $(shell python echo.py $(foo) @ $(foo))
boo = $(shell python echo.py [ $(bar) ])
$(info $$(foo) is $(foo))
$(info $$(bar) is $(bar))
$(info $$(boo) is $(boo))
default:
foo := $(shell python echo.py xxx)
bar := $(shell python echo.py $(foo) @ $(foo))
boo := $(shell python echo.py [ $(bar) ])
$(info $$(foo) is $(foo))
$(info $$(bar) is $(bar))
$(info $$(boo) is $(boo))
default:
import shlex
import sys
print(shlex.join(sys.argv[1:]))
print("\t --", shlex.join(sys.argv), file=sys.stderr)
FILE = $(shell echo $@*.mk)
00:
make -f $(FILE) -s
01:
make -f $(FILE) -s
02:
make -f $(FILE) -s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment