generate sigar_version.c

This commit is contained in:
Doug MacEachern 2009-07-18 15:58:59 -07:00
parent 3e7254f3f7
commit d1622a808d
1 changed files with 7 additions and 1 deletions

View File

@ -1,4 +1,5 @@
require 'mkmf'
require 'rbconfig'
extension_name = 'rbsigar'
@ -84,8 +85,13 @@ unless is_win32
end
system('perl -Mlib=.. -MSigarWrapper -e generate Ruby .')
libname = extension_name + '.' + CONFIG['DLEXT']
system('perl -Mlib=.. -MSigarBuild -e version_file ' +
'ARCHNAME=' + RUBY_PLATFORM + ' ' +
'ARCHLIB=' + libname + ' ' +
'BINNAME=' + libname)
$distcleanfiles = ['rbsigar_generated.rx']
$distcleanfiles = ['rbsigar_generated.rx','sigar_version.c']
#XXX seems mkmf forces basename on srcs
#XXX should be linking against libsigar anyhow
(Dir["../../src/*.c"] + Dir["#{osdir}/*.c"]).each do |file|