From f2738ef0757630ef7338f9748bba223799429cd0 Mon Sep 17 00:00:00 2001 From: Geoff Garside Date: Sat, 12 May 2012 11:22:34 +0100 Subject: [PATCH] Add Libv8::Make module in ext/ This module provides make discovery, it first tries to find gmake and then falls back to make. This should enable it to work safely and correctly on both BSD and Linux systems. --- ext/libv8/make.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 ext/libv8/make.rb diff --git a/ext/libv8/make.rb b/ext/libv8/make.rb new file mode 100644 index 0000000..950ca4b --- /dev/null +++ b/ext/libv8/make.rb @@ -0,0 +1,13 @@ +module Libv8 + module Make + module_function + + def make + unless defined?(@make) + @make = `which gmake`.chomp + @make = `which make`.chomp unless $?.success? + end + @make + end + end +end