Add 'build' DSL method.
Disallow processing Environments until configuration is performed.
This commit is contained in:
1 parent
5720662b7c
commit
f8e6666a2c
90 files changed
+637
-434
No files matched your search
@@ -1,11 +1,13 @@
|
||||
Rscons::Environment.new do |env|
|
||||
env["CPPPATH"] << "src/lib"
|
||||
libmine = env.SharedLibrary("mine", Rscons.glob("src/lib/*.c"))
|
||||
env.Program("test-shared.exe",
|
||||
Rscons.glob("src/*.c"),
|
||||
"LIBPATH" => %w[.],
|
||||
"LIBS" => %w[mine])
|
||||
env.build_after("test-shared.exe", libmine.to_s)
|
||||
env.Program("test-static.exe",
|
||||
Rscons.glob("src/**/*.c"))
|
||||
build do
|
||||
Rscons::Environment.new do |env|
|
||||
env["CPPPATH"] << "src/lib"
|
||||
libmine = env.SharedLibrary("mine", Rscons.glob("src/lib/*.c"))
|
||||
env.Program("test-shared.exe",
|
||||
Rscons.glob("src/*.c"),
|
||||
"LIBPATH" => %w[.],
|
||||
"LIBS" => %w[mine])
|
||||
env.build_after("test-shared.exe", libmine.to_s)
|
||||
env.Program("test-static.exe",
|
||||
Rscons.glob("src/**/*.c"))
|
||||
end
|
||||
end
|
||||
@@ -1,6 +1,8 @@
|
||||
Rscons::Environment.new do |env|
|
||||
File.open("foo.xyz", "wb") do |fh|
|
||||
fh.puts("hi")
|
||||
build do
|
||||
Rscons::Environment.new do |env|
|
||||
File.open("foo.xyz", "wb") do |fh|
|
||||
fh.puts("hi")
|
||||
end
|
||||
env.SharedObject("foo.o", "foo.xyz")
|
||||
end
|
||||
env.SharedObject("foo.o", "foo.xyz")
|
||||
end
|
||||
@@ -1,11 +1,13 @@
|
||||
Rscons::Environment.new do |env|
|
||||
env["CPPPATH"] << "src/lib"
|
||||
libmine = env.SharedLibrary("mine", Rscons.glob("src/lib/*.cc"))
|
||||
env.Program("test-shared.exe",
|
||||
Rscons.glob("src/*.cc"),
|
||||
"LIBPATH" => %w[.],
|
||||
"LIBS" => %w[mine])
|
||||
env.build_after("test-shared.exe", libmine.to_s)
|
||||
env.Program("test-static.exe",
|
||||
Rscons.glob("src/**/*.cc"))
|
||||
build do
|
||||
Rscons::Environment.new do |env|
|
||||
env["CPPPATH"] << "src/lib"
|
||||
libmine = env.SharedLibrary("mine", Rscons.glob("src/lib/*.cc"))
|
||||
env.Program("test-shared.exe",
|
||||
Rscons.glob("src/*.cc"),
|
||||
"LIBPATH" => %w[.],
|
||||
"LIBS" => %w[mine])
|
||||
env.build_after("test-shared.exe", libmine.to_s)
|
||||
env.Program("test-static.exe",
|
||||
Rscons.glob("src/**/*.cc"))
|
||||
end
|
||||
end
|
||||
@@ -1,9 +1,11 @@
|
||||
Rscons::Environment.new do |env|
|
||||
env["CPPPATH"] << "src/lib"
|
||||
libmine = env.SharedLibrary("mine", Rscons.glob("src/lib/*.d"))
|
||||
env.Program("test-shared.exe",
|
||||
Rscons.glob("src/*.c"),
|
||||
"LIBPATH" => %w[.],
|
||||
"LIBS" => %w[mine])
|
||||
env.build_after("test-shared.exe", libmine.to_s)
|
||||
build do
|
||||
Rscons::Environment.new do |env|
|
||||
env["CPPPATH"] << "src/lib"
|
||||
libmine = env.SharedLibrary("mine", Rscons.glob("src/lib/*.d"))
|
||||
env.Program("test-shared.exe",
|
||||
Rscons.glob("src/*.c"),
|
||||
"LIBPATH" => %w[.],
|
||||
"LIBS" => %w[mine])
|
||||
env.build_after("test-shared.exe", libmine.to_s)
|
||||
end
|
||||
end
|
||||
@@ -1,12 +1,14 @@
|
||||
Rscons::Environment.new do |env|
|
||||
env["CPPPATH"] << "src/lib"
|
||||
env["SHLD"] = "gcc"
|
||||
libmine = env.SharedLibrary("mine", Rscons.glob("src/lib/*.c"))
|
||||
env.Program("test-shared.exe",
|
||||
Rscons.glob("src/*.c"),
|
||||
"LIBPATH" => %w[.],
|
||||
"LIBS" => %w[mine])
|
||||
env.build_after("test-shared.exe", libmine.to_s)
|
||||
env.Program("test-static.exe",
|
||||
Rscons.glob("src/**/*.c"))
|
||||
build do
|
||||
Rscons::Environment.new do |env|
|
||||
env["CPPPATH"] << "src/lib"
|
||||
env["SHLD"] = "gcc"
|
||||
libmine = env.SharedLibrary("mine", Rscons.glob("src/lib/*.c"))
|
||||
env.Program("test-shared.exe",
|
||||
Rscons.glob("src/*.c"),
|
||||
"LIBPATH" => %w[.],
|
||||
"LIBS" => %w[mine])
|
||||
env.build_after("test-shared.exe", libmine.to_s)
|
||||
env.Program("test-static.exe",
|
||||
Rscons.glob("src/**/*.c"))
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user