mirror of
https://github.com/kp2pml30/ya-build.git
synced 2026-02-17 08:24:41 +04:00
make config more usable
This commit is contained in:
parent
fc5497f039
commit
cec1ed9038
1 changed files with 9 additions and 1 deletions
10
ya-build
10
ya-build
|
|
@ -58,6 +58,12 @@ class Hash
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class OpenStruct
|
||||||
|
def to_json(options=nil)
|
||||||
|
@table.to_json(options)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def escape_args_to(buf, args)
|
def escape_args_to(buf, args)
|
||||||
args.each { |a|
|
args.each { |a|
|
||||||
buf << ' '
|
buf << ' '
|
||||||
|
|
@ -220,7 +226,7 @@ class Configurator
|
||||||
end
|
end
|
||||||
|
|
||||||
if not extra_conf.nil?
|
if not extra_conf.nil?
|
||||||
cnf = Pathname.new(extra_conf)
|
cnf = Pathname.new(extra_conf).realpath
|
||||||
if cnf.exist?
|
if cnf.exist?
|
||||||
@ya_files.push(cnf)
|
@ya_files.push(cnf)
|
||||||
self.instance_eval(cnf.read, cnf.to_s)
|
self.instance_eval(cnf.read, cnf.to_s)
|
||||||
|
|
@ -316,6 +322,8 @@ EOF
|
||||||
|
|
||||||
run_last_stack()
|
run_last_stack()
|
||||||
|
|
||||||
|
File.write(root_build.join('config.json'), @config.to_json)
|
||||||
|
|
||||||
File.write(root_build.join('rules.ninja'), rules_str)
|
File.write(root_build.join('rules.ninja'), rules_str)
|
||||||
|
|
||||||
build_str = String.new()
|
build_str = String.new()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue