From 9b178b69af460587df7a8716e62732e55b2f97fa Mon Sep 17 00:00:00 2001 From: Laurent Sansonetti Date: Wed, 29 May 2013 20:15:14 +0900 Subject: [PATCH] move ctags to basic project rakefile so that it works with osx --- lib/motion/project.rb | 12 ++++++++++++ lib/motion/project/template/ios.rb | 12 ------------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/motion/project.rb b/lib/motion/project.rb index 4fccd739..724f328e 100644 --- a/lib/motion/project.rb +++ b/lib/motion/project.rb @@ -56,3 +56,15 @@ task :config do puts key.ljust(22) + " : #{map[key].inspect}" end end + +desc "Generate ctags" +task :ctags do + tags_file = 'tags' + config = App.config + if !File.exist?(tags_file) or File.mtime(config.project_file) > File.mtime(tags_file) + bs_files = config.bridgesupport_files + config.vendor_projects.map { |p| Dir.glob(File.join(p.path, '*.bridgesupport')) }.flatten + ctags = File.join(config.bindir, 'ctags') + config = File.join(config.motiondir, 'data', 'bridgesupport-ctags.cfg') + sh "#{ctags} --options=\"#{config}\" #{bs_files.map { |x| '"' + x + '"' }.join(' ')}" + end +end diff --git a/lib/motion/project/template/ios.rb b/lib/motion/project/template/ios.rb index a4fdf5d6..20545828 100644 --- a/lib/motion/project/template/ios.rb +++ b/lib/motion/project/template/ios.rb @@ -139,18 +139,6 @@ task :device => :archive do sh "#{env} #{deploy} #{flags} \"#{device_id}\" \"#{App.config.archive}\"" end -desc "Generate ctags" -task :ctags do - tags_file = 'tags' - config = App.config - if !File.exist?(tags_file) or File.mtime(config.project_file) > File.mtime(tags_file) - bs_files = config.bridgesupport_files + config.vendor_projects.map { |p| Dir.glob(File.join(p.path, '*.bridgesupport')) }.flatten - ctags = File.join(config.bindir, 'ctags') - config = File.join(config.motiondir, 'data', 'bridgesupport-ctags.cfg') - sh "#{ctags} --options=\"#{config}\" #{bs_files.map { |x| '"' + x + '"' }.join(' ')}" - end -end - desc "Create a .a static library" task :static do libs = %w{iPhoneSimulator iPhoneOS}.map do |platform|