Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
7b6150ab
Commit
7b6150ab
authored
Jun 09, 2014
by
Masaki Muranaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add include_paths in dependency gems.
parent
2f804746
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
tasks/mrbgem_spec.rake
tasks/mrbgem_spec.rake
+23
-0
No files found.
tasks/mrbgem_spec.rake
View file @
7b6150ab
...
@@ -34,6 +34,8 @@ module MRuby
...
@@ -34,6 +34,8 @@ module MRuby
attr_accessor
:requirements
attr_accessor
:requirements
attr_reader
:dependencies
attr_reader
:dependencies
attr_accessor
:export_include_paths
attr_block
MRuby
::
Build
::
COMMANDS
attr_block
MRuby
::
Build
::
COMMANDS
def
initialize
(
name
,
&
block
)
def
initialize
(
name
,
&
block
)
...
@@ -71,6 +73,8 @@ module MRuby
...
@@ -71,6 +73,8 @@ module MRuby
@requirements
=
[]
@requirements
=
[]
@dependencies
=
[]
@dependencies
=
[]
@export_include_paths
=
[]
@export_include_paths
<<
"
#{
dir
}
/include"
if
File
.
directory?
"
#{
dir
}
/include"
instance_eval
(
&
@initializer
)
instance_eval
(
&
@initializer
)
...
@@ -336,6 +340,25 @@ module MRuby
...
@@ -336,6 +340,25 @@ module MRuby
rescue
TSort
::
Cyclic
=>
e
rescue
TSort
::
Cyclic
=>
e
fail
"Circular mrbgem dependency found:
#{
e
.
message
}
"
fail
"Circular mrbgem dependency found:
#{
e
.
message
}
"
end
end
each
do
|
g
|
import_include_paths
(
g
)
end
end
def
import_include_paths
(
g
)
gem_table
=
@ary
.
reduce
({})
{
|
res
,
v
|
res
[
v
.
name
]
=
v
;
res
}
g
.
dependencies
.
each
do
|
dep
|
dep_g
=
gem_table
[
dep
[
:gem
]]
# We can do recursive call safely
# as circular dependency has already detected in the caller.
import_include_paths
(
dep_g
)
g
.
compilers
.
each
do
|
compiler
|
compiler
.
include_paths
+=
dep_g
.
export_include_paths
g
.
export_include_paths
+=
dep_g
.
export_include_paths
end
end
end
end
end
# List
end
# List
end
# Gem
end
# Gem
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment