extconf_compile_commands_json 0.0.4 → 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 +11 -13
- 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
|
@@ -11,18 +11,16 @@ require "mkmf"
|
|
11
11
|
# needing to muck about with $LOAD_PATH or Bundler.
|
12
12
|
require_relative "../extconf_compile_commands_json"
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
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
|
21
25
|
end
|
22
26
|
end
|
23
|
-
|
24
|
-
MakeMakefile.prepend ExtconfCompileCommandsJson::AutoloadPatch
|
25
|
-
# We have to patch the toplevel binding directly as well, because requiring
|
26
|
-
# mkmf includes it into main straight away. So, prepending to MakeMakefile
|
27
|
-
# will be ignored if someone calls "create_makefile" in their extconf.rb
|
28
|
-
prepend ExtconfCompileCommandsJson::AutoloadPatch
|