FileUtils.make: don't bypass superenv
This commit is contained in:
parent
30adcab6cf
commit
890788af65
@ -111,10 +111,18 @@ module FileUtils
|
|||||||
# path to the actually-installed make on Tiger or older.
|
# path to the actually-installed make on Tiger or older.
|
||||||
def make(*args)
|
def make(*args)
|
||||||
if Utils.popen_read("/usr/bin/make", "--version").match(/Make (\d\.\d+)/)[1] > "3.80"
|
if Utils.popen_read("/usr/bin/make", "--version").match(/Make (\d\.\d+)/)[1] > "3.80"
|
||||||
system "/usr/bin/make", *args
|
make_path = "/usr/bin/make"
|
||||||
else
|
else
|
||||||
make = Formula["make"].opt_bin/"make"
|
make = Formula["make"].opt_bin/"make"
|
||||||
make_path = make.exist? ? make.to_s : (Formula["make"].opt_bin/"gmake").to_s
|
make_path = make.exist? ? make.to_s : (Formula["make"].opt_bin/"gmake").to_s
|
||||||
|
end
|
||||||
|
|
||||||
|
if superenv?
|
||||||
|
make_name = File.basename(make_path)
|
||||||
|
with_env "HOMEBREW_MAKE" => make_name do
|
||||||
|
system "make", *args
|
||||||
|
end
|
||||||
|
else
|
||||||
system make_path, *args
|
system make_path, *args
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
export MAKE=${HOMEBREW_MAKE:-make}
|
||||||
export HOMEBREW_CCCFG="O$HOMEBREW_CCCFG"
|
export HOMEBREW_CCCFG="O$HOMEBREW_CCCFG"
|
||||||
exec xcrun make "$@"
|
exec xcrun $MAKE "$@"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user