Skip to content

Commit

Permalink
Rakefile can generate tags
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobstanley committed Apr 30, 2012
1 parent 70b2220 commit 32e9c93
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
/build/
*.swp
tags
libtags
22 changes: 15 additions & 7 deletions rakefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
require 'rake/clean'

CLOBBER.include('build/')
CLEAN.include('build/', 'tags')
CLOBBER.include('libtags')
PROJECT = 'ntp'
MAKEFILE = 'build/Makefile'
OUTPUT = "build/#{PROJECT}.elf"

task :default => :upload
task :default => [:tags, :upload]

task :rebuild => [:clean, :upload]
task :rebuild => [:clean, :tags, :upload]

task :make => OUTPUT

Expand All @@ -19,10 +20,6 @@ end

task :configure => MAKEFILE

task :clean do
rm_rf 'build'
end

file MAKEFILE do
mkdir 'build'
cd 'build' do
Expand All @@ -35,3 +32,14 @@ file OUTPUT => MAKEFILE do
sh "make #{PROJECT}"
end
end

file 'libtags' do
sh 'ctags -f libtags --tag-relative --extra=+fq -R --exclude=numpy /usr/include/'
sh 'ctags -f libtags --tag-relative --extra=+fq -R -a /usr/lib/avr/include/'
sh 'ctags -f libtags --tag-relative --extra=+fq -R -a ~/arduino-1.0/hardware/arduino/cores/arduino/'
sh 'ctags -f libtags --tag-relative --extra=+fq -R -a ~/arduino-1.0/libraries/'
end

task :tags => 'libtags' do
sh 'ctags -f tags --tag-relative --extra=+fq -R ./src/'
end

0 comments on commit 32e9c93

Please sign in to comment.