lib/origen/generator/compiler.rb
# Returns the reference file corresponding to the given source file, the destination
# directory will be created if it doesn't exist.
Returns the reference file corresponding to the given source file, the destination
directory will be created if it doesn't exist.
Returns the reference file corresponding to the given source file the destination directory will be created if it doesn ' t exist .
def reference_file(file, options = {})
        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', '')
        reference = Pathname.new("#{reference_directory}#{sub_dir ? '/' + sub_dir : ''}/#{filename}")
        FileUtils.mkdir_p(reference.dirname.to_s) unless File.exist?(reference.dirname.to_s)
        reference
      end
def reference_file ( file , options = { } ) 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' , '' ) reference = Pathname . new ( "#{reference_directory}#{sub_dir ? '/' + sub_dir : ''}/#{filename}" ) FileUtils . mkdir_p ( reference . dirname . to_s ) unless File . exist? ( reference . dirname . to_s ) reference end
Returns the reference file corresponding to the given source file, the destination
directory will be created if it doesn't exist.
Returns the reference file corresponding to the given source file the destination directory will be created if it doesn ' t exist .
# return @reference_file if @reference_file # filename.gsub!('target', $target.id) if filename =~ /target/ && $target.id # @reference_file = reference
file
<not_specific>
options
<not_specific>