File: Rakefile

package info (click to toggle)
ruby-prof 0.7.3-1.1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 468 kB
  • sloc: ruby: 2,377; ansic: 1,431; makefile: 31
file content (23 lines) | stat: -rw-r--r-- 575 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# We can't use Ruby's standard build procedures
# on Windows because the Ruby executable is
# built with VC++ while here we want to build
# with MingW.  So just roll our own...

require 'fileutils'
require 'rbconfig'

EXTENSION_NAME = "ruby_prof.#{Config::CONFIG["DLEXT"]}"

# This is called when the Windows GEM is installed!
task :install do
  # Gems will pass these two environment variables:
  # RUBYARCHDIR=#{dest_path}
  # RUBYLIBDIR=#{dest_path}
  
  dest_path = ENV['RUBYLIBDIR']

  # Copy the extension
  cp(EXTENSION_NAME, dest_path)
end

task :default => :install