Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 86 lines (74 sloc) 2.514 kb
7e6fdc50 » Charlie Savage
2011-09-05 Modernize gem file and remove various custom/home grown solutions tha…
1 # encoding: utf-8
2
3 require "rubygems/package_task"
4 require "rake/extensiontask"
5 require "rake/testtask"
6 require "rdoc/task"
7 require "date"
7ec8a86b » cfis
2008-11-12 Switch to trunk/tags to match standard svn layout.
8
aaf310b0 » Charlie Savage
2011-09-05 Update build instructions.
9 # To release a version of ruby-prof:
10 # * Update version.h
11 # * Update CHANGES
12 # * Update rdocs
13 # * git commit to commit files
14 # * rake clobber to remove extra files
15 # * rake compile to build windows gems
16 # * rake package to create the gems
17 # * Tag the release in git (tag 0.10.1)
18 # * Push to ruybgems.org (gem push pkg/<gem files>)
8ab5d47e » rdp
2011-03-30 version bump, use right posix clock hopefully
19
7e6fdc50 » Charlie Savage
2011-09-05 Modernize gem file and remove various custom/home grown solutions tha…
20 GEM_NAME = 'ruby-prof'
21 SO_NAME = 'ruby_prof'
0a2cc74c » githubsvnclone
2010-02-18 allow for fat binaries
22
7e6fdc50 » Charlie Savage
2011-09-05 Modernize gem file and remove various custom/home grown solutions tha…
23 default_spec = Gem::Specification.load("#{GEM_NAME}.gemspec")
24
25 Rake::ExtensionTask.new do |ext|
26 ext.gem_spec = default_spec
27 ext.name = SO_NAME
28 ext.ext_dir = "ext/#{SO_NAME}"
29 ext.lib_dir = "lib/#{RUBY_VERSION.sub(/\.\d$/, '')}"
30 ext.cross_compile = true
31 ext.cross_platform = ['x86-mswin32-60', 'x86-mingw32-60']
0a2cc74c » githubsvnclone
2010-02-18 allow for fat binaries
32 end
33
7ec8a86b » cfis
2008-11-12 Switch to trunk/tags to match standard svn layout.
34 # Rake task to build the default package
7e6fdc50 » Charlie Savage
2011-09-05 Modernize gem file and remove various custom/home grown solutions tha…
35 Gem::PackageTask.new(default_spec) do |pkg|
0a2cc74c » githubsvnclone
2010-02-18 allow for fat binaries
36 pkg.need_tar = true
7ec8a86b » cfis
2008-11-12 Switch to trunk/tags to match standard svn layout.
37 end
38
7e6fdc50 » Charlie Savage
2011-09-05 Modernize gem file and remove various custom/home grown solutions tha…
39 # Setup Windows Gem
40 if RUBY_PLATFORM.match(/win32|mingw32/)
41 # Windows specification
42 win_spec = default_spec.clone
43 win_spec.platform = Gem::Platform::CURRENT
44 win_spec.files += Dir.glob('lib/**/*.so')
45 win_spec.instance_variable_set(:@cache_file, nil) # Hack to work arond gem issue
46
47 # Unset extensions
48 win_spec.extensions = nil
49
50 # Rake task to build the windows package
51 Gem::PackageTask.new(win_spec) do |pkg|
52 pkg.need_tar = false
53 end
54 end
7ec8a86b » cfis
2008-11-12 Switch to trunk/tags to match standard svn layout.
55
56 # --------- RDoc Documentation ------
57 desc "Generate rdoc documentation"
7e6fdc50 » Charlie Savage
2011-09-05 Modernize gem file and remove various custom/home grown solutions tha…
58 RDoc::Task.new("rdoc") do |rdoc|
7ec8a86b » cfis
2008-11-12 Switch to trunk/tags to match standard svn layout.
59 rdoc.rdoc_dir = 'doc'
60 rdoc.title = "ruby-prof"
61 # Show source inline with line numbers
62 rdoc.options << "--inline-source" << "--line-numbers"
63 # Make the readme file the start page for the generated html
0448568d » skaes
2010-07-21 started documenting changes
64 rdoc.options << '--main' << 'README.rdoc'
7ec8a86b » cfis
2008-11-12 Switch to trunk/tags to match standard svn layout.
65 rdoc.rdoc_files.include('bin/**/*',
66 'doc/*.rdoc',
67 'examples/flat.txt',
68 'examples/graph.txt',
69 'examples/graph.html',
70 'lib/**/*.rb',
f96abd46 » githubsvnclone
2010-02-18 use new dir structure
71 'ext/ruby_prof/ruby_prof.c',
72 'ext/ruby_prof/version.h',
73 'ext/ruby_prof/measure_*.h',
0448568d » skaes
2010-07-21 started documenting changes
74 'README.rdoc',
7ec8a86b » cfis
2008-11-12 Switch to trunk/tags to match standard svn layout.
75 'LICENSE')
76 end
77
78 task :default => :package
79
80 desc 'Run the ruby-prof test suite'
81 Rake::TestTask.new do |t|
82 t.libs += %w(lib ext test)
dd3972a5 » cfis
2008-11-30 Removed unused test, update test task to call test_suite.
83 t.test_files = Dir['test/test_suite.rb']
7ec8a86b » cfis
2008-11-12 Switch to trunk/tags to match standard svn layout.
84 t.verbose = true
85 t.warning = true
7e6fdc50 » Charlie Savage
2011-09-05 Modernize gem file and remove various custom/home grown solutions tha…
86 end
Something went wrong with that request. Please try again.