summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile32
1 files changed, 23 insertions, 9 deletions
diff --git a/Rakefile b/Rakefile
index 48a2086..c63d269 100644
--- a/Rakefile
+++ b/Rakefile
@@ -20,6 +20,12 @@ task :tests do
" --batch -f ert-run-tests-batch-and-exit"
end
+desc "run test in interactive mode"
+task :itests do
+ sh "#{$EMACS} -Q -L . -l yasnippet-tests.el" +
+ " --eval \"(call-interactively 'ert)\""
+end
+
desc "create a release package"
task :package do
release_dir = "pkg/yasnippet-#{$version}"
@@ -44,6 +50,10 @@ task :release => [:package, 'doc:archive'] do
raise "Not implemented for github yet!"
end
+# rake doc[../htmlize]
+#
+# To do this interactively, load doc/yas-doc-helper, open one of the
+# org files, and do `C-c C-e P'.
desc "Generate document"
task :doc, [:htmlize] do |t, args|
load_path = '-L .'
@@ -76,16 +86,12 @@ namespace :doc do
Dir.glob("doc/stylesheets/*.css").each do |file|
FileUtils.cp file, 'doc/gh-pages/stylesheets'
end
- curRev = `git rev-parse --verify HEAD`.chomp()
+ curRev = `git describe`.chomp()
expRev = IO.read('doc/html-revision').chomp()
if curRev != expRev
raise ("The HTML rev: #{expRev},\n" +
"current rev: #{curRev}!\n")
end
- if !system "git diff-index --quiet HEAD"
- system "git status --untracked-files=no"
- raise "You have uncommitted changes!"
- end
Dir.chdir 'doc/gh-pages' do
sh "git commit -a -m 'Automatic documentation update.\n\n" +
"From #{curRev.chomp()}'"
@@ -98,14 +104,22 @@ end
desc "Compile yasnippet.el into yasnippet.elc"
rule '.elc' => '.el' do |t|
- set_warnings = ""
+ cmdline = $EMACS + ' --batch -L .'
if ENV['warnings']
- set_warnings = " --eval \"(setq byte-compile-warnings #{ENV['warnings']})\""
+ cmdline += " --eval \"(setq byte-compile-warnings #{ENV['warnings']})\""
end
- sh "#{$EMACS} --batch -L . --eval \"(setq byte-compile-error-on-warn t)\"" +
- "#{set_warnings} -f batch-byte-compile #{t.source}"
+ if ENV['Werror']
+ cmdline += " --eval \"(setq byte-compile-error-on-warn #{ENV['Werror']})\""
+ end
+ if ENV['Wlexical']
+ cmdline += " --eval \"(setq byte-compile-force-lexical-warnings #{ENV['Wlexical']})\""
+ end
+ cmdline +=" -f batch-byte-compile #{t.source}"
+
+ sh cmdline
end
task :compile => FileList["yasnippet.el"].ext('elc')
+task :compile_all => FileList["*.el"].ext('elc')
task :default => :doc