extconf_compile_commands_json 0.0.5 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca21d9596efcc6e7e23cc53e72cd04fced0c801dd34671376d5fb56aa0eef564
|
4
|
+
data.tar.gz: 619368bdc5955ae38ab920ba179f4a5f531d0d6f48cdad281aa7a3a059c8a77b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6f2a5db6f56efc66a423c0f1b09648073c09d290916957f84cd77346b957ccfbc5476570076362c4daa89902508e232d8c4d2b157ab5a1091a912171672bfb1
|
7
|
+
data.tar.gz: 31b01677582f19919fa6731a3dae1bf0c01a0c1ad32ac18e0b36b7f139be722de0d565cf1285c2429d335ad13e323e6302c0d85656d4eed15e3d395fb282696f
|
@@ -17,8 +17,8 @@ require_relative "../extconf_compile_commands_json"
|
|
17
17
|
|
18
18
|
module MakeMakefile
|
19
19
|
alias_method :__extconfcc_orig_create_makefile, :create_makefile
|
20
|
-
def create_makefile(
|
21
|
-
r = __extconfcc_orig_create_makefile(
|
20
|
+
def create_makefile(...)
|
21
|
+
r = __extconfcc_orig_create_makefile(...)
|
22
22
|
ExtconfCompileCommandsJson.generate!
|
23
23
|
ExtconfCompileCommandsJson.symlink!
|
24
24
|
r
|
@@ -7,15 +7,10 @@ require "fileutils"
|
|
7
7
|
|
8
8
|
module ExtconfCompileCommandsJson
|
9
9
|
def self.generate!
|
10
|
-
mkmf_cflags = []
|
11
10
|
# Start by expanding what's in our magic variables
|
12
|
-
[$INCFLAGS, $CPPFLAGS, $CFLAGS, $COUTFLAGS].
|
13
|
-
|
14
|
-
|
15
|
-
end
|
16
|
-
# expand that with the contents of the ruby options
|
17
|
-
mkmf_cflags.map! do |flag|
|
18
|
-
flag
|
11
|
+
mkmf_cflags = [$INCFLAGS, $CPPFLAGS, $CFLAGS, $COUTFLAGS].map { |flag|
|
12
|
+
# expand that with the contents of the ruby options
|
13
|
+
(flag || "")
|
19
14
|
.gsub("$(arch_hdrdir)", $arch_hdrdir || "")
|
20
15
|
.gsub("$(hdrdir)", $hdrdir || "")
|
21
16
|
.gsub("$(srcdir)", $srcdir || "")
|
@@ -27,8 +22,12 @@ module ExtconfCompileCommandsJson
|
|
27
22
|
.gsub("$(debugflags)", RbConfig::CONFIG["debugflags"] || "")
|
28
23
|
.gsub("$(warnflags)", RbConfig::CONFIG["warnflags"] || "")
|
29
24
|
.gsub("$(empty)", "")
|
30
|
-
|
31
|
-
|
25
|
+
}.flat_map { |flags|
|
26
|
+
# Need to shellwords expand them (_after_ doing the $() subst's)
|
27
|
+
Shellwords.split(flags)
|
28
|
+
}.reject { |flag|
|
29
|
+
flag.empty?
|
30
|
+
}
|
32
31
|
# This makes sure that #include "extconf.h" works
|
33
32
|
mkmf_cflags = ["-iquote#{File.realpath(Dir.pwd)}"] + mkmf_cflags
|
34
33
|
compile_commands = $srcs.map do |src|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: extconf_compile_commands_json
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- KJ Tsanaktsidis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|
@@ -54,7 +54,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '0'
|
56
56
|
requirements: []
|
57
|
-
rubygems_version: 3.
|
57
|
+
rubygems_version: 3.5.9
|
58
58
|
signing_key:
|
59
59
|
specification_version: 4
|
60
60
|
summary: Generate clangd compile_commands.json files for gems
|