Add shortcut method for creating environments - close #149

Add env() method to create environments.
Process all environments created at build script top level before
executing any autoconf-enabled tasks, or if no tasks are specified by
the user.
This commit is contained in:
josh committed 2022-02-12 21:59:52 -05:00
1 parent 6d5f44d4e5
commit ef7e9259cb
129 files changed
+742 -901

No files matched your search

+3 -5
View File
@@ -1,6 +1,4 @@
default do
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
env(echo: :command) do |env|
env.Program('library.exe', ['lib.a', 'three.c'])
env.Library("lib.a", ['one.c', 'two.c'], 'CPPFLAGS' => ['-Dmake_lib'])
end
+4 -6
View File
@@ -1,7 +1,5 @@
default do
Environment.new do |env|
env.Program("library.exe", ["lib.a", "three.c"])
env.Object("two.o", "two.c")
env.Library("lib.a", ["one.c", "two.o"], 'CPPFLAGS' => ['-Dmake_lib'])
end
env do |env|
env.Program("library.exe", ["lib.a", "three.c"])
env.Object("two.o", "two.c")
env.Library("lib.a", ["one.c", "two.o"], 'CPPFLAGS' => ['-Dmake_lib'])
end
+3 -5
View File
@@ -1,6 +1,4 @@
default do
Environment.new(echo: :command) do |env|
env["ARCMD"] = %w[ar rcf ${_TARGET} ${_SOURCES}]
env.Library("lib.a", glob("*.c"))
end
env(echo: :command) do |env|
env["ARCMD"] = %w[ar rcf ${_TARGET} ${_SOURCES}]
env.Library("lib.a", glob("*.c"))
end