Class: Rscons::Builders::Precompile
- Inherits:
-
Rscons::Builder
- Object
- Rscons::Builder
- Rscons::Builders::Precompile
- Defined in:
- lib/rscons/builders/precompile.rb
Overview
The Precompile builder generates .di interface files from .d source files for D.
Instance Attribute Summary
Attributes inherited from Rscons::Builder
#abssources, #abstarget, #build_step, #cache, #env, #preferred_ld, #side_effects, #sources, #target, #vars
Instance Method Summary collapse
-
#run(options) ⇒ Object
Run the builder to produce a build target.
Methods inherited from Rscons::Builder
#depends, extra_path, #finalize_command, #initialize, name, #name, #print_run_message, #produces, #register_command, #standard_command, #wait_for
Constructor Details
This class inherits a constructor from Rscons::Builder
Instance Method Details
#run(options) ⇒ Object
Run the builder to produce a build target.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/rscons/builders/precompile.rb', line 8 def run() if @command finalize_command else if @sources.find {|s| s.end_with?(*@env.("${DSUFFIX}", @vars))} pcc = @env.("${DC}") if pcc =~ /ldc/ dpc_cmd = "${DPC_CMD:ldc}" else dpc_cmd = "${DPC_CMD:gdc}" end @vars["_TARGET"] = @target @vars["_SOURCES"] = @sources command = @env.build_command(dpc_cmd, @vars) standard_command("Precompile <source>#{Util.short_format_paths(@sources)}<reset>", command) end end end |