lib/setup/rake.rb in setup-4.2.0 vs lib/setup/rake.rb in setup-5.0.0

- old
+ new

@@ -1,62 +1,61 @@ require 'setup/install' require 'rake/clean' -setup = Setup::Installer.new - -desc 'Config, setup and then install' -task :all => [:config, :setup, :install] - -desc 'Saves your configurations' -task :config do - setup.exec_config +def session + @session ||= Setup::Session.new(:io=>$stdout) end -desc 'Compiles ruby extentions' -task :setup do - setup.exec_setup -end +namespace :setup do -desc 'Runs unit tests' -task :test do - setup.exec_test -end + desc 'Config, setup and then install' + task :all => [:config, :setup, :install] -desc 'Generate rdoc documentation' -task :rdoc do - setup.exec_rdoc -end + desc 'Saves your configurations' + task :config do + session.config + end -desc 'Generate ri documentation' -task :ri do - setup.exec_ri -end + desc 'Compiles ruby extentions' + task :make do + session.make + end -desc 'Installs files' -task :install do - setup.exec_install -end + desc 'Runs unit tests' + task :test do + session.test + end -desc 'Uninstalls files' -task :uninstall do - setup.exec_uninstall -end + desc 'Generate ri documentation' + task :rdoc do + session.document + end -#desc "Does `make clean' for each extention" -task :makeclean do - setup.exec_clean -end + desc 'Installs files' + task :install do + session.install + end -task :clean => [:makeclean] + desc 'Uninstalls files' + task :uninstall do + session.uninstall + end -#desc "Does `make distclean' for each extention" -task :distclean do - exec_distclean -end + desc "Does `make clean' for each extention" + task :clean do + session.clean + end -task :clobber => [:distclean] + desc "Does `make distclean' for each extention" + task :distclean do + session.distclean + end -desc 'Shows current configuration' -task :show do - setup.exec_show + desc 'Shows current configuration' + task :show do + session.show + end end + +task :clean => ['setup:clean'] +task :clobber => ['setup:distclean']