mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Add ABI version to RUBY_LIB_VERSION
This commit adds the ABI version as build metadata to RUBY_LIB_VERSION. This will ensure that gems are installed in a path with the ABI version.
This commit is contained in:
parent
b13a7c8e36
commit
9bd4b2ab14
Notes:
git
2022-02-24 23:18:25 +09:00
2 changed files with 5 additions and 11 deletions
|
@ -229,15 +229,6 @@ end
|
|||
print " CONFIG[#{v.dump}] = #{(versions[v]||vars[v]).dump}\n"
|
||||
end
|
||||
|
||||
# Get the ABI version
|
||||
File.foreach(File.join(srcdir, "include/ruby/internal/abi.h")) do |l|
|
||||
m = /^\s*#\s*define\s+RUBY_ABI_VERSION\s+(\d+)/.match(l)
|
||||
if m
|
||||
print " CONFIG[\"ruby_abi_version\"] = \"#{m[1]}\"\n"
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
dest = drive ? %r'= "(?!\$[\(\{])(?i:[a-z]:)' : %r'= "(?!\$[\(\{])'
|
||||
v_disabled = {}
|
||||
v_others.collect! do |x|
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#define RUBY_RELEASE_DAY 24
|
||||
|
||||
#include "ruby/version.h"
|
||||
#include "ruby/internal/abi.h"
|
||||
|
||||
#ifndef TOKEN_PASTE
|
||||
#define TOKEN_PASTE(x,y) x##y
|
||||
|
@ -39,9 +40,11 @@
|
|||
|
||||
#if !defined RUBY_LIB_VERSION && defined RUBY_LIB_VERSION_STYLE
|
||||
# if RUBY_LIB_VERSION_STYLE == 3
|
||||
# define RUBY_LIB_VERSION STRINGIZE(RUBY_API_VERSION_MAJOR)"."STRINGIZE(RUBY_API_VERSION_MINOR)"."STRINGIZE(RUBY_API_VERSION_TEENY)
|
||||
# define RUBY_LIB_VERSION STRINGIZE(RUBY_API_VERSION_MAJOR)"."STRINGIZE(RUBY_API_VERSION_MINOR) \
|
||||
"."STRINGIZE(RUBY_API_VERSION_TEENY)"+"STRINGIZE(RUBY_ABI_VERSION)
|
||||
# elif RUBY_LIB_VERSION_STYLE == 2
|
||||
# define RUBY_LIB_VERSION STRINGIZE(RUBY_API_VERSION_MAJOR)"."STRINGIZE(RUBY_API_VERSION_MINOR)
|
||||
# define RUBY_LIB_VERSION STRINGIZE(RUBY_API_VERSION_MAJOR)"."STRINGIZE(RUBY_API_VERSION_MINOR) \
|
||||
"+"STRINGIZE(RUBY_ABI_VERSION)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue