about summary refs log tree commit homepage
path: root/GNUmakefile
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-10-24 10:28:13 -0700
committerEric Wong <normalperson@yhbt.net>2009-10-24 10:51:45 -0700
commitbd8912c86fc3ef617e72e4cf59fb308dc06563ba (patch)
tree38454a2fc9f6b3520c44db3fed0d49d13cf522ac /GNUmakefile
parentccd4681cdd361f00b86d29e9d1b1ccae0e7d5079 (diff)
downloadrainbows-bd8912c86fc3ef617e72e4cf59fb308dc06563ba.tar.gz
It's more common form for externally-visible/modifiable
variables in Makefiles and shell scripts.
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile18
1 files changed, 12 insertions, 6 deletions
diff --git a/GNUmakefile b/GNUmakefile
index bc870ef..6fc7103 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -1,6 +1,6 @@
 # use GNU Make to run tests in parallel, and without depending on Rubygems
 all::
-ruby = ruby
+RUBY = ruby
 rake = rake
 GIT_URL = git://git.bogomips.org/rainbows.git
 
@@ -8,11 +8,17 @@ GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
         @./GIT-VERSION-GEN
 -include GIT-VERSION-FILE
 -include local.mk
+ifdef ruby
+  ifeq ($(RUBY),ruby)
+    $(warning ruby variable is deprecated, use RUBY instead)
+    RUBY = $(ruby)
+  endif
+endif
 ifeq ($(DLEXT),) # "so" for Linux
-  DLEXT := $(shell $(ruby) -rrbconfig -e 'puts Config::CONFIG["DLEXT"]')
+  DLEXT := $(shell $(RUBY) -rrbconfig -e 'puts Config::CONFIG["DLEXT"]')
 endif
 ifeq ($(RUBY_VERSION),)
-  RUBY_VERSION := $(shell $(ruby) -e 'puts RUBY_VERSION')
+  RUBY_VERSION := $(shell $(RUBY) -e 'puts RUBY_VERSION')
 endif
 
 base_bins := rainbows
@@ -25,7 +31,7 @@ install: $(bins)
         $(RM) -r .install-tmp
         mkdir .install-tmp
         cp -p bin/* .install-tmp
-        $(ruby) setup.rb all
+        $(RUBY) setup.rb all
         $(RM) $^
         mv .install-tmp/* bin/
         $(RM) -r .install-tmp
@@ -82,10 +88,10 @@ doc: .document NEWS ChangeLog
         cd doc && for i in $(base_bins); do \
           sed -e '/"documentation">/r man1/'$$i'.1.html' \
                 < $${i}_1.html > tmp && mv tmp $${i}_1.html; done
-        $(ruby) -i -p -e \
+        $(RUBY) -i -p -e \
           '$$_.gsub!("</title>",%q{\&$(call atom,$(cgit_atom))})' \
           doc/ChangeLog.html
-        $(ruby) -i -p -e \
+        $(RUBY) -i -p -e \
           '$$_.gsub!("</title>",%q{\&$(call atom,$(news_atom))})' \
           doc/NEWS.html doc/README.html
         $(rake) -s news_atom > doc/NEWS.atom.xml