diff options
| author | Dominic Sisneros <[email protected]> | 2020-04-01 11:55:35 -0600 |
|---|---|---|
| committer | Dominic Sisneros <[email protected]> | 2020-04-01 11:55:35 -0600 |
| commit | e3875ae8c5a9cd8ebef7fa4775698bf85d7c8eb9 (patch) | |
| tree | 43199871ab16f12be182bb6d06311f07b7cf4e8d /tasks | |
| parent | 5acd802d2be19872b703d6c9876aa61a262c6c8c (diff) | |
| download | mruby-e3875ae8c5a9cd8ebef7fa4775698bf85d7c8eb9.tar.gz mruby-e3875ae8c5a9cd8ebef7fa4775698bf85d7c8eb9.zip | |
build when directories and files have spaces
Modified the build to quote filenames so that it builds when files have spaces
Diffstat (limited to 'tasks')
| -rw-r--r-- | tasks/toolchains/gcc.rake | 6 | ||||
| -rw-r--r-- | tasks/toolchains/openwrt.rake | 12 | ||||
| -rw-r--r-- | tasks/toolchains/visualcpp.rake | 16 |
3 files changed, 17 insertions, 17 deletions
diff --git a/tasks/toolchains/gcc.rake b/tasks/toolchains/gcc.rake index e9ea2550c..810f23b7a 100644 --- a/tasks/toolchains/gcc.rake +++ b/tasks/toolchains/gcc.rake @@ -12,9 +12,9 @@ MRuby::Toolchain.new(:gcc) do |conf, params| compiler.command = ENV['CC'] || default_command compiler.flags = [c_mandatory_flags, ENV['CFLAGS'] || [compiler_flags, cxx_invalid_flags, %w(-Wwrite-strings)]] end - compiler.option_include_path = '-I%s' + compiler.option_include_path = %q[-I"%s"] compiler.option_define = '-D%s' - compiler.compile_options = '%{flags} -MMD -o %{outfile} -c %{infile}' + compiler.compile_options = %q[%{flags} -MMD -o "%{outfile}" -c "%{infile}"] compiler.cxx_compile_flag = '-x c++ -std=gnu++03' compiler.cxx_exception_flag = '-fexceptions' compiler.cxx_invalid_flags = c_mandatory_flags + cxx_invalid_flags @@ -27,7 +27,7 @@ MRuby::Toolchain.new(:gcc) do |conf, params| linker.library_paths = [] linker.option_library = '-l%s' linker.option_library_path = '-L%s' - linker.link_options = '%{flags} -o %{outfile} %{objs} %{flags_before_libraries} %{libs} %{flags_after_libraries}' + linker.link_options = '%{flags} -o "%{outfile}" %{objs} %{flags_before_libraries} %{libs} %{flags_after_libraries}' end [[conf.cc, 'c'], [conf.cxx, 'c++']].each do |cc, lang| diff --git a/tasks/toolchains/openwrt.rake b/tasks/toolchains/openwrt.rake index aeb6dbcbc..c376d96ec 100644 --- a/tasks/toolchains/openwrt.rake +++ b/tasks/toolchains/openwrt.rake @@ -5,18 +5,18 @@ MRuby::Toolchain.new(:openwrt) do |conf| cc.command = ENV['TARGET_CC'] cc.flags = ENV['TARGET_CFLAGS'] cc.include_paths = ["#{MRUBY_ROOT}/include"] - cc.option_include_path = '-I%s' + cc.option_include_path = %q[-I"%s"] cc.option_define = '-D%s' - cc.compile_options = '%{flags} -MMD -o %{outfile} -c %{infile}' + cc.compile_options = %q[%{flags} -MMD -o "%{outfile}" -c "%{infile}"] end [conf.cxx].each do |cxx| cxx.command = ENV['TARGET_CXX'] cxx.flags = ENV['TARGET_CXXFLAGS'] cxx.include_paths = ["#{MRUBY_ROOT}/include"] - cxx.option_include_path = '-I%s' + cxx.option_include_path = %q[-I"%s"] cxx.option_define = '-D%s' - cxx.compile_options = '%{flags} -MMD -o %{outfile} -c %{infile}' + cxx.compile_options = %q[%{flags} -MMD -o "%{outfile}" -c "%{infile}"] end conf.linker do |linker| @@ -26,11 +26,11 @@ MRuby::Toolchain.new(:openwrt) do |conf| linker.library_paths = [] linker.option_library = '-l%s' linker.option_library_path = '-L%s' - linker.link_options = '%{flags} -o %{outfile} %{objs} %{flags_before_libraries} %{libs} %{flags_after_libraries}' + linker.link_options = '%{flags} -o "%{outfile}" %{objs} %{flags_before_libraries} %{libs} %{flags_after_libraries}' end conf.archiver do |archiver| archiver.command = ENV['TARGET_AR'] - archiver.archive_options = 'rs %{outfile} %{objs}' + archiver.archive_options = 'rs "%{outfile}" %{objs}' end end diff --git a/tasks/toolchains/visualcpp.rake b/tasks/toolchains/visualcpp.rake index c5f295130..5ad196b8e 100644 --- a/tasks/toolchains/visualcpp.rake +++ b/tasks/toolchains/visualcpp.rake @@ -4,9 +4,9 @@ MRuby::Toolchain.new(:visualcpp) do |conf, _params| # C4013: implicit function declaration cc.flags = [ENV['CFLAGS'] || %w(/c /nologo /W3 /we4013 /Zi /MD /O2 /D_CRT_SECURE_NO_WARNINGS)] cc.defines = %w(MRB_STACK_EXTEND_DOUBLING) - cc.option_include_path = '/I%s' + cc.option_include_path = %q[/I"%s"] cc.option_define = '/D%s' - cc.compile_options = "%{flags} /Fo%{outfile} %{infile}" + cc.compile_options = %Q[%{flags} /Fo"%{outfile}" "%{infile}"] cc.cxx_compile_flag = '/TP' cc.cxx_exception_flag = '/EHs' end @@ -15,9 +15,9 @@ MRuby::Toolchain.new(:visualcpp) do |conf, _params| cxx.command = ENV['CXX'] || 'cl.exe' cxx.flags = [ENV['CXXFLAGS'] || ENV['CFLAGS'] || %w(/c /nologo /W3 /Zi /MD /O2 /EHs /D_CRT_SECURE_NO_WARNINGS)] cxx.defines = %w(MRB_STACK_EXTEND_DOUBLING) - cxx.option_include_path = '/I%s' + cxx.option_include_path = %q[/I"%s"] cxx.option_define = '/D%s' - cxx.compile_options = "%{flags} /Fo%{outfile} %{infile}" + cxx.compile_options = %Q[%{flags} /Fo"%{outfile}" "%{infile}"] cxx.cxx_compile_flag = '/TP' cxx.cxx_exception_flag = '/EHs' end @@ -29,22 +29,22 @@ MRuby::Toolchain.new(:visualcpp) do |conf, _params| linker.library_paths = %w() linker.option_library = '%s.lib' linker.option_library_path = '/LIBPATH:%s' - linker.link_options = "%{flags} /OUT:%{outfile} %{objs} %{flags_before_libraries} %{libs} %{flags_after_libraries}" + linker.link_options = "%{flags} /OUT:"%{outfile}" %{objs} %{flags_before_libraries} %{libs} %{flags_after_libraries}" end conf.archiver do |archiver| archiver.command = ENV['AR'] || 'lib.exe' - archiver.archive_options = '/nologo /OUT:%{outfile} %{objs}' + archiver.archive_options = '/nologo /OUT:"%{outfile}" %{objs}' end conf.yacc do |yacc| yacc.command = ENV['YACC'] || 'bison.exe' - yacc.compile_options = '-o %{outfile} %{infile}' + yacc.compile_options = %q[-o "%{outfile}" "%{infile}"] end conf.gperf do |gperf| gperf.command = 'gperf.exe' - gperf.compile_options = '-L ANSI-C -C -p -j1 -i 1 -g -o -t -N mrb_reserved_word -k"1,3,$" %{infile} > %{outfile}' + gperf.compile_options = %q[-L ANSI-C -C -p -j1 -i 1 -g -o -t -N mrb_reserved_word -k"1,3,$" "%{infile}" > "%{outfile}"] end conf.exts do |exts| |
