Sha256: 74cd5c7391d8cdd7ddb3f2308eb2d38f608394b35e13420e76edfe2aa856b3dc
Contents?: true
Size: 1.43 KB
Versions: 12
Compression:
Stored size: 1.43 KB
Contents
require 'build-tool/application' require 'build-tool/commands' module BuildTool; module Commands; class CtagsError < BuildTool::Error; end # # BuildCommand # class Ctags < ModuleBasedCommand include MJ::Tools::SubProcess name "ctags" description "run ctags on the module." long_description [ "Invoke ctags for the specified MODULES." ] def initialize_options @options.banner = "Usage: #{Pathname.new($0).basename} #{self.fullname} MODULES..." super end def applicable? BuildTool::Application.instance.has_recipe? end def do_execute_module( mod ) if mod.checkedout? FileUtils.mkdir_p mod.build_prefix_required.join("tags").to_s ctags(mod.source_directory, mod.build_prefix_required.join( "tags", mod.name.gsub( '/', '-' ) + ".tags" )) else logger.warn "Module is not checked out! Use -u to check it out." logger.warn "skipped!" end end def ctags( source, tagsfile ) rc = self.class.execute "ctags -R -f #{tagsfile} #{source}" if rc != 0 raise CtagsError, "ctags failed with error #{rc}!" end rc end end # class Build end; end # module BuildTool::Commands
Version data entries
12 entries across 12 versions & 1 rubygems