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
cfed6e3a
Unverified
Commit
cfed6e3a
authored
Jun 20, 2018
by
Yukihiro "Matz" Matsumoto
Committed by
GitHub
Jun 20, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4050 from take-cheeze/fix_build_script
Fix build scripts.
parents
1a919528
b8fec13c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
12 deletions
+17
-12
mrbgems/mruby-bin-mruby-config/mrbgem.rake
mrbgems/mruby-bin-mruby-config/mrbgem.rake
+3
-2
mrbgems/mruby-compiler/mrbgem.rake
mrbgems/mruby-compiler/mrbgem.rake
+2
-2
mrbgems/mruby-test/mrbgem.rake
mrbgems/mruby-test/mrbgem.rake
+10
-8
tasks/libmruby.rake
tasks/libmruby.rake
+1
-0
tasks/mrbgems.rake
tasks/mrbgems.rake
+1
-0
No files found.
mrbgems/mruby-bin-mruby-config/mrbgem.rake
View file @
cfed6e3a
...
@@ -19,9 +19,10 @@ MRuby.each_target do
...
@@ -19,9 +19,10 @@ MRuby.each_target do
mruby_config_path
=
"
#{
build_dir
}
/bin/
#{
mruby_config
}
"
mruby_config_path
=
"
#{
build_dir
}
/bin/
#{
mruby_config
}
"
@bins
<<
mruby_config
@bins
<<
mruby_config
file
mruby_config_path
=>
libfile
(
"
#{
build_dir
}
/lib/libmruby"
)
do
|
t
|
make_cfg
=
"
#{
build_dir
}
/lib/libmruby.flags.mak"
file
mruby_config_path
=>
[
libfile
(
"
#{
build_dir
}
/lib/libmruby"
),
make_cfg
]
do
|
t
|
FileUtils
.
copy
"
#{
File
.
dirname
(
__FILE__
)
}
/
#{
mruby_config
}
"
,
t
.
name
FileUtils
.
copy
"
#{
File
.
dirname
(
__FILE__
)
}
/
#{
mruby_config
}
"
,
t
.
name
config
=
Hash
[
open
(
"
#{
build_dir
}
/lib/libmruby.flags.mak"
).
read
.
split
(
"
\n
"
).
map
{
|
x
|
a
=
x
.
split
(
/\s*=\s*/
,
2
);
[
a
[
0
],
a
[
1
].
gsub
(
'\\"'
,
'"'
)
]}]
config
=
Hash
[
open
(
make_cfg
).
read
.
split
(
"
\n
"
).
map
{
|
x
|
a
=
x
.
split
(
/\s*=\s*/
,
2
);
[
a
[
0
],
a
[
1
].
gsub
(
'\\"'
,
'"'
)
]}]
IO
.
write
(
t
.
name
,
File
.
open
(
t
.
name
)
{
|
f
|
IO
.
write
(
t
.
name
,
File
.
open
(
t
.
name
)
{
|
f
|
f
.
read
.
gsub
(
/echo (MRUBY_CFLAGS|MRUBY_LIBS|MRUBY_LDFLAGS_BEFORE_LIBS|MRUBY_LDFLAGS|MRUBY_LIBMRUBY_PATH)/
)
{
|
x
|
config
[
$1
].
empty?
?
''
:
"echo
#{
config
[
$1
]
}
"
}
f
.
read
.
gsub
(
/echo (MRUBY_CFLAGS|MRUBY_LIBS|MRUBY_LDFLAGS_BEFORE_LIBS|MRUBY_LDFLAGS|MRUBY_LIBMRUBY_PATH)/
)
{
|
x
|
config
[
$1
].
empty?
?
''
:
"echo
#{
config
[
$1
]
}
"
}
})
})
...
...
mrbgems/mruby-compiler/mrbgem.rake
View file @
cfed6e3a
...
@@ -23,10 +23,10 @@ MRuby::Gem::Specification.new 'mruby-compiler' do |spec|
...
@@ -23,10 +23,10 @@ MRuby::Gem::Specification.new 'mruby-compiler' do |spec|
cc
.
run
t
.
name
,
t
.
prerequisites
.
first
,
[],
[
"
#{
current_dir
}
/core"
]
cc
.
run
t
.
name
,
t
.
prerequisites
.
first
,
[],
[
"
#{
current_dir
}
/core"
]
end
end
end
end
file
objfile
(
"
#{
current_build_dir
}
/core/y.tab"
)
=>
lex_def
# Parser
# Parser
file
"
#{
current_build_dir
}
/core/y.tab.c"
=>
[
"
#{
current_dir
}
/core/parse.y"
]
do
|
t
|
file
"
#{
current_build_dir
}
/core/y.tab.c"
=>
[
"
#{
current_dir
}
/core/parse.y"
,
lex_def
]
do
|
t
|
FileUtils
.
mkdir_p
File
.
dirname
t
.
name
yacc
.
run
t
.
name
,
t
.
prerequisites
.
first
yacc
.
run
t
.
name
,
t
.
prerequisites
.
first
end
end
...
...
mrbgems/mruby-test/mrbgem.rake
View file @
cfed6e3a
...
@@ -23,7 +23,7 @@ MRuby::Gem::Specification.new('mruby-test') do |spec|
...
@@ -23,7 +23,7 @@ MRuby::Gem::Specification.new('mruby-test') do |spec|
mrbtest_objs
=
[]
mrbtest_objs
=
[]
driver_obj
=
objfile
(
"
#{
build_dir
}
/driver"
)
driver_obj
=
objfile
(
"
#{
build_dir
}
/driver"
)
driver
=
"
#{
spec
.
dir
}
/driver.c"
#
driver = "#{spec.dir}/driver.c"
assert_c
=
"
#{
build_dir
}
/assert.c"
assert_c
=
"
#{
build_dir
}
/assert.c"
assert_rb
=
"
#{
MRUBY_ROOT
}
/test/assert.rb"
assert_rb
=
"
#{
MRUBY_ROOT
}
/test/assert.rb"
...
@@ -31,7 +31,7 @@ MRuby::Gem::Specification.new('mruby-test') do |spec|
...
@@ -31,7 +31,7 @@ MRuby::Gem::Specification.new('mruby-test') do |spec|
mrbtest_objs
<<
assert_lib
mrbtest_objs
<<
assert_lib
file
assert_lib
=>
assert_c
file
assert_lib
=>
assert_c
file
assert_c
=>
assert_rb
do
|
t
|
file
assert_c
=>
[
assert_rb
,
build
.
mrbcfile
]
do
|
t
|
open
(
t
.
name
,
'w'
)
do
|
f
|
open
(
t
.
name
,
'w'
)
do
|
f
|
mrbc
.
run
f
,
assert_rb
,
'mrbtest_assert_irep'
mrbc
.
run
f
,
assert_rb
,
'mrbtest_assert_irep'
end
end
...
@@ -45,7 +45,7 @@ MRuby::Gem::Specification.new('mruby-test') do |spec|
...
@@ -45,7 +45,7 @@ MRuby::Gem::Specification.new('mruby-test') do |spec|
dep_list
=
build
.
gems
.
tsort_dependencies
(
g
.
test_dependencies
,
gem_table
).
select
(
&
:generate_functions
)
dep_list
=
build
.
gems
.
tsort_dependencies
(
g
.
test_dependencies
,
gem_table
).
select
(
&
:generate_functions
)
file
test_rbobj
=>
g
.
test_rbireps
file
test_rbobj
=>
g
.
test_rbireps
file
g
.
test_rbireps
=>
[
g
.
test_rbfiles
].
flatten
do
|
t
|
file
g
.
test_rbireps
=>
[
g
.
test_rbfiles
,
build
.
mrbcfile
].
flatten
do
|
t
|
FileUtils
.
mkdir_p
File
.
dirname
(
t
.
name
)
FileUtils
.
mkdir_p
File
.
dirname
(
t
.
name
)
open
(
t
.
name
,
'w'
)
do
|
f
|
open
(
t
.
name
,
'w'
)
do
|
f
|
g
.
print_gem_test_header
(
f
)
g
.
print_gem_test_header
(
f
)
...
@@ -146,7 +146,8 @@ MRuby::Gem::Specification.new('mruby-test') do |spec|
...
@@ -146,7 +146,8 @@ MRuby::Gem::Specification.new('mruby-test') do |spec|
gem_flags_after_libraries
=
build
.
gems
.
map
{
|
g
|
g
.
linker
.
flags_after_libraries
}
gem_flags_after_libraries
=
build
.
gems
.
map
{
|
g
|
g
.
linker
.
flags_after_libraries
}
gem_libraries
=
build
.
gems
.
map
{
|
g
|
g
.
linker
.
libraries
}
gem_libraries
=
build
.
gems
.
map
{
|
g
|
g
.
linker
.
libraries
}
gem_library_paths
=
build
.
gems
.
map
{
|
g
|
g
.
linker
.
library_paths
}
gem_library_paths
=
build
.
gems
.
map
{
|
g
|
g
.
linker
.
library_paths
}
build
.
linker
.
run
t
.
name
,
t
.
prerequisites
,
gem_libraries
,
gem_library_paths
,
gem_flags
,
gem_flags_before_libraries
build
.
linker
.
run
t
.
name
,
t
.
prerequisites
,
gem_libraries
,
gem_library_paths
,
gem_flags
,
gem_flags_before_libraries
,
gem_flags_after_libraries
end
end
end
end
...
@@ -163,13 +164,14 @@ MRuby::Gem::Specification.new('mruby-test') do |spec|
...
@@ -163,13 +164,14 @@ MRuby::Gem::Specification.new('mruby-test') do |spec|
nil
nil
end
end
current_gem_list
=
build
.
gems
.
map
(
&
:name
).
join
(
"
\n
"
)
current_gem_list
=
build
.
gems
.
map
(
&
:name
).
join
(
"
\n
"
)
if
active_gem_list
!=
current_gem_list
task
active_gems_path
do
|
t
|
File
.
write
active_gems_path
,
current_gem_list
FileUtils
.
mkdir_p
File
.
dirname
t
.
name
File
.
write
t
.
name
,
current_gem_list
end
end
file
clib
=>
active_gems_path
file
clib
=>
active_gems_path
if
active_gem_list
!=
current_gem_list
file
mlib
=>
clib
file
mlib
=>
clib
file
clib
=>
init
do
|
t
|
file
clib
=>
[
init
,
build
.
mrbcfile
]
do
|
_
t
|
_pp
"GEN"
,
"*.rb"
,
"
#{
clib
.
relative_path
}
"
_pp
"GEN"
,
"*.rb"
,
"
#{
clib
.
relative_path
}
"
FileUtils
.
mkdir_p
File
.
dirname
(
clib
)
FileUtils
.
mkdir_p
File
.
dirname
(
clib
)
open
(
clib
,
'w'
)
do
|
f
|
open
(
clib
,
'w'
)
do
|
f
|
...
...
tasks/libmruby.rake
View file @
cfed6e3a
...
@@ -4,6 +4,7 @@ MRuby.each_target do
...
@@ -4,6 +4,7 @@ MRuby.each_target do
end
end
file
"
#{
build_dir
}
/lib/libmruby.flags.mak"
=>
[
__FILE__
,
libfile
(
"
#{
build_dir
}
/lib/libmruby"
)]
do
|
t
|
file
"
#{
build_dir
}
/lib/libmruby.flags.mak"
=>
[
__FILE__
,
libfile
(
"
#{
build_dir
}
/lib/libmruby"
)]
do
|
t
|
FileUtils
.
mkdir_p
File
.
dirname
t
.
name
open
(
t
.
name
,
'w'
)
do
|
f
|
open
(
t
.
name
,
'w'
)
do
|
f
|
f
.
puts
"MRUBY_CFLAGS =
#{
cc
.
all_flags
}
"
f
.
puts
"MRUBY_CFLAGS =
#{
cc
.
all_flags
}
"
...
...
tasks/mrbgems.rake
View file @
cfed6e3a
...
@@ -53,6 +53,7 @@ MRuby.each_target do
...
@@ -53,6 +53,7 @@ MRuby.each_target do
# legal documents
# legal documents
file
"
#{
build_dir
}
/LEGAL"
=>
[
MRUBY_CONFIG
,
__FILE__
]
do
|
t
|
file
"
#{
build_dir
}
/LEGAL"
=>
[
MRUBY_CONFIG
,
__FILE__
]
do
|
t
|
FileUtils
.
mkdir_p
File
.
dirname
t
.
name
open
(
t
.
name
,
'w+'
)
do
|
f
|
open
(
t
.
name
,
'w+'
)
do
|
f
|
f
.
puts
<<
LEGAL
f
.
puts
<<
LEGAL
Copyright (c)
#{
Time
.
now
.
year
}
mruby developers
Copyright (c)
#{
Time
.
now
.
year
}
mruby developers
...
...
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