Last active
July 22, 2017 02:28
-
-
Save insaneinside/bbc2f9c980af42fd8a05 to your computer and use it in GitHub Desktop.
Ruby as a shell in GNU Make
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
# Example of using Ruby as the command interpreter for GNU Make | |
# Set shell to ruby... | |
SHELL:=ruby | |
# ...and implicitly pass `-e` (Ruby's "eval" option) prior to the | |
# command string. | |
.SHELLFLAGS:=-e | |
# Tell GNU Make to use a single shell process for all lines in a given recipe. | |
# Requires GNU Make 3.82 (~August 2010). | |
.ONESHELL: | |
all: | |
puts 'Hello, World!' | |
# Yes, blocks work! | |
5.times do | |
puts 'Bye!' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment