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
107dc0c7
Commit
107dc0c7
authored
Jan 18, 2019
by
KOBAYASHI Shuji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid a side effect when run Rake without execution of tasks
Avoid directory creation when run `rake -T` etc.
parent
cb1946f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
Rakefile
Rakefile
+10
-7
No files found.
Rakefile
View file @
107dc0c7
...
...
@@ -32,20 +32,25 @@ load "#{MRUBY_ROOT}/tasks/benchmark.rake"
load
"
#{
MRUBY_ROOT
}
/tasks/gitlab.rake"
def
install_D
(
src
,
dst
)
opts
=
{
:verbose
=>
$verbose
}
FileUtils
.
rm_f
dst
,
opts
FileUtils
.
mkdir_p
File
.
dirname
(
dst
),
opts
FileUtils
.
cp
src
,
dst
,
opts
end
##############################
# generic build targets, rules
task
:default
=>
:all
bin_path
=
ENV
[
'INSTALL_DIR'
]
||
"
#{
MRUBY_ROOT
}
/bin"
FileUtils
.
mkdir_p
bin_path
,
{
:verbose
=>
$verbose
}
depfiles
=
MRuby
.
targets
[
'host'
].
bins
.
map
do
|
bin
|
install_path
=
MRuby
.
targets
[
'host'
].
exefile
(
"
#{
bin_path
}
/
#{
bin
}
"
)
source_path
=
MRuby
.
targets
[
'host'
].
exefile
(
"
#{
MRuby
.
targets
[
'host'
].
build_dir
}
/bin/
#{
bin
}
"
)
file
install_path
=>
source_path
do
|
t
|
FileUtils
.
rm_f
t
.
name
,
{
:verbose
=>
$verbose
}
FileUtils
.
cp
t
.
prerequisites
.
first
,
t
.
name
,
{
:verbose
=>
$verbose
}
install_D
t
.
prerequisites
.
first
,
t
.
name
end
install_path
...
...
@@ -78,8 +83,7 @@ MRuby.each_target do |target|
install_path
=
MRuby
.
targets
[
'host'
].
exefile
(
"
#{
bin_path
}
/
#{
bin
}
"
)
file
install_path
=>
exec
do
|
t
|
FileUtils
.
rm_f
t
.
name
,
{
:verbose
=>
$verbose
}
FileUtils
.
cp
t
.
prerequisites
.
first
,
t
.
name
,
{
:verbose
=>
$verbose
}
install_D
t
.
prerequisites
.
first
,
t
.
name
end
depfiles
+=
[
install_path
]
elsif
target
==
MRuby
.
targets
[
'host-debug'
]
...
...
@@ -87,8 +91,7 @@ MRuby.each_target do |target|
install_path
=
MRuby
.
targets
[
'host-debug'
].
exefile
(
"
#{
bin_path
}
/
#{
bin
}
"
)
file
install_path
=>
exec
do
|
t
|
FileUtils
.
rm_f
t
.
name
,
{
:verbose
=>
$verbose
}
FileUtils
.
cp
t
.
prerequisites
.
first
,
t
.
name
,
{
:verbose
=>
$verbose
}
install_D
t
.
prerequisites
.
first
,
t
.
name
end
depfiles
+=
[
install_path
]
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