Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 103 lines (89 sloc) 2.686 kB
80bec90 matz
matz authored
1 #!./miniruby
a2af08d This commit was generated by cvs2svn to compensate for changes in r372,
matz authored
2
80bec90 matz
matz authored
3 load "./rbconfig.rb"
986c389 Initial revision
matz authored
4 include Config
5
9a65bd2 matz
matz authored
6 File.umask(0)
a2af08d This commit was generated by cvs2svn to compensate for changes in r372,
matz authored
7 destdir = ARGV[0] || ''
8
986c389 Initial revision
matz authored
9 $:.unshift CONFIG["srcdir"]+"/lib"
10 require "ftools"
07bb9f2 1.4.0
matz authored
11 require "find"
986c389 Initial revision
matz authored
12
07bb9f2 1.4.0
matz authored
13 exeext = CONFIG["EXEEXT"]
986c389 Initial revision
matz authored
14 if ENV["prefix"]
15 prefix = ENV["prefix"]
16 else
17 prefix = CONFIG["prefix"]
18 end
e83d532 2000-02-17
matz authored
19
986c389 Initial revision
matz authored
20 ruby_install_name = CONFIG["ruby_install_name"]
e83d532 2000-02-17
matz authored
21 version = "/"+CONFIG["MAJOR"]+"."+CONFIG["MINOR"]
776f222 2000-03-13
matz authored
22 arch = "/"+CONFIG["arch"]
e83d532 2000-02-17
matz authored
23
07bb9f2 1.4.0
matz authored
24 bindir = destdir+CONFIG["bindir"]
25 libdir = destdir+CONFIG["libdir"]
776f222 2000-03-13
matz authored
26 rubylibdir = destdir+CONFIG["prefix"]+"/lib/ruby"+version
27 archlibdir = rubylibdir+arch
fa59086 mkmf
matz authored
28 sitelibdir = destdir+CONFIG["sitedir"]+version
776f222 2000-03-13
matz authored
29 sitearchlibdir = sitelibdir+arch
07bb9f2 1.4.0
matz authored
30 mandir = destdir+CONFIG["mandir"] + "/man1"
a2af08d This commit was generated by cvs2svn to compensate for changes in r372,
matz authored
31 wdir = Dir.getwd
986c389 Initial revision
matz authored
32
07bb9f2 1.4.0
matz authored
33 File.makedirs bindir, true
34 File.install ruby_install_name+exeext,
35 "#{bindir}/#{ruby_install_name}#{exeext}", 0755, true
ab206c8 @eban eban
eban authored
36 rubyw = ruby_install_name.sub(/ruby/, '\&w')+exeext
37 if File.exist? rubyw
38 File.install rubyw, "#{bindir}/#{rubyw}", 0755, true
39 end
a2af08d This commit was generated by cvs2svn to compensate for changes in r372,
matz authored
40 for dll in Dir['*.dll']
07bb9f2 1.4.0
matz authored
41 File.install dll, "#{bindir}/#{dll}", 0755, true
a2af08d This commit was generated by cvs2svn to compensate for changes in r372,
matz authored
42 end
07bb9f2 1.4.0
matz authored
43 File.makedirs libdir, true
1b3fa15 @eban eban
eban authored
44 if CONFIG["LIBRUBY"] != CONFIG["LIBRUBY_A"]
45 for lib in [CONFIG["LIBRUBY"]]
46 if File.exist? lib
47 File.install lib, libdir, 0555, true
48 end
a2af08d This commit was generated by cvs2svn to compensate for changes in r372,
matz authored
49 end
50 end
07bb9f2 1.4.0
matz authored
51 Dir.chdir libdir
52 if File.exist? CONFIG["LIBRUBY_SO"]
53 for link in CONFIG["LIBRUBY_ALIASES"].split
54 if File.exist? link
55 File.delete link
56 end
57 File.symlink CONFIG["LIBRUBY_SO"], link
58 print "link #{CONFIG['LIBRUBY_SO']} -> #{link}\n"
59 end
60 end
61 Dir.chdir wdir
776f222 2000-03-13
matz authored
62 File.makedirs rubylibdir, true
e83d532 2000-02-17
matz authored
63 File.makedirs archlibdir, true
64 File.makedirs sitelibdir, true
8b8a531 2000-03-09
matz authored
65 File.makedirs sitearchlibdir, true
07bb9f2 1.4.0
matz authored
66
67 if RUBY_PLATFORM =~ /-aix/
e83d532 2000-02-17
matz authored
68 File.install "ruby.imp", archlibdir, 0644, true
07bb9f2 1.4.0
matz authored
69 end
70
986c389 Initial revision
matz authored
71 Dir.chdir "ext"
cbe7e21 @eban see ChangeLog
eban authored
72 if defined? CROSS_COMPILING
73 system "#{CONFIG['MINIRUBY']} extmk.rb install #{destdir}"
74 else
75 system "../miniruby#{exeext} extmk.rb install #{destdir}"
76 end
986c389 Initial revision
matz authored
77 Dir.chdir CONFIG["srcdir"]
07bb9f2 1.4.0
matz authored
78
a0b0c78 matz
matz authored
79 File.install "sample/irb.rb", "#{bindir}/irb", 0755, true
80
07bb9f2 1.4.0
matz authored
81 Find.find("lib") do |f|
55a393a @knu Install help-message's too.
knu authored
82 next unless /\.rb$/ =~ f || /help-message$/ =~ f
776f222 2000-03-13
matz authored
83 dir = rubylibdir+"/"+File.dirname(f[4..-1])
07bb9f2 1.4.0
matz authored
84 File.makedirs dir, true unless File.directory? dir
85 File.install f, dir, 0644, true
a2af08d This commit was generated by cvs2svn to compensate for changes in r372,
matz authored
86 end
87
88 for f in Dir["*.h"]
e83d532 2000-02-17
matz authored
89 File.install f, archlibdir, 0644, true
07bb9f2 1.4.0
matz authored
90 end
0be6449 new platform [bccwin32] merged.
H_Konishi authored
91 if RUBY_PLATFORM =~ /mswin32|mingw|bccwin32/
e83d532 2000-02-17
matz authored
92 File.makedirs archlibdir + "/win32", true
93 File.install "win32/win32.h", archlibdir + "/win32", 0644, true
986c389 Initial revision
matz authored
94 end
e83d532 2000-02-17
matz authored
95 File.install wdir+'/'+CONFIG['LIBRUBY_A'], archlibdir, 0644, true
a2af08d This commit was generated by cvs2svn to compensate for changes in r372,
matz authored
96
07bb9f2 1.4.0
matz authored
97 File.makedirs mandir, true
eb92668 matz
matz authored
98 File.install "ruby.1", mandir+"/"+ruby_install_name+".1", 0644, true
a2af08d This commit was generated by cvs2svn to compensate for changes in r372,
matz authored
99 Dir.chdir wdir
e83d532 2000-02-17
matz authored
100 File.install "config.h", archlibdir, 0644, true
101 File.install "rbconfig.rb", archlibdir, 0644, true
986c389 Initial revision
matz authored
102 # vi:set sw=2:
Something went wrong with that request. Please try again.