From 93ffed2eb2d8fca3749e4951e880e22d7a3c67fe Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Mon, 17 Dec 2018 22:11:11 -0500 Subject: [PATCH] Use "Environment" instead of "Rscons::Environment" in build tests --- build_tests/cfile/Rsconscript | 2 +- build_tests/cfile/error_unknown_extension.rb | 2 +- build_tests/clone_env/Rsconscript | 2 +- build_tests/clone_env/clone_all.rb | 2 +- build_tests/configure/check_c_header_no_fail_set_define.rb | 2 +- build_tests/configure/check_c_header_success_set_define.rb | 2 +- build_tests/configure/check_cfg.rb | 2 +- build_tests/configure/check_cfg_package.rb | 2 +- build_tests/configure/multiple_set_define.rb | 2 +- build_tests/custom_builder/Rsconscript | 2 +- build_tests/custom_builder/build_after.rb | 2 +- build_tests/custom_builder/cvar_expansion.rb | 2 +- build_tests/custom_builder/cvar_lambda.rb | 2 +- build_tests/custom_builder/multiple_targets.rb | 2 +- build_tests/custom_builder/produces.rb | 2 +- build_tests/d/Rsconscript | 2 +- build_tests/header/Rsconscript | 2 +- build_tests/json_to_yaml/Rsconscript | 2 +- build_tests/library/Rsconscript | 2 +- build_tests/library/override_arcmd.rb | 2 +- build_tests/preprocess/Rsconscript | 2 +- build_tests/shared_library/Rsconscript | 2 +- build_tests/shared_library/error_unknown_suffix.rb | 2 +- build_tests/shared_library/shared_library_cxx.rb | 2 +- build_tests/shared_library/shared_library_d.rb | 2 +- build_tests/shared_library/shared_library_set_shld.rb | 2 +- build_tests/simple/Rsconscript | 2 +- build_tests/simple/absolute_source_path.rb | 2 +- build_tests/simple/bc_produces.rb | 2 +- build_tests/simple/build_sources.rb | 2 +- build_tests/simple/builder_no_sources.rb | 2 +- build_tests/simple/cache_command_change.rb | 2 +- build_tests/simple/cache_debugging.rb | 2 +- build_tests/simple/cache_dep_checksum_change.rb | 2 +- build_tests/simple/cache_new_dep1.rb | 2 +- build_tests/simple/cache_new_dep2.rb | 2 +- build_tests/simple/cache_successful_builds_when_one_fails.rb | 2 +- build_tests/simple/cache_user_dep.rb | 2 +- build_tests/simple/cache_varset.rb | 2 +- build_tests/simple/clear_targets.rb | 2 +- build_tests/simple/clone_n_threads.rb | 2 +- build_tests/simple/command.rb | 2 +- build_tests/simple/command_builder.rb | 2 +- build_tests/simple/command_redirect.rb | 2 +- build_tests/simple/cvar_array.rb | 2 +- build_tests/simple/directory.rb | 2 +- build_tests/simple/disassemble.rb | 2 +- build_tests/simple/dump.rb | 2 +- build_tests/simple/error_circular_dependency.rb | 2 +- build_tests/simple/error_circular_dependency2.rb | 2 +- build_tests/simple/error_unknown_suffix.rb | 2 +- build_tests/simple/link_flag_change.rb | 2 +- build_tests/simple/override_cccmd.rb | 2 +- build_tests/simple/override_depfilesuffix.rb | 2 +- build_tests/simple/phony_target.rb | 2 +- build_tests/simple/preprocess.rb | 2 +- build_tests/simple/progsuffix.rb | 2 +- build_tests/simple/progsuffix2.rb | 2 +- build_tests/simple/progsuffix3.rb | 2 +- build_tests/simple/register_target_in_build_hook.rb | 2 +- build_tests/simple/run_builder.rb | 2 +- build_tests/simple/standard_build.rb | 2 +- build_tests/simple/threading.rb | 2 +- build_tests/simple/user_dep_build_order.rb | 2 +- build_tests/simple/user_dependencies.rb | 2 +- build_tests/simple/wait_for_builds_on_failure.rb | 2 +- build_tests/simple_cc/Rsconscript | 2 +- build_tests/simple_cc/cxxsuffix.rb | 2 +- build_tests/simple_cc/preprocess.rb | 2 +- build_tests/two_sources/Rsconscript | 2 +- build_tests/two_sources/assuffix.rb | 2 +- build_tests/two_sources/cache_strict_deps.rb | 2 +- build_tests/two_sources/libsuffix.rb | 2 +- build_tests/two_sources/objsuffix.rb | 2 +- build_tests/typical/backward_compatible_build_hooks.rb | 2 +- build_tests/typical/build_hooks.rb | 2 +- build_tests/typical/carat.rb | 2 +- build_tests/typical/copy.rb | 2 +- build_tests/typical/csuffix.rb | 2 +- build_tests/typical/echo_command_ruby_builder.rb | 2 +- build_tests/typical/echo_command_string.rb | 2 +- build_tests/typical/install.rb | 2 +- build_tests/typical/install_directory.rb | 2 +- build_tests/typical/multiple_targets_same_name.rb | 2 +- build_tests/typical/post_build_hook_expansion.rb | 2 +- 85 files changed, 85 insertions(+), 85 deletions(-) diff --git a/build_tests/cfile/Rsconscript b/build_tests/cfile/Rsconscript index 59be80f..e383baa 100644 --- a/build_tests/cfile/Rsconscript +++ b/build_tests/cfile/Rsconscript @@ -1,5 +1,5 @@ build do - Rscons::Environment.new do |env| + Environment.new do |env| env.CFile("lexer.c", "lexer.l") env.CFile("parser.c", "parser.y") end diff --git a/build_tests/cfile/error_unknown_extension.rb b/build_tests/cfile/error_unknown_extension.rb index a4f93b3..05cceb7 100644 --- a/build_tests/cfile/error_unknown_extension.rb +++ b/build_tests/cfile/error_unknown_extension.rb @@ -1,5 +1,5 @@ build do - Rscons::Environment.new do |env| + Environment.new do |env| env.CFile("file.c", "foo.bar") end end diff --git a/build_tests/clone_env/Rsconscript b/build_tests/clone_env/Rsconscript index 2dfcd39..9df798d 100644 --- a/build_tests/clone_env/Rsconscript +++ b/build_tests/clone_env/Rsconscript @@ -1,5 +1,5 @@ build do - debug = Rscons::Environment.new(echo: :command) do |env| + debug = Environment.new(echo: :command) do |env| env['CFLAGS'] = '-O2' env['CPPFLAGS'] = '-DSTRING="Debug Version"' env.Program('program-debug.exe', Dir['src/*.c']) diff --git a/build_tests/clone_env/clone_all.rb b/build_tests/clone_env/clone_all.rb index 596b759..d8e064c 100644 --- a/build_tests/clone_env/clone_all.rb +++ b/build_tests/clone_env/clone_all.rb @@ -1,5 +1,5 @@ build do - env1 = Rscons::Environment.new(echo: :command) do |env| + env1 = Environment.new(echo: :command) do |env| env['CFLAGS'] = '-O2' env.add_build_hook do |build_op| build_op[:vars]['CPPFLAGS'] = '-DSTRING="Hello"' diff --git a/build_tests/configure/check_c_header_no_fail_set_define.rb b/build_tests/configure/check_c_header_no_fail_set_define.rb index f49d248..1ff17e3 100644 --- a/build_tests/configure/check_c_header_no_fail_set_define.rb +++ b/build_tests/configure/check_c_header_no_fail_set_define.rb @@ -3,7 +3,7 @@ configure do end build do - Rscons::Environment.new(echo: :command) do |env| + Environment.new(echo: :command) do |env| env.Object("simple.o", "simple.c") end end diff --git a/build_tests/configure/check_c_header_success_set_define.rb b/build_tests/configure/check_c_header_success_set_define.rb index f11cb38..8e82084 100644 --- a/build_tests/configure/check_c_header_success_set_define.rb +++ b/build_tests/configure/check_c_header_success_set_define.rb @@ -3,7 +3,7 @@ configure do end build do - Rscons::Environment.new(echo: :command) do |env| + Environment.new(echo: :command) do |env| env.Object("simple.o", "simple.c") end end diff --git a/build_tests/configure/check_cfg.rb b/build_tests/configure/check_cfg.rb index c122f42..4187ba0 100644 --- a/build_tests/configure/check_cfg.rb +++ b/build_tests/configure/check_cfg.rb @@ -3,7 +3,7 @@ configure do end build do - Rscons::Environment.new(echo: :command) do |env| + Environment.new(echo: :command) do |env| env.Program("myconfigtest", "simple.c") end end diff --git a/build_tests/configure/check_cfg_package.rb b/build_tests/configure/check_cfg_package.rb index 59b69d6..6b63385 100644 --- a/build_tests/configure/check_cfg_package.rb +++ b/build_tests/configure/check_cfg_package.rb @@ -3,7 +3,7 @@ configure do end build do - Rscons::Environment.new(echo: :command) do |env| + Environment.new(echo: :command) do |env| env.Program("myconfigtest", "simple.c") end end diff --git a/build_tests/configure/multiple_set_define.rb b/build_tests/configure/multiple_set_define.rb index 9decb3f..da7bf2f 100644 --- a/build_tests/configure/multiple_set_define.rb +++ b/build_tests/configure/multiple_set_define.rb @@ -4,7 +4,7 @@ configure do end build do - Rscons::Environment.new(echo: :command) do |env| + Environment.new(echo: :command) do |env| env.Object("simple.o", "simple.c") end end diff --git a/build_tests/custom_builder/Rsconscript b/build_tests/custom_builder/Rsconscript index 87104f0..01f83a7 100644 --- a/build_tests/custom_builder/Rsconscript +++ b/build_tests/custom_builder/Rsconscript @@ -10,7 +10,7 @@ EOF end build do - Rscons::Environment.new do |env| + Environment.new do |env| env.add_builder(MySource.new) env.MySource('inc.h', []) env.Program('program.exe', Dir['*.c']) diff --git a/build_tests/custom_builder/build_after.rb b/build_tests/custom_builder/build_after.rb index 715369a..93b4bd3 100644 --- a/build_tests/custom_builder/build_after.rb +++ b/build_tests/custom_builder/build_after.rb @@ -1,5 +1,5 @@ build do - Rscons::Environment.new do |env| + Environment.new do |env| env.Command("inc.c", [], "CMD" => %w[ruby gen.rb ${_TARGET}], diff --git a/build_tests/custom_builder/cvar_expansion.rb b/build_tests/custom_builder/cvar_expansion.rb index c16cda1..9bc26e6 100644 --- a/build_tests/custom_builder/cvar_expansion.rb +++ b/build_tests/custom_builder/cvar_expansion.rb @@ -10,7 +10,7 @@ EOF end build do - env = Rscons::Environment.new do |env| + env = Environment.new do |env| env["hdr"] = "inc.h" env["src"] = "program.c" env.add_builder(MySource.new) diff --git a/build_tests/custom_builder/cvar_lambda.rb b/build_tests/custom_builder/cvar_lambda.rb index ea0a3b4..adeba08 100644 --- a/build_tests/custom_builder/cvar_lambda.rb +++ b/build_tests/custom_builder/cvar_lambda.rb @@ -10,7 +10,7 @@ EOF end build do - e1 = Rscons::Environment.new do |env| + e1 = Environment.new do |env| env.add_builder(MySource.new) env["one"] = "5" env[:cfg] = {val: "9"} diff --git a/build_tests/custom_builder/multiple_targets.rb b/build_tests/custom_builder/multiple_targets.rb index d725154..4adf364 100644 --- a/build_tests/custom_builder/multiple_targets.rb +++ b/build_tests/custom_builder/multiple_targets.rb @@ -13,7 +13,7 @@ class CHGen < Rscons::Builder end build do - Rscons::Environment.new do |env| + Environment.new do |env| env.add_builder(CHGen.new) env.CHGen("inc.c", ["program.c"]) env.Program("program.exe", %w[program.c inc.c]) diff --git a/build_tests/custom_builder/produces.rb b/build_tests/custom_builder/produces.rb index d813e66..1ac3d70 100644 --- a/build_tests/custom_builder/produces.rb +++ b/build_tests/custom_builder/produces.rb @@ -1,5 +1,5 @@ build do - Rscons::Environment.new do |env| + Environment.new do |env| env["build_root"] = env.build_root env["inc_h"] = "inc.h" diff --git a/build_tests/d/Rsconscript b/build_tests/d/Rsconscript index a4a7cba..846d4d0 100644 --- a/build_tests/d/Rsconscript +++ b/build_tests/d/Rsconscript @@ -1,5 +1,5 @@ build do - Rscons::Environment.new(echo: :command) do |env| + Environment.new(echo: :command) do |env| env.Program("hello-d.exe", Rscons.glob("*.d")) end end diff --git a/build_tests/header/Rsconscript b/build_tests/header/Rsconscript index 46a95b6..27fb446 100644 --- a/build_tests/header/Rsconscript +++ b/build_tests/header/Rsconscript @@ -1,5 +1,5 @@ build do - Rscons::Environment.new do |env| + Environment.new do |env| env.Program('header.exe', Dir['*.c']) end end diff --git a/build_tests/json_to_yaml/Rsconscript b/build_tests/json_to_yaml/Rsconscript index 33742df..4ba0a4f 100644 --- a/build_tests/json_to_yaml/Rsconscript +++ b/build_tests/json_to_yaml/Rsconscript @@ -1,5 +1,5 @@ build do - Rscons::Environment.new do |env| + Environment.new do |env| require 'json' require 'yaml' env.add_builder(:JsonToYaml) do |target, sources, cache, env, vars| diff --git a/build_tests/library/Rsconscript b/build_tests/library/Rsconscript index 16ff03e..c6a8df5 100644 --- a/build_tests/library/Rsconscript +++ b/build_tests/library/Rsconscript @@ -1,5 +1,5 @@ build do - Rscons::Environment.new(echo: :command) do |env| + Environment.new(echo: :command) do |env| env.Program('library.exe', ['lib.a', 'three.c']) env.Library("lib.a", ['one.c', 'two.c'], 'CPPFLAGS' => ['-Dmake_lib']) end diff --git a/build_tests/library/override_arcmd.rb b/build_tests/library/override_arcmd.rb index 2a27206..10fde32 100644 --- a/build_tests/library/override_arcmd.rb +++ b/build_tests/library/override_arcmd.rb @@ -1,5 +1,5 @@ build do - Rscons::Environment.new(echo: :command) do |env| + Environment.new(echo: :command) do |env| env["ARCMD"] = %w[ar rcf ${_TARGET} ${_SOURCES}] env.Library("lib.a", Rscons.glob("*.c")) end diff --git a/build_tests/preprocess/Rsconscript b/build_tests/preprocess/Rsconscript index cd8a04a..020419a 100644 --- a/build_tests/preprocess/Rsconscript +++ b/build_tests/preprocess/Rsconscript @@ -1,5 +1,5 @@ build do - Rscons::Environment.new do |env| + Environment.new do |env| env.Preprocess("pp", "foo.h") end end diff --git a/build_tests/shared_library/Rsconscript b/build_tests/shared_library/Rsconscript index ef589f1..f6ef61f 100644 --- a/build_tests/shared_library/Rsconscript +++ b/build_tests/shared_library/Rsconscript @@ -1,5 +1,5 @@ build do - Rscons::Environment.new do |env| + Environment.new do |env| env["CPPPATH"] << "src/lib" libmine = env.SharedLibrary("mine", Rscons.glob("src/lib/*.c")) env.Program("test-shared.exe", diff --git a/build_tests/shared_library/error_unknown_suffix.rb b/build_tests/shared_library/error_unknown_suffix.rb index 4573cf2..3552069 100644 --- a/build_tests/shared_library/error_unknown_suffix.rb +++ b/build_tests/shared_library/error_unknown_suffix.rb @@ -1,5 +1,5 @@ build do - Rscons::Environment.new do |env| + Environment.new do |env| File.open("foo.xyz", "wb") do |fh| fh.puts("hi") end diff --git a/build_tests/shared_library/shared_library_cxx.rb b/build_tests/shared_library/shared_library_cxx.rb index 8bdc2bb..f617419 100644 --- a/build_tests/shared_library/shared_library_cxx.rb +++ b/build_tests/shared_library/shared_library_cxx.rb @@ -1,5 +1,5 @@ build do - Rscons::Environment.new do |env| + Environment.new do |env| env["CPPPATH"] << "src/lib" libmine = env.SharedLibrary("mine", Rscons.glob("src/lib/*.cc")) env.Program("test-shared.exe", diff --git a/build_tests/shared_library/shared_library_d.rb b/build_tests/shared_library/shared_library_d.rb index 5cc839b..745c72c 100644 --- a/build_tests/shared_library/shared_library_d.rb +++ b/build_tests/shared_library/shared_library_d.rb @@ -1,5 +1,5 @@ build do - Rscons::Environment.new do |env| + Environment.new do |env| env["CPPPATH"] << "src/lib" libmine = env.SharedLibrary("mine", Rscons.glob("src/lib/*.d")) env.Program("test-shared.exe", diff --git a/build_tests/shared_library/shared_library_set_shld.rb b/build_tests/shared_library/shared_library_set_shld.rb index e87f7db..b399cc4 100644 --- a/build_tests/shared_library/shared_library_set_shld.rb +++ b/build_tests/shared_library/shared_library_set_shld.rb @@ -1,5 +1,5 @@ build do - Rscons::Environment.new do |env| + Environment.new do |env| env["CPPPATH"] << "src/lib" env["SHLD"] = "gcc" libmine = env.SharedLibrary("mine", Rscons.glob("src/lib/*.c")) diff --git a/build_tests/simple/Rsconscript b/build_tests/simple/Rsconscript index d4c09e4..b679de6 100644 --- a/build_tests/simple/Rsconscript +++ b/build_tests/simple/Rsconscript @@ -1,5 +1,5 @@ build do - Rscons::Environment.new do |env| + Environment.new do |env| env.Program('simple.exe', Dir['*.c']) end end diff --git a/build_tests/simple/absolute_source_path.rb b/build_tests/simple/absolute_source_path.rb index d1bd7c7..1e4743d 100644 --- a/build_tests/simple/absolute_source_path.rb +++ b/build_tests/simple/absolute_source_path.rb @@ -1,5 +1,5 @@ build do - Rscons::Environment.new do |env| + Environment.new do |env| tempdir = ENV["TEMP"] || ENV["TMP"] || "/tmp" source_file = File.join(tempdir, "abs.c") File.open(source_file, "w") do |fh| diff --git a/build_tests/simple/bc_produces.rb b/build_tests/simple/bc_produces.rb index 9c52fb6..7638379 100644 --- a/build_tests/simple/bc_produces.rb +++ b/build_tests/simple/bc_produces.rb @@ -13,7 +13,7 @@ class MyObject < Rscons::Builder end build do - Rscons::Environment.new do |env| + Environment.new do |env| env.add_builder(MyObject.new) File.open("test.xyz", "w") do |fh| fh.puts < %w[${CC} -c -o ${_TARGET} -Dfoobar ${_SOURCES}]) end diff --git a/build_tests/simple/override_depfilesuffix.rb b/build_tests/simple/override_depfilesuffix.rb index 7fde120..4cedf4c 100644 --- a/build_tests/simple/override_depfilesuffix.rb +++ b/build_tests/simple/override_depfilesuffix.rb @@ -1,5 +1,5 @@ build do - Rscons::Environment.new(echo: :command) do |env| + Environment.new(echo: :command) do |env| env["DEPFILESUFFIX"] = ".deppy" env.Object("simple.o", "simple.c") end diff --git a/build_tests/simple/phony_target.rb b/build_tests/simple/phony_target.rb index 2590d14..665661d 100644 --- a/build_tests/simple/phony_target.rb +++ b/build_tests/simple/phony_target.rb @@ -1,5 +1,5 @@ build do - Rscons::Environment.new do |env| + Environment.new do |env| env.add_builder(:Checker) do |target, sources, cache, env, vars| unless cache.up_to_date?(target, :Checker, sources, env) puts "Checker #{sources.first}" if env.echo != :off diff --git a/build_tests/simple/preprocess.rb b/build_tests/simple/preprocess.rb index b249e09..9e6191d 100644 --- a/build_tests/simple/preprocess.rb +++ b/build_tests/simple/preprocess.rb @@ -1,5 +1,5 @@ build do - Rscons::Environment.new do |env| + Environment.new do |env| env.Preprocess("simplepp.c", "simple.c") env.Program("simple.exe", "simplepp.c") end diff --git a/build_tests/simple/progsuffix.rb b/build_tests/simple/progsuffix.rb index 7c4d802..29ad125 100644 --- a/build_tests/simple/progsuffix.rb +++ b/build_tests/simple/progsuffix.rb @@ -1,5 +1,5 @@ build do - Rscons::Environment.new do |env| + Environment.new do |env| env["PROGSUFFIX"] = ".out" env.Program("simple", Dir["*.c"]) end diff --git a/build_tests/simple/progsuffix2.rb b/build_tests/simple/progsuffix2.rb index 6e33c16..e1ca8e4 100644 --- a/build_tests/simple/progsuffix2.rb +++ b/build_tests/simple/progsuffix2.rb @@ -1,5 +1,5 @@ build do - Rscons::Environment.new do |env| + Environment.new do |env| env["MYSUFFIX"] = ".out" env.Program("simple${MYSUFFIX}", Dir["*.c"]) end diff --git a/build_tests/simple/progsuffix3.rb b/build_tests/simple/progsuffix3.rb index be99d8e..91ff076 100644 --- a/build_tests/simple/progsuffix3.rb +++ b/build_tests/simple/progsuffix3.rb @@ -1,5 +1,5 @@ build do - Rscons::Environment.new do |env| + Environment.new do |env| env.Program("simple", Dir["*.c"], "PROGSUFFIX" => ".xyz") end end diff --git a/build_tests/simple/register_target_in_build_hook.rb b/build_tests/simple/register_target_in_build_hook.rb index d4bbc5c..7ef07a7 100644 --- a/build_tests/simple/register_target_in_build_hook.rb +++ b/build_tests/simple/register_target_in_build_hook.rb @@ -1,5 +1,5 @@ build do - Rscons::Environment.new do |env| + Environment.new do |env| env.Program("simple.exe", Dir["*.c"]) env.add_build_hook do |build_op| if build_op[:target].end_with?(".o") diff --git a/build_tests/simple/run_builder.rb b/build_tests/simple/run_builder.rb index c31718e..1f56fbc 100644 --- a/build_tests/simple/run_builder.rb +++ b/build_tests/simple/run_builder.rb @@ -6,7 +6,7 @@ class MyObject < Rscons::Builder end build do - Rscons::Environment.new do |env| + Environment.new do |env| env.add_builder(MyObject.new) env.MyObject("simple.o", "simple.c") env.Program("simple.exe", "simple.o") diff --git a/build_tests/simple/standard_build.rb b/build_tests/simple/standard_build.rb index 332a79b..5914cb3 100644 --- a/build_tests/simple/standard_build.rb +++ b/build_tests/simple/standard_build.rb @@ -11,7 +11,7 @@ build do end end - Rscons::Environment.new do |env| + Environment.new do |env| env.add_builder(MyCommand.new) command = %w[gcc -c -o ${_TARGET} ${_SOURCES}] env.MyCommand("simple.o", "simple.c", "CMD" => command) diff --git a/build_tests/simple/threading.rb b/build_tests/simple/threading.rb index acc8606..b6768e1 100644 --- a/build_tests/simple/threading.rb +++ b/build_tests/simple/threading.rb @@ -19,7 +19,7 @@ class NonThreadedTestBuilder < Rscons::Builder end build do - Rscons::Environment.new do |env| + Environment.new do |env| env.add_builder(ThreadedTestBuilder.new) env.add_builder(NonThreadedTestBuilder.new) env.ThreadedTestBuilder("a") diff --git a/build_tests/simple/user_dep_build_order.rb b/build_tests/simple/user_dep_build_order.rb index 2bc1941..a24cced 100644 --- a/build_tests/simple/user_dep_build_order.rb +++ b/build_tests/simple/user_dep_build_order.rb @@ -15,7 +15,7 @@ class TestBuilder < Rscons::Builder end build do - Rscons::Environment.new do |env| + Environment.new do |env| env.add_builder(TestBuilder.new) env.TestBuilder("one", [], "wait_time" => "3") env.TestBuilder("two", [], "wait_time" => "0") diff --git a/build_tests/simple/user_dependencies.rb b/build_tests/simple/user_dependencies.rb index ccec745..63537e3 100644 --- a/build_tests/simple/user_dependencies.rb +++ b/build_tests/simple/user_dependencies.rb @@ -1,5 +1,5 @@ build do - Rscons::Environment.new do |env| + Environment.new do |env| program = env.Program("simple.exe", Dir["*.c"]) env.depends(program, "program.ld") end diff --git a/build_tests/simple/wait_for_builds_on_failure.rb b/build_tests/simple/wait_for_builds_on_failure.rb index 6acb773..b7ee54d 100644 --- a/build_tests/simple/wait_for_builds_on_failure.rb +++ b/build_tests/simple/wait_for_builds_on_failure.rb @@ -12,7 +12,7 @@ class Fail < Rscons::Builder end build do - Rscons::Environment.new do |env| + Environment.new do |env| env.add_builder(Fail.new) 4.times do |i| wait_time = i + 1 diff --git a/build_tests/simple_cc/Rsconscript b/build_tests/simple_cc/Rsconscript index 1400dfc..2bd2d8a 100644 --- a/build_tests/simple_cc/Rsconscript +++ b/build_tests/simple_cc/Rsconscript @@ -1,5 +1,5 @@ build do - Rscons::Environment.new do |env| + Environment.new do |env| env.Program('simple.exe', Dir['*.cc']) end end diff --git a/build_tests/simple_cc/cxxsuffix.rb b/build_tests/simple_cc/cxxsuffix.rb index a5f2dfc..8b3e3c1 100644 --- a/build_tests/simple_cc/cxxsuffix.rb +++ b/build_tests/simple_cc/cxxsuffix.rb @@ -1,5 +1,5 @@ build do - Rscons::Environment.new do |env| + Environment.new do |env| env["CXXSUFFIX"] = %w[.cccc .cc] env["CXXFLAGS"] += %w[-x c++] env.Program("simple.exe", Dir["*.cc"] + Dir["*.cccc"]) diff --git a/build_tests/simple_cc/preprocess.rb b/build_tests/simple_cc/preprocess.rb index 2963a06..1d2100d 100644 --- a/build_tests/simple_cc/preprocess.rb +++ b/build_tests/simple_cc/preprocess.rb @@ -1,5 +1,5 @@ build do - Rscons::Environment.new do |env| + Environment.new do |env| env.Preprocess("simplepp.cc", "simple.cc") env.Program("simple.exe", "simplepp.cc") end diff --git a/build_tests/two_sources/Rsconscript b/build_tests/two_sources/Rsconscript index f1e2dd0..34db499 100644 --- a/build_tests/two_sources/Rsconscript +++ b/build_tests/two_sources/Rsconscript @@ -1,5 +1,5 @@ build do - Rscons::Environment.new(echo: :command) do |env| + Environment.new(echo: :command) do |env| env.Object("one.o", "one.c", 'CPPFLAGS' => ['-DONE']) env.Program('two_sources.exe', ['one.o', 'two.c']) end diff --git a/build_tests/two_sources/assuffix.rb b/build_tests/two_sources/assuffix.rb index 7217ed8..e3959bd 100644 --- a/build_tests/two_sources/assuffix.rb +++ b/build_tests/two_sources/assuffix.rb @@ -1,5 +1,5 @@ build do - Rscons::Environment.new do |env| + Environment.new do |env| env["ASSUFFIX"] = %w[.ssss .sss] env["CFLAGS"] += %w[-S] env.Object("one.ssss", "one.c", "CPPFLAGS" => ["-DONE"]) diff --git a/build_tests/two_sources/cache_strict_deps.rb b/build_tests/two_sources/cache_strict_deps.rb index 1553553..a1b90ab 100644 --- a/build_tests/two_sources/cache_strict_deps.rb +++ b/build_tests/two_sources/cache_strict_deps.rb @@ -11,7 +11,7 @@ class StrictBuilder < Rscons::Builder end build do - Rscons::Environment.new(echo: :command) do |env| + Environment.new(echo: :command) do |env| env.add_builder(StrictBuilder.new) env.Object("one.o", "one.c", "CCFLAGS" => %w[-DONE]) env.Object("two.o", "two.c") diff --git a/build_tests/two_sources/libsuffix.rb b/build_tests/two_sources/libsuffix.rb index ced9d19..dd2a3de 100644 --- a/build_tests/two_sources/libsuffix.rb +++ b/build_tests/two_sources/libsuffix.rb @@ -1,5 +1,5 @@ build do - Rscons::Environment.new() do |env| + Environment.new() do |env| env["LIBSUFFIX"] = %w[.aaaa .aaa] env.Library("one.aaaa", "one.c", "CPPFLAGS" => ["-DONE"]) env.Library("two.aaa", "two.c") diff --git a/build_tests/two_sources/objsuffix.rb b/build_tests/two_sources/objsuffix.rb index 3cdfdef..af366a6 100644 --- a/build_tests/two_sources/objsuffix.rb +++ b/build_tests/two_sources/objsuffix.rb @@ -1,5 +1,5 @@ build do - Rscons::Environment.new do |env| + Environment.new do |env| env["OBJSUFFIX"] = %w[.oooo .ooo] env.Object("one.oooo", "one.c", "CPPFLAGS" => ["-DONE"]) env.Object("two.ooo", "two.c") diff --git a/build_tests/typical/backward_compatible_build_hooks.rb b/build_tests/typical/backward_compatible_build_hooks.rb index 268fe57..270363a 100644 --- a/build_tests/typical/backward_compatible_build_hooks.rb +++ b/build_tests/typical/backward_compatible_build_hooks.rb @@ -5,7 +5,7 @@ class MyObject < Rscons::Builder end build do - Rscons::Environment.new(echo: :command) do |env| + Environment.new(echo: :command) do |env| env.add_builder(MyObject.new) env.append('CPPPATH' => Rscons.glob('src/**')) env.add_build_hook do |build_op| diff --git a/build_tests/typical/build_hooks.rb b/build_tests/typical/build_hooks.rb index 1bc1e3b..f1a210f 100644 --- a/build_tests/typical/build_hooks.rb +++ b/build_tests/typical/build_hooks.rb @@ -1,5 +1,5 @@ build do - Rscons::Environment.new(echo: :command) do |env| + Environment.new(echo: :command) do |env| env.append('CPPPATH' => Rscons.glob('src/**/*/')) env.add_build_hook do |build_op| if File.basename(build_op[:target]) == "one.o" diff --git a/build_tests/typical/carat.rb b/build_tests/typical/carat.rb index f36d8d0..65b3c7b 100644 --- a/build_tests/typical/carat.rb +++ b/build_tests/typical/carat.rb @@ -1,5 +1,5 @@ build do - Rscons::Environment.new(echo: :command) do |env| + Environment.new(echo: :command) do |env| env.append('CPPPATH' => Rscons.glob('src/**').sort) FileUtils.mkdir_p(env.build_root) FileUtils.mv("src/one/one.c", env.build_root) diff --git a/build_tests/typical/copy.rb b/build_tests/typical/copy.rb index 675d689..3629a76 100644 --- a/build_tests/typical/copy.rb +++ b/build_tests/typical/copy.rb @@ -1,5 +1,5 @@ build do - Rscons::Environment.new do |env| + Environment.new do |env| env.Copy("inst.exe", "copy.rb") end end diff --git a/build_tests/typical/csuffix.rb b/build_tests/typical/csuffix.rb index d55a468..1472293 100644 --- a/build_tests/typical/csuffix.rb +++ b/build_tests/typical/csuffix.rb @@ -1,5 +1,5 @@ build do - Rscons::Environment.new do |env| + Environment.new do |env| env["CSUFFIX"] = %w[.yargh .c] env["CFLAGS"] += %w[-x c] env["CPPPATH"] += Rscons.glob("src/**") diff --git a/build_tests/typical/echo_command_ruby_builder.rb b/build_tests/typical/echo_command_ruby_builder.rb index 5e7097a..acf08ec 100644 --- a/build_tests/typical/echo_command_ruby_builder.rb +++ b/build_tests/typical/echo_command_ruby_builder.rb @@ -1,5 +1,5 @@ build do - Rscons::Environment.new do |env| + Environment.new do |env| env.echo = :command env.Install("inst.exe", "install.rb") end diff --git a/build_tests/typical/echo_command_string.rb b/build_tests/typical/echo_command_string.rb index 08d2bcb..4b0be44 100644 --- a/build_tests/typical/echo_command_string.rb +++ b/build_tests/typical/echo_command_string.rb @@ -7,7 +7,7 @@ class MyBuilder < Rscons::Builder end build do - Rscons::Environment.new do |env| + Environment.new do |env| env.echo = :command env.add_builder(MyBuilder.new) env.MyBuilder("foo") diff --git a/build_tests/typical/install.rb b/build_tests/typical/install.rb index d92061b..4077c9b 100644 --- a/build_tests/typical/install.rb +++ b/build_tests/typical/install.rb @@ -1,5 +1,5 @@ build do - Rscons::Environment.new do |env| + Environment.new do |env| env.Install("inst.exe", "install.rb") end end diff --git a/build_tests/typical/install_directory.rb b/build_tests/typical/install_directory.rb index 7879cac..1681cfb 100644 --- a/build_tests/typical/install_directory.rb +++ b/build_tests/typical/install_directory.rb @@ -1,5 +1,5 @@ build do - Rscons::Environment.new do |env| + Environment.new do |env| env.Directory("inst") env.Install("inst", "install_directory.rb") diff --git a/build_tests/typical/multiple_targets_same_name.rb b/build_tests/typical/multiple_targets_same_name.rb index 4ebc864..96405a8 100644 --- a/build_tests/typical/multiple_targets_same_name.rb +++ b/build_tests/typical/multiple_targets_same_name.rb @@ -1,5 +1,5 @@ build do - Rscons::Environment.new do |env| + Environment.new do |env| env["CPPPATH"] << "src/two" env.Object("one.o", "src/one/one.c") env.Object("one.o", "src/two/two.c") diff --git a/build_tests/typical/post_build_hook_expansion.rb b/build_tests/typical/post_build_hook_expansion.rb index 9dc88cc..805816b 100644 --- a/build_tests/typical/post_build_hook_expansion.rb +++ b/build_tests/typical/post_build_hook_expansion.rb @@ -1,5 +1,5 @@ build do - Rscons::Environment.new do |env| + Environment.new do |env| env["CPPPATH"] << "src/two" env.Object("one.o", "src/one/one.c") env.add_post_build_hook do |build_op|