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
9757616c
Unverified
Commit
9757616c
authored
Sep 17, 2020
by
Yukihiro "Matz" Matsumoto
Committed by
GitHub
Sep 17, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5079 from wataash/fix-dep-parse
Fix *.d parsing with gcc 9.3.0
parents
5bfb70e9
e8723a4f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
5 deletions
+21
-5
lib/mruby/build/command.rb
lib/mruby/build/command.rb
+21
-5
No files found.
lib/mruby/build/command.rb
View file @
9757616c
...
...
@@ -139,6 +139,15 @@ module MRuby
# /include/mruby/value.h \
# /src/value_array.h
#
# ==== Without <tt>-MP</tt> compiler flag (gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0)
#
# /build/host/src/array.o: /src/array.c \
# /include/mruby.h /include/mrbconf.h \
# /include/mruby/common.h \
# ...
# /include/mruby/range.h \
# /src/value_array.h
#
# ==== With <tt>-MP</tt> compiler flag
#
# /build/host/src/array.o: \
...
...
@@ -155,11 +164,18 @@ module MRuby
#
def
get_dependencies
(
file
)
file
=
file
.
ext
(
'd'
)
unless
File
.
extname
(
file
)
==
'.d'
deps
=
[]
if
File
.
exist?
(
file
)
File
.
foreach
(
file
){
|
line
|
deps
<<
$1
if
/^ +(.*?)(?: *\\)?$/
=~
line
}
deps
.
uniq!
end
return
[
MRUBY_CONFIG
]
unless
File
.
exist?
(
file
)
deps
=
""
.
gsub
(
"
\\\n
"
,
""
).
split
(
"
\n
"
).
map
do
|
dep_line
|
# dep_line:
# - "/build/host/src/array.o: /src/array.c /include/mruby/common.h ..."
# - ""
# - "/include/mruby/common.h:"
dep_line
.
scan
(
/^\S+:\s+(.+)$/
).
flatten
.
map
{
|
s
|
s
.
split
(
' '
)
}.
flatten
# => ["/src/array.c", "/include/mruby/common.h" , ...]
# []
# []
end
.
flatten
.
uniq
deps
<<
MRUBY_CONFIG
end
end
...
...
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