Created
December 11, 2018 12:55
-
-
Save taktran/ddd8bed0119a828d4ff2a6aee5adaae0 to your computer and use it in GitHub Desktop.
Test makefile playground
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
HELLO_FILE_NAME := ".hello" | |
tidy-hello: | |
-rm $(HELLO_FILE_NAME) | |
save-hello: tidy-hello write-to-hello | |
write-to-hello: | |
echo "save this hello" > $(HELLO_FILE_NAME) | |
smoke: | |
@echo "BASH_HELLO: $$BASH_HELLO" | |
@echo "SHELL_HELLO: $$SHELL_HELLO" # This is empty the first time it is run | |
hello: | |
$(MAKE) save-hello | |
BASH_HELLO="$$(cat $(HELLO_FILE_NAME))" \ | |
SHELL_HELLO="$(shell cat $(HELLO_FILE_NAME))" \ | |
$(MAKE) smoke |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment