Created
May 25, 2020 10:57
-
-
Save toddlers/d139d5e6c4aa33b02f834c0a3909b354 to your computer and use it in GitHub Desktop.
language interpreters in Makefiles
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
.ONESHELL: | |
.SILENT: | |
main: \ | |
python \ | |
ruby \ | |
R \ | |
bash \ | |
docker | |
docker: .SHELLFLAGS = run --rm --entrypoint /bin/bash ubuntu -c | |
docker: SHELL := docker | |
docker: | |
echo "hello, $$(uname -a)!" | |
python: SHELL := python3 | |
python: | |
greeting = "hello" | |
print(f"{greeting}, python!") | |
ruby: .SHELLFLAGS := -e | |
ruby: SHELL := ruby | |
ruby: | |
greeting = "labas" | |
puts "#{greeting}, ruby!" | |
R: .SHELLFLAGS := -e | |
R: SHELL := Rscript | |
R: | |
greeting = "bonjour" | |
message(paste0(greeting, ", R!")) | |
bash: .SHELLFLAGS := -euo pipefail -c | |
bash: SHELL := bash | |
bash: | |
export greeting="¡hola" | |
echo "$${greeting}, bash!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment