-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable GNU make
implicit variables and Quiet ar
with ARFLAGS
rather than > null
#2711
base: main
Are you sure you want to change the base?
Changes from all commits
ba82ce9
0779fa9
9bb8710
7ce2a66
469487f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -51,6 +51,7 @@ def make(env, target) | |||||||
system( | ||||||||
env, | ||||||||
RUBY_PLATFORM.match?(/openbsd|freebsd/) ? "gmake" : "make", | ||||||||
"--no-builtin-variables", # don't let GNU make implicit variables override variable fallbacks in the Makefile | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure I understand what this is doing. Could you explain why we need this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As noted on the previous posts, this flag disables implicit variables for GNU Lines 15 to 17 in 9bb8710
|
||||||||
target, | ||||||||
exception: true | ||||||||
) | ||||||||
|
@@ -76,22 +77,22 @@ def make(env, target) | |||||||
# The C extension uses RbConfig, which contains values from the toolchain that built the running Ruby. | ||||||||
env = RbConfig::CONFIG.slice("SOEXT", "CPPFLAGS", "CFLAGS", "CC", "AR", "ARFLAGS", "MAKEDIRS", "RMALL") | ||||||||
|
||||||||
require "mkmf" | ||||||||
|
||||||||
# It's possible that the Ruby that is being run wasn't actually compiled on this | ||||||||
# machine, in which case parts of RbConfig might be incorrect. In this case | ||||||||
# we'll need to do some additional checks and potentially fall back to defaults. | ||||||||
if env.key?("CC") && !File.exist?(env["CC"]) | ||||||||
if env.key?("CC") && !find_executable(env["CC"]) | ||||||||
env.delete("CC") | ||||||||
env.delete("CFLAGS") | ||||||||
env.delete("CPPFLAGS") | ||||||||
end | ||||||||
|
||||||||
if env.key?("AR") && !File.exist?(env["AR"]) | ||||||||
if env.key?("AR") && !find_executable(env["AR"]) | ||||||||
env.delete("AR") | ||||||||
env.delete("ARFLAGS") | ||||||||
end | ||||||||
|
||||||||
require "mkmf" | ||||||||
|
||||||||
# First, ensure that we can find the header for the prism library. | ||||||||
generate_templates # Templates should be generated before find_header. | ||||||||
unless find_header("prism.h", File.expand_path("../../include", __dir__)) | ||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A quick text find shows that this was the only recipe where
Q1
is used, and the only other use ofQ1
isprism/Makefile
Line 6 in 17762fa
(I’m a novice in C-land; if the entire set of
V
s andQ
s is a convention, introduce them to me.)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this matter, ba82ce9 introduces an acutal use for
V0
:prism/Makefile
Line 17 in ba82ce9