mirror of
https://github.com/kp2pml30/ya-build.git
synced 2026-02-17 00:14:42 +04:00
expose internal copy target
This commit is contained in:
parent
026de785b7
commit
35ecc7982c
1 changed files with 18 additions and 0 deletions
18
ya-build
18
ya-build
|
|
@ -233,6 +233,19 @@ class AliasTarget < Target
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class CopyTarget < Target
|
||||||
|
def initialize(dest, src)
|
||||||
|
super(dest, [src])
|
||||||
|
end
|
||||||
|
|
||||||
|
protected def dump_rules_impl(buf)
|
||||||
|
end
|
||||||
|
|
||||||
|
def mode()
|
||||||
|
"COPY"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
class Configurator
|
class Configurator
|
||||||
attr_reader :root_src, :root_build, :config, :all
|
attr_reader :root_src, :root_build, :config, :all
|
||||||
|
|
||||||
|
|
@ -471,6 +484,11 @@ EOF
|
||||||
return_target(trg, &blk)
|
return_target(trg, &blk)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def target_copy(dest:, src:, &blk)
|
||||||
|
trg = CopyTarget.new(dest, src)
|
||||||
|
return_target(trg, &blk)
|
||||||
|
end
|
||||||
|
|
||||||
def target_c(output_file:, mode:, root_dir: nil, file: nil, objs: nil, flags: nil, cc: nil, &blk)
|
def target_c(output_file:, mode:, root_dir: nil, file: nil, objs: nil, flags: nil, cc: nil, &blk)
|
||||||
if (mode == "compile") == file.nil?
|
if (mode == "compile") == file.nil?
|
||||||
raise "file must be provided only for compile"
|
raise "file must be provided only for compile"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue