lib/origen/generator/compiler.rb
# Returns the output file corresponding to the given source file, the destination
# directory will be created if it doesn't exist.
Returns the output file corresponding to the given source file, the destination
directory will be created if it doesn't exist.
Returns the output file corresponding to the given source file the destination directory will be created if it doesn ' t exist .
def output_file(file, options = {})
        options = {
          output_directory: output_directory
        }.merge(options)
        sub_dir = options[:output_sub_dir] || Origen.file_handler.sub_dir_of(file).to_s
        sub_dir = nil if sub_dir == '.'
        filename = options[:output_file_name] || file.basename.to_s.gsub('.erb', '')
        output = Pathname.new("#{options[:output_directory]}#{sub_dir ? '/' + sub_dir : ''}/#{filename}")
        FileUtils.mkdir_p(output.dirname.to_s) unless File.exist?(output.dirname.to_s)
        output
      end
def output_file ( file , options = { } ) options = { output_directory : output_directory } . merge ( options ) sub_dir = options [ :output_sub_dir ] || Origen . file_handler . sub_dir_of ( file ) . to_s sub_dir = nil if sub_dir == '.' filename = options [ :output_file_name ] || file . basename . to_s . gsub ( '.erb' , '' ) output = Pathname . new ( "#{options[:output_directory]}#{sub_dir ? '/' + sub_dir : ''}/#{filename}" ) FileUtils . mkdir_p ( output . dirname . to_s ) unless File . exist? ( output . dirname . to_s ) output end
Returns the output file corresponding to the given source file, the destination
directory will be created if it doesn't exist.
Returns the output file corresponding to the given source file the destination directory will be created if it doesn ' t exist .
# return @output_file if @output_file # filename.gsub!('target', $target.id) if filename =~ /target/ && $target.id # @output_file = output
file
<not_specific>
options
<not_specific>