extconf_compile_commands_json 0.0.2 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/extconf_compile_commands_json/autoload.rb +15 -10
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ce6710866c4f07c500ab2585fd1fa1d40dcf7f5d8e00ecba008f8336de88dc4
|
4
|
+
data.tar.gz: 2ac4f1f733c16de18a0e255c42346fbc6ded34cff9af1addb7d5409790feb792
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94e624a0c3922c37081847ab63d8f59fa355046bbdbee9c244db6e596b346eaabd417ab75b4106dd38efb36bf23d57861cddcd465eeb81353028f03473a15b94
|
7
|
+
data.tar.gz: 124ebd14ce40fa8ac4ec560611a08e2d687ecfa19be0e48af5952885e72436e3f63cf9f09f925676ee61ebe5d63ae141144d06d87c492a388933cede3604bb8d
|
@@ -6,16 +6,21 @@
|
|
6
6
|
# scripts.
|
7
7
|
|
8
8
|
require "mkmf"
|
9
|
-
|
9
|
+
# the require_relative looks stupid, but it ensures that you can load this patch
|
10
|
+
# simply by running adding -r/path/to/autoload.rb to your Ruby invocation without
|
11
|
+
# needing to muck about with $LOAD_PATH or Bundler.
|
12
|
+
require_relative "../extconf_compile_commands_json"
|
10
13
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
14
|
+
# We have to patch MakeMakefile directly, rather than prepending to it, because
|
15
|
+
# requiring mkmf includes it into the toplevel main object straight away. So prepending
|
16
|
+
# here would be too late.
|
17
|
+
|
18
|
+
module MakeMakefile
|
19
|
+
alias_method :__extconfcc_orig_create_makefile, :create_makefile
|
20
|
+
def create_makefile(*args)
|
21
|
+
r = __extconfcc_orig_create_makefile(*args)
|
22
|
+
ExtconfCompileCommandsJson.generate!
|
23
|
+
ExtconfCompileCommandsJson.symlink!
|
24
|
+
r
|
18
25
|
end
|
19
26
|
end
|
20
|
-
|
21
|
-
MakeMakefile.prepend ExtconfCompileCommandsJson::AutoloadPatch
|