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
@@ -19,6 +19,11 @@ module Rscons
|
||||
@script.autoconf = autoconf
|
||||
end
|
||||
|
||||
# Enter build block.
|
||||
def build(&block)
|
||||
@script.operations["build"] = block
|
||||
end
|
||||
|
||||
# Enter configuration block.
|
||||
def configure(&block)
|
||||
@script.operations["configure"] = block
|
||||
@@ -81,6 +86,13 @@ module Rscons
|
||||
Dsl.new(self).instance_eval(script_contents, path, 1)
|
||||
end
|
||||
|
||||
# Perform build operation.
|
||||
def build
|
||||
if build_proc = @operations["build"]
|
||||
build_proc.call
|
||||
end
|
||||
end
|
||||
|
||||
# Perform configure operation.
|
||||
def configure(configure_op)
|
||||
if operation_lambda = @operations["configure"]
|
||||
|
||||
Reference in new issue
Block a user