• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythonwindowsphpgamebathyscaphegui翻訳comegattwitterframeworkbtronvb.net計画中(planning stage)testdomarduinodirectxpreviewerゲームエンジン

Commit MetaInfo

Revisionddf0d749bc1147f7625404efa5f106df7694e368 (tree)
Zeit2009-03-31 01:15:08
Autorsoutaro <soutaro@f836...>
Commitersoutaro

Log Message

setup.rb updated to current version (svn)

git-svn-id: http://dev.ikejima.org/src/svn/pragger/trunk@400 f8368ae4-1e99-dc11-9799-0018f35ab5fa

Ändern Zusammenfassung

Diff

--- a/setup/setup.rb
+++ b/setup/setup.rb
@@ -1,7 +1,7 @@
11 #
22 # setup.rb
33 #
4-# Copyright (c) 2000-2005 Minero Aoki
4+# Copyright (c) 2000-2006 Minero Aoki
55 #
66 # This program is free software.
77 # You can distribute/modify this program under the terms of
@@ -296,13 +296,14 @@ class ConfigTable
296296 ALIASES.each do |ali, name|
297297 @table[ali] = @table[name]
298298 end
299- @items.freeze
300- @table.freeze
301- @options_re = /\A--(#{@table.keys.join('|')})(?:=(.*))?\z/
299+ end
300+
301+ def options_re
302+ /\A--(#{@table.keys.join('|')})(?:=(.*))?\z/
302303 end
303304
304305 def parse_opt(opt)
305- m = @options_re.match(opt) or setup_rb_error "config: unknown option #{opt}"
306+ m = options_re().match(opt) or setup_rb_error "config: unknown option #{opt}"
306307 m.to_a[1,2]
307308 end
308309
@@ -751,7 +752,7 @@ end
751752 class ToplevelInstaller
752753
753754 Version = '3.4.1'
754- Copyright = 'Copyright (c) 2000-2005 Minero Aoki'
755+ Copyright = 'Copyright (c) 2000-2006 Minero Aoki'
755756
756757 TASKS = [
757758 [ 'all', 'do config, setup, then install' ],
@@ -1343,7 +1344,11 @@ class Installer
13431344 end
13441345
13451346 def install_dir_bin(rel)
1346- install_files targetfiles(), "#{config('bindir')}/#{rel}", 0755
1347+ install_files targetfiles(), "#{config('bindir')}/#{rel}", 0755, strip_ext?
1348+ end
1349+
1350+ def strip_ext?
1351+ /mswin|mingw/ !~ RUBY_PLATFORM
13471352 end
13481353
13491354 def install_dir_lib(rel)
@@ -1371,10 +1376,15 @@ class Installer
13711376 install_files targetfiles(), "#{config('mandir')}/#{rel}", 0644
13721377 end
13731378
1374- def install_files(list, dest, mode)
1379+ def install_files(list, dest, mode, stripext = false)
13751380 mkdir_p dest, @config.install_prefix
13761381 list.each do |fname|
1377- install fname, dest, mode, @config.install_prefix
1382+ if stripext
1383+ install fname, "#{dest}/#{File.basename(fname, '.*')}",
1384+ mode, @config.install_prefix
1385+ else
1386+ install fname, dest, mode, @config.install_prefix
1387+ end
13781388 end
13791389 end
13801390
@@ -1418,7 +1428,7 @@ class Installer
14181428
14191429 def hookfiles
14201430 %w( pre-%s post-%s pre-%s.rb post-%s.rb ).map {|fmt|
1421- %w( config setup install clean ).map {|t| sprintf(fmt, t) }
1431+ %w( config setup install clean distclean ).map {|t| sprintf(fmt, t) }
14221432 }.flatten
14231433 end
14241434
@@ -1556,6 +1566,7 @@ class Installer
15561566 path = [ "#{curr_srcdir()}/#{id}",
15571567 "#{curr_srcdir()}/#{id}.rb" ].detect {|cand| File.file?(cand) }
15581568 return unless path
1569+ $stderr.puts "invoking hook script #{path}" if verbose?
15591570 begin
15601571 instance_eval File.read(path), path, 1
15611572 rescue