Sha256: 14bc55a7ba209c3a9cdf62c76e5fa8a16c6a90c4e951a25ed12023c6de34e0d7
Contents?: true
Size: 1.54 KB
Versions: 12
Compression:
Stored size: 1.54 KB
Contents
# -*- coding: UTF-8 -*- require 'mj/tools/subprocess' 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: #{self.fullname} [OPTIONS]... MODULES..." options.separator( "" ) options.separator( "Options" ) 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 warn( "Module is not checked out! Use -u to check it out." ) 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