mirror of
https://github.com/kp2pml30/ya-build.git
synced 2026-02-17 00:14:42 +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
|
||||
|
||||
class OpenStruct
|
||||
def to_json(options=nil)
|
||||
@table.to_json(options)
|
||||
end
|
||||
end
|
||||
|
||||
def escape_args_to(buf, args)
|
||||
args.each { |a|
|
||||
buf << ' '
|
||||
|
|
@ -220,7 +226,7 @@ class Configurator
|
|||
end
|
||||
|
||||
if not extra_conf.nil?
|
||||
cnf = Pathname.new(extra_conf)
|
||||
cnf = Pathname.new(extra_conf).realpath
|
||||
if cnf.exist?
|
||||
@ya_files.push(cnf)
|
||||
self.instance_eval(cnf.read, cnf.to_s)
|
||||
|
|
@ -316,6 +322,8 @@ EOF
|
|||
|
||||
run_last_stack()
|
||||
|
||||
File.write(root_build.join('config.json'), @config.to_json)
|
||||
|
||||
File.write(root_build.join('rules.ninja'), rules_str)
|
||||
|
||||
build_str = String.new()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue