Created
October 15, 2024 04:59
-
-
Save jordansissel/23b15c7fed9dad48017283fd65d068a5 to your computer and use it in GitHub Desktop.
Revisions
-
jordansissel created this gist
Oct 15, 2024 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ # 'gem list -i foo' will print 'true' if a gem is already installed. 'false' otherwise GEMS=clamp rake # From the GEMS list, generate a list of make targets TARGETS=$(foreach gem,$(GEMS),gem-$(shell gem list -i $(gem))-$(gem)) build: $(TARGETS) build: @echo "=> OK to build" .PHONY: gem-false-% gem-false-%: GEM=$(@:gem-false-%=%) gem-false-%: @echo Installing "$(GEM)" gem install $(GEM) .PHONY: gem-true-% gem-true-%: GEM=$(@:gem-true-%=%) gem-true-%: @echo "Found $(GEM)"