Sha256: 66062c467b4f896b413ed2ea895613f868210289ec4249437e2aae649619dcbe
Contents?: true
Size: 910 Bytes
Versions: 1
Compression:
Stored size: 910 Bytes
Contents
require 'mkmf' require 'fileutils' def sys(cmd) puts " -- #{cmd}" unless ret = xsystem(cmd) puts " ==> tail -15 #{CWD}/mkmf.log" puts File.readlines("#{CWD}/mkmf.log").last(15).join("") raise "#{cmd} failed" end ret end CWD = File.expand_path('../', __FILE__) FileUtils.mkdir_p "#{CWD}/dst" xsystem('pwd') # to create mkmf.log before the chdir Dir.chdir("#{CWD}/vendor/jansson-2.9") do sys "./configure --prefix=#{CWD}/dst --disable-shared" unless File.exists?('config.h') sys "touch *" sys "make install" end ENV['CFLAGS'] = "-ggdb -I#{CWD}/dst/include" ENV['LDFLAGS'] = "-L#{CWD}/dst/lib" ENV['LIBS'] = "-ljansson" Dir.chdir("#{CWD}/vendor/ctags") do sys "./configure --prefix=#{CWD}/dst" unless File.exists?('config.h') sys "touch configure aclocal.m4 Makefile.am Makefile.in" sys "make install" end File.open('Makefile', 'w') do |f| f.puts "install:\n\t\n" end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ctags.rb-1.1.3 | ext/extconf.rb |