Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 412 lines (386 sloc) 14.713 kB
6d571b4 @alloy Moved guts of the code in Rakefile into seperate files in rakelib.
alloy authored
1 require File.expand_path('../builder', __FILE__)
b8cf6a6 @alloy Added available build options to the output of: $ rake -T
alloy authored
2 require 'rake'
3
4 # We monkey-patch the method that Rake uses to display the tasks so we can add
5 # the build options.
6 module Rake
7 class Application
8 def formatted_macruby_options
9 $builder_options.sort_by { |name, _| name }.map do |name, default|
10 default = default.join(',') if default.is_a?(Array)
ac477e5 @alloy Oops, a bit too much indentation.
alloy authored
11 " #{name.ljust(30)} \"#{default}\""
b8cf6a6 @alloy Added available build options to the output of: $ rake -T
alloy authored
12 end.join("\n")
13 end
14
15 alias_method :display_tasks_and_comments_without_macruby_options, :display_tasks_and_comments
16
17 def display_tasks_and_comments
18 display_tasks_and_comments_without_macruby_options
19 puts %{
20 To change any of the default build options, use the rake build task
21 of choice with any of these following option-value pairs:
22
27ca189 @alloy Removed all specfic specs that are to be run from the rake tasks and …
alloy authored
23 Usage: $ rake [task] [option=value, ...]
b8cf6a6 @alloy Added available build options to the output of: $ rake -T
alloy authored
24
25 #{'Option:'.ljust(30)} Default value:
26
27 #{formatted_macruby_options}
28
29 Example:
30
31 $ rake all archs="i386,ppc" framework_instdir="~/Library/Frameworks"
32
33 }
34 end
35 end
36 end
6d571b4 @alloy Moved guts of the code in Rakefile into seperate files in rakelib.
alloy authored
37
38 desc "Build known objects"
39 task :objects => [:config_h, :dtrace_h, :revision_h] do
40 sh "/usr/bin/ruby tool/compile_prelude.rb prelude.rb miniprelude.c.new"
41 if !File.exist?('miniprelude.c') or File.read('miniprelude.c') != File.read('miniprelude.c.new')
42 mv('miniprelude.c.new', 'miniprelude.c')
43 else
44 rm('miniprelude.c.new')
45 end
46 if !File.exist?('prelude.c')
47 touch('prelude.c') # create empty file nevertheless
48 end
49 if !File.exist?('parse.c') or File.mtime('parse.y') > File.mtime('parse.c')
50 sh("/usr/bin/bison -o y.tab.c parse.y")
51 sh("/usr/bin/sed -f ./tool/ytab.sed -e \"/^#/s!y\.tab\.c!parse.c!\" y.tab.c > parse.c.new")
52 if !File.exist?('parse.c') or File.read('parse.c.new') != File.read('parse.c')
53 mv('parse.c.new', 'parse.c')
54 rm_f('parse.o')
55 else
56 rm('parse.c.new')
57 end
58 end
59 if !File.exist?('lex.c') or File.read('lex.c') != File.read('lex.c.blt')
60 cp('lex.c.blt', 'lex.c')
61 end
62 if !File.exist?('node_name.inc') or File.mtime('include/ruby/node.h') > File.mtime('node_name.inc')
63 sh("/usr/bin/ruby -n tool/node_name.rb include/ruby/node.h > node_name.inc")
64 end
65 $builder.build
66 end
67
68 desc "Create miniruby"
69 task :miniruby => :objects do
70 $builder.link_executable('miniruby', OBJS - ['prelude'])
71 end
72
73 desc "Create config file"
74 task :rbconfig => :miniruby do
75 rbconfig = <<EOS
76 # This file was created when MacRuby was built. Any changes made to this file
77 # will be lost the next time MacRuby is built.
78
79 module RbConfig
80 RUBY_VERSION == "#{NEW_RUBY_VERSION}" or
81 raise "ruby lib version (#{NEW_RUBY_VERSION}) doesn't match executable version (\#{RUBY_VERSION})"
82
83 TOPDIR = File.dirname(__FILE__).chomp!("/lib/ruby/#{NEW_RUBY_VERSION}/#{NEW_RUBY_PLATFORM}")
84 DESTDIR = '' unless defined? DESTDIR
85 CONFIG = {}
86 CONFIG["DESTDIR"] = DESTDIR
87 CONFIG["INSTALL"] = '/usr/bin/install -c'
88 CONFIG["prefix"] = (TOPDIR || DESTDIR + "#{FRAMEWORK_USR}")
89 CONFIG["EXEEXT"] = ""
90 CONFIG["ruby_install_name"] = "#{RUBY_INSTALL_NAME}"
91 CONFIG["RUBY_INSTALL_NAME"] = "#{RUBY_INSTALL_NAME}"
92 CONFIG["RUBY_SO_NAME"] = "#{RUBY_SO_NAME}"
93 CONFIG["SHELL"] = "/bin/sh"
94 CONFIG["PATH_SEPARATOR"] = ":"
95 CONFIG["PACKAGE_NAME"] = ""
96 CONFIG["PACKAGE_TARNAME"] = ""
97 CONFIG["PACKAGE_VERSION"] = ""
98 CONFIG["PACKAGE_STRING"] = ""
99 CONFIG["PACKAGE_BUGREPORT"] = ""
100 CONFIG["exec_prefix"] = "$(prefix)"
101 CONFIG["bindir"] = "$(exec_prefix)/bin"
102 CONFIG["sbindir"] = "$(exec_prefix)/sbin"
103 CONFIG["libexecdir"] = "$(exec_prefix)/libexec"
104 CONFIG["datarootdir"] = "$(prefix)/share"
105 CONFIG["datadir"] = "$(datarootdir)"
106 CONFIG["sysconfdir"] = "$(prefix)/etc"
107 CONFIG["sharedstatedir"] = "$(prefix)/com"
108 CONFIG["localstatedir"] = "$(prefix)/var"
109 CONFIG["includedir"] = "$(prefix)/include"
110 CONFIG["oldincludedir"] = "/usr/include"
111 CONFIG["docdir"] = "$(datarootdir)/doc/$(PACKAGE)"
112 CONFIG["infodir"] = "$(datarootdir)/info"
113 CONFIG["htmldir"] = "$(docdir)"
114 CONFIG["dvidir"] = "$(docdir)"
115 CONFIG["pdfdir"] = "$(docdir)"
116 CONFIG["psdir"] = "$(docdir)"
117 CONFIG["libdir"] = "$(exec_prefix)/lib"
118 CONFIG["localedir"] = "$(datarootdir)/locale"
119 CONFIG["mandir"] = "$(datarootdir)/man"
120 CONFIG["DEFS"] = ""
121 CONFIG["ECHO_C"] = "\\\\\\\\c"
122 CONFIG["ECHO_N"] = ""
123 CONFIG["ECHO_T"] = ""
124 CONFIG["LIBS"] = ""
125 CONFIG["build_alias"] = ""
126 CONFIG["host_alias"] = ""
127 CONFIG["target_alias"] = ""
128 CONFIG["BASERUBY"] = "ruby"
129 CONFIG["MAJOR"], CONFIG["MINOR"], CONFIG["TEENY"] = [#{NEW_RUBY_VERSION.scan(/\d+/).map { |x| "\"" + x + "\"" }.join(', ')}]
130 CONFIG["build"] = "i686-apple-darwin9.0.0"
131 CONFIG["build_cpu"] = "i686"
132 CONFIG["build_vendor"] = "apple"
133 CONFIG["build_os"] = "darwin9.0.0"
134 CONFIG["host"] = "i686-apple-darwin9.0.0"
135 CONFIG["host_cpu"] = "i686"
136 CONFIG["host_vendor"] = "apple"
137 CONFIG["host_os"] = "darwin9.0.0"
138 CONFIG["target"] = "i686-apple-darwin9.0.0"
139 CONFIG["target_cpu"] = "i686"
140 CONFIG["target_vendor"] = "apple"
141 CONFIG["target_os"] = "darwin9.0"
0bc95cf fixed rbconfig.rb to use absolute paths + fixed TRY_LINK to use g++, …
Laurent Sansonetti authored
142 CONFIG["CC"] = "/usr/bin/gcc"
6d571b4 @alloy Moved guts of the code in Rakefile into seperate files in rakelib.
alloy authored
143 CONFIG["CFLAGS"] = "-fno-common -pipe $(cflags)"
144 CONFIG["LDFLAGS"] = ""
145 CONFIG["CPPFLAGS"] = "$(cppflags)"
146 CONFIG["OBJEXT"] = "o"
0bc95cf fixed rbconfig.rb to use absolute paths + fixed TRY_LINK to use g++, …
Laurent Sansonetti authored
147 CONFIG["CXX"] = "/usr/bin/g++"
6d571b4 @alloy Moved guts of the code in Rakefile into seperate files in rakelib.
alloy authored
148 CONFIG["CXXFLAGS"] = ""
0bc95cf fixed rbconfig.rb to use absolute paths + fixed TRY_LINK to use g++, …
Laurent Sansonetti authored
149 CONFIG["CPP"] = "/usr/bin/gcc -E"
6d571b4 @alloy Moved guts of the code in Rakefile into seperate files in rakelib.
alloy authored
150 CONFIG["GREP"] = "/usr/bin/grep"
151 CONFIG["EGREP"] = "/usr/bin/grep -E"
152 CONFIG["GNU_LD"] = "no"
153 CONFIG["CPPOUTFILE"] = "-o conftest.i"
154 CONFIG["OUTFLAG"] = "-o "
155 CONFIG["COUTFLAG"] = "-o "
156 CONFIG["RANLIB"] = "ranlib"
157 CONFIG["AR"] = "ar"
158 CONFIG["AS"] = "as"
159 CONFIG["ASFLAGS"] = ""
160 CONFIG["NM"] = ""
161 CONFIG["WINDRES"] = ""
162 CONFIG["DLLWRAP"] = ""
163 CONFIG["OBJDUMP"] = ""
164 CONFIG["LN_S"] = "ln -s"
165 CONFIG["SET_MAKE"] = ""
166 CONFIG["INSTALL_PROGRAM"] = "$(INSTALL)"
167 CONFIG["INSTALL_SCRIPT"] = "$(INSTALL)"
168 CONFIG["INSTALL_DATA"] = "$(INSTALL) -m 644"
169 CONFIG["RM"] = "rm -f"
170 CONFIG["CP"] = "cp"
171 CONFIG["MAKEDIRS"] = "mkdir -p"
172 CONFIG["ALLOCA"] = ""
173 CONFIG["DLDFLAGS"] = ""
174 CONFIG["ARCH_FLAG"] = "#{ARCHFLAGS}"
175 CONFIG["STATIC"] = ""
176 CONFIG["CCDLFLAGS"] = "-fno-common"
177 CONFIG["LDSHARED"] = "$(CC) -dynamic -bundle -undefined suppress -flat_namespace #{ARCHFLAGS}"
178 CONFIG["LDSHAREDXX"] = "$(CXX) -dynamic -bundle -undefined suppress -flat_namespace"
179 CONFIG["DLEXT"] = "bundle"
180 CONFIG["DLEXT2"] = ""
181 CONFIG["LIBEXT"] = "a"
182 CONFIG["LINK_SO"] = ""
183 CONFIG["LIBPATHFLAG"] = " -L%s"
184 CONFIG["RPATHFLAG"] = ""
185 CONFIG["LIBPATHENV"] = "DYLD_LIBRARY_PATH"
0bc95cf fixed rbconfig.rb to use absolute paths + fixed TRY_LINK to use g++, …
Laurent Sansonetti authored
186 CONFIG["TRY_LINK"] = "$(CXX) -o conftest $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(src) $(LIBPATH) $(LDFLAGS) $(ARCH_FLAG) $(LOCAL_LIBS) $(LIBS)"
6d571b4 @alloy Moved guts of the code in Rakefile into seperate files in rakelib.
alloy authored
187 CONFIG["STRIP"] = "strip -A -n"
188 CONFIG["EXTSTATIC"] = ""
189 CONFIG["setup"] = "Setup"
190 CONFIG["PREP"] = "miniruby$(EXEEXT)"
191 CONFIG["EXTOUT"] = ".ext"
192 CONFIG["ARCHFILE"] = ""
193 CONFIG["RDOCTARGET"] = "install-doc"
194 CONFIG["cppflags"] = ""
195 CONFIG["cflags"] = "$(optflags) $(debugflags) $(warnflags)"
def059d building the ripper extension (but not installing it yet)
Laurent Sansonetti authored
196 CONFIG["optflags"] = "-O3"
6d571b4 @alloy Moved guts of the code in Rakefile into seperate files in rakelib.
alloy authored
197 CONFIG["debugflags"] = "-g"
198 CONFIG["warnflags"] = "-Wall -Wno-parentheses"
0bc95cf fixed rbconfig.rb to use absolute paths + fixed TRY_LINK to use g++, …
Laurent Sansonetti authored
199 CONFIG["LIBRUBY_LDSHARED"] = "/usr/bin/gcc -dynamiclib -undefined suppress -flat_namespace"
6d571b4 @alloy Moved guts of the code in Rakefile into seperate files in rakelib.
alloy authored
200 CONFIG["LIBRUBY_DLDFLAGS"] = "-install_name $(libdir)/lib$(RUBY_SO_NAME).dylib -current_version $(MAJOR).$(MINOR).$(TEENY) -compatibility_version $(MAJOR).$(MINOR)"
201 CONFIG["rubyw_install_name"] = ""
202 CONFIG["RUBYW_INSTALL_NAME"] = ""
203 CONFIG["LIBRUBY_A"] = "lib$(RUBY_SO_NAME)-static.a"
204 CONFIG["LIBRUBY_SO"] = "lib$(RUBY_SO_NAME).$(MAJOR).$(MINOR).$(TEENY).dylib"
205 CONFIG["LIBRUBY_ALIASES"] = "lib$(RUBY_SO_NAME).$(MAJOR).$(MINOR).dylib lib$(RUBY_SO_NAME).dylib"
206 CONFIG["LIBRUBY"] = "$(LIBRUBY_SO)"
207 CONFIG["LIBRUBYARG"] = "$(LIBRUBYARG_SHARED)"
208 CONFIG["LIBRUBYARG_STATIC"] = "-l$(RUBY_SO_NAME)-static #{LDFLAGS}"
209 CONFIG["LIBRUBYARG_SHARED"] = "-l$(RUBY_SO_NAME)"
210 CONFIG["SOLIBS"] = ""
211 CONFIG["DLDLIBS"] = ""
212 CONFIG["ENABLE_SHARED"] = "yes"
213 CONFIG["ENABLE_STATIC"] = "#{ENABLE_STATIC_LIBRARY}"
214 CONFIG["MAINLIBS"] = ""
215 CONFIG["COMMON_LIBS"] = ""
216 CONFIG["COMMON_MACROS"] = ""
217 CONFIG["COMMON_HEADERS"] = ""
218 CONFIG["EXPORT_PREFIX"] = ""
219 CONFIG["THREAD_MODEL"] = "pthread"
220 CONFIG["MAKEFILES"] = "Makefile"
221 CONFIG["arch"] = "#{NEW_RUBY_PLATFORM}"
222 CONFIG["sitearch"] = "#{NEW_RUBY_PLATFORM}"
223 CONFIG["sitedir"] = "$(libdir)/ruby/site_ruby"
224 CONFIG["vendordir"] = "$(prefix)/lib/ruby/vendor_ruby"
225 CONFIG["configure_args"] = ""
226 CONFIG["rubyhdrdir"] = "$(includedir)/ruby-$(MAJOR).$(MINOR).$(TEENY)"
227 CONFIG["sitehdrdir"] = "$(rubyhdrdir)/site_ruby"
228 CONFIG["vendorhdrdir"] = "$(rubyhdrdir)/vendor_ruby"
229 CONFIG["NROFF"] = "/usr/bin/nroff"
230 CONFIG["MANTYPE"] = "doc"
231 CONFIG["ruby_version"] = "$(MAJOR).$(MINOR).$(TEENY)"
232 CONFIG["rubylibdir"] = "$(libdir)/ruby/$(ruby_version)"
233 CONFIG["archdir"] = "$(rubylibdir)/$(arch)"
234 CONFIG["sitelibdir"] = "$(sitedir)/$(ruby_version)"
235 CONFIG["sitearchdir"] = "$(sitelibdir)/$(sitearch)"
236 CONFIG["vendorlibdir"] = "$(vendordir)/$(ruby_version)"
237 CONFIG["vendorarchdir"] = "$(vendorlibdir)/$(sitearch)"
238 CONFIG["topdir"] = File.dirname(__FILE__)
239 MAKEFILE_CONFIG = {}
240 CONFIG.each{|k,v| MAKEFILE_CONFIG[k] = v.dup}
241 def RbConfig::expand(val, config = CONFIG)
242 val.gsub!(/\\$\\$|\\$\\(([^()]+)\\)|\\$\\{([^{}]+)\\}/) do
243 var = $&
244 if !(v = $1 || $2)
245 '$'
246 elsif key = config[v = v[/\\A[^:]+(?=(?::(.*?)=(.*))?\\z)/]]
247 pat, sub = $1, $2
248 config[v] = false
249 RbConfig::expand(key, config)
250 config[v] = key
251 key = key.gsub(/\#{Regexp.quote(pat)}(?=\\s|\\z)/n) {sub} if pat
252 key
253 else
254 var
255 end
256 end
257 val
258 end
259 CONFIG.each_value do |val|
260 RbConfig::expand(val)
261 end
262 end
263 Config = RbConfig # compatibility for ruby-1.8.4 and older.
264 CROSS_COMPILING = nil
265 RUBY_FRAMEWORK = true
266 RUBY_FRAMEWORK_VERSION = RbConfig::CONFIG['ruby_version']
267 EOS
268 if !File.exist?('rbconfig.rb') or File.read('rbconfig.rb') != rbconfig
269 File.open('rbconfig.rb', 'w') { |io| io.print rbconfig }
270 end
271 end
272
273 namespace :macruby do
274 desc "Build dynamic libraries for MacRuby"
275 task :dylib => [:rbconfig, :miniruby] do
8c5a2dd let's go further miniruby
Laurent Sansonetti authored
276 =begin
6d571b4 @alloy Moved guts of the code in Rakefile into seperate files in rakelib.
alloy authored
277 sh("./miniruby -I. -I./lib -rrbconfig tool/compile_prelude.rb prelude.rb gem_prelude.rb prelude.c.new")
278 if !File.exist?('prelude.c') or File.read('prelude.c') != File.read('prelude.c.new')
279 mv('prelude.c.new', 'prelude.c')
280 $builder.build(['prelude'])
281 else
282 rm('prelude.c.new')
283 end
8c5a2dd let's go further miniruby
Laurent Sansonetti authored
284 =end
285 cp('miniprelude.c', 'prelude.c')
6d571b4 @alloy Moved guts of the code in Rakefile into seperate files in rakelib.
alloy authored
286 dylib = "lib#{RUBY_SO_NAME}.#{NEW_RUBY_VERSION}.dylib"
287 $builder.link_dylib(dylib, $builder.objs - ['main', 'gc-stub', 'miniprelude'])
288 major, minor, teeny = NEW_RUBY_VERSION.scan(/\d+/)
289 ["lib#{RUBY_SO_NAME}.#{major}.#{minor}.dylib", "lib#{RUBY_SO_NAME}.dylib"].each do |dylib_alias|
290 if !File.exist?(dylib_alias) or File.readlink(dylib_alias) != dylib
291 rm_f(dylib_alias)
292 ln_s(dylib, dylib_alias)
293 end
294 end
295 end
296
297 desc "Build static libraries for MacRuby"
298 task :static => :dylib do
299 $builder.link_archive("lib#{RUBY_SO_NAME}-static.a", $builder.objs - ['main', 'gc-stub', 'miniprelude'])
300 end
301
302 desc "Build MacRuby"
303 task :build => :dylib do
304 $builder.link_executable(RUBY_INSTALL_NAME, ['main', 'gc-stub'], "-L. -l#{RUBY_SO_NAME} -lobjc")
305 end
306 end
307
308 DESTDIR = (ENV['DESTDIR'] or "")
309 EXTOUT = (ENV['EXTOUT'] or ".ext")
310 INSTALLED_LIST = '.installed.list'
311 SCRIPT_ARGS = "--make=\"/usr/bin/make\" --dest-dir=\"#{DESTDIR}\" --extout=\"#{EXTOUT}\" --mflags=\"\" --make-flags=\"\""
312 EXTMK_ARGS = "#{SCRIPT_ARGS} --extension --extstatic"
313 INSTRUBY_ARGS = "#{SCRIPT_ARGS} --data-mode=0644 --prog-mode=0755 --installed-list #{INSTALLED_LIST} --mantype=\"doc\" --sym-dest-dir=\"#{SYM_INSTDIR}\""
314
0bc95cf fixed rbconfig.rb to use absolute paths + fixed TRY_LINK to use g++, …
Laurent Sansonetti authored
315 EXTENSIONS = ['ripper', 'digest']
1f30d04 better code path to deal with extensions
Laurent Sansonetti authored
316 def perform_extensions_target(target)
317 EXTENSIONS.map { |x| File.join('ext', x) }.each do |ext_dir|
318 Dir.glob(File.join(ext_dir, '**/extconf.rb')) do |p|
319 dir = File.dirname(p)
320 Dir.chdir(dir) do
321 srcdir = File.join(*dir.split(File::SEPARATOR).map { |x| '..' })
322 if !File.exist?('Makefile') or File.mtime('extconf.rb') > File.mtime('Makefile')
323 sh "#{srcdir}/miniruby -I#{srcdir} -I#{srcdir}/lib extconf.rb"
324 end
325 line = "/usr/bin/make top_srcdir=#{srcdir} ruby=\"#{srcdir}/miniruby -I#{srcdir} -I#{srcdir}/lib\""
326 case target
327 when :all
328 line << " libdir=#{srcdir}"
329 else
0bc95cf fixed rbconfig.rb to use absolute paths + fixed TRY_LINK to use g++, …
Laurent Sansonetti authored
330 line << " #{target}"
1f30d04 better code path to deal with extensions
Laurent Sansonetti authored
331 end
332 sh line
0bc95cf fixed rbconfig.rb to use absolute paths + fixed TRY_LINK to use g++, …
Laurent Sansonetti authored
333 rm_f 'Makefile' if target == :clean
1f30d04 better code path to deal with extensions
Laurent Sansonetti authored
334 end
335 end
336 end
337 end
338
6d571b4 @alloy Moved guts of the code in Rakefile into seperate files in rakelib.
alloy authored
339 desc "Build extensions"
340 task :extensions => [:miniruby, "macruby:static"] do
8c5a2dd let's go further miniruby
Laurent Sansonetti authored
341 =begin
6d571b4 @alloy Moved guts of the code in Rakefile into seperate files in rakelib.
alloy authored
342 sh "./miniruby -I./lib -I.ext/common -I./- -r./ext/purelib.rb ext/extmk.rb #{EXTMK_ARGS}"
8c5a2dd let's go further miniruby
Laurent Sansonetti authored
343 =end
1f30d04 better code path to deal with extensions
Laurent Sansonetti authored
344 perform_extensions_target(:all)
6d571b4 @alloy Moved guts of the code in Rakefile into seperate files in rakelib.
alloy authored
345 end
346
0bc95cf fixed rbconfig.rb to use absolute paths + fixed TRY_LINK to use g++, …
Laurent Sansonetti authored
347 desc "Same as extensions"
348 task :ext => 'extensions'
349
6d571b4 @alloy Moved guts of the code in Rakefile into seperate files in rakelib.
alloy authored
350 namespace :framework do
351 desc "Create the plist file for the framework"
352 task :info_plist do
353 plist = <<EOS
354 <?xml version="1.0" encoding="UTF-8"?>
355 <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
356 <plist version="1.0">
357 <dict>
358 <key>CFBundleDevelopmentRegion</key>
359 <string>English</string>
360 <key>CFBundleExecutable</key>
361 <string>Ruby</string>
362 <key>CFBundleName</key>
363 <string>Ruby</string>
364 <key>CFBundleGetInfoString</key>
365 <string>MacRuby Runtime and Library</string>
366 <key>CFBundleIconFile</key>
367 <string></string>
368 <key>CFBundleIdentifier</key>
369 <string>com.apple.macruby</string>
370 <key>CFBundleInfoDictionaryVersion</key>
371 <string>#{MACRUBY_VERSION}</string>
372 <key>CFBundlePackageType</key>
373 <string>FMWK</string>
374 <key>CFBundleShortVersionString</key>
375 <string>#{MACRUBY_VERSION}</string>
376 <key>CFBundleSignature</key>
377 <string>????</string>
378 <key>CFBundleVersion</key>
379 <string>MacRuby-#{MACRUBY_VERSION}</string>
380 <key>NSPrincipalClass</key>
381 <string></string>
382 </dict>
383 </plist>
384 EOS
385 File.open('framework/Info.plist', 'w') { |io| io.print plist }
386 end
387
388 desc "Install the framework"
389 task :install => :info_plist do
1f30d04 better code path to deal with extensions
Laurent Sansonetti authored
390 perform_extensions_target(:install)
6d571b4 @alloy Moved guts of the code in Rakefile into seperate files in rakelib.
alloy authored
391 sh "./miniruby instruby.rb #{INSTRUBY_ARGS}"
392 end
393 end
394
395 namespace :clean do
396 desc "Clean local build files"
397 task :local do
398 $builder.clean
399 ['parse.c', 'lex.c', INSTALLED_LIST, 'Makefile', *Dir['*.inc']].each { |x| rm_f(x) }
400 end
401
402 desc "Clean extension build files"
403 task :ext do
8c5a2dd let's go further miniruby
Laurent Sansonetti authored
404 =begin
6d571b4 @alloy Moved guts of the code in Rakefile into seperate files in rakelib.
alloy authored
405 if File.exist?('./miniruby')
406 sh "./miniruby -I./lib -I.ext/common -I./- -r./ext/purelib.rb ext/extmk.rb #{EXTMK_ARGS} -- clean"
407 end
8c5a2dd let's go further miniruby
Laurent Sansonetti authored
408 =end
0bc95cf fixed rbconfig.rb to use absolute paths + fixed TRY_LINK to use g++, …
Laurent Sansonetti authored
409 perform_extensions_target(:clean)
6d571b4 @alloy Moved guts of the code in Rakefile into seperate files in rakelib.
alloy authored
410 end
b0f57d9 blocked the rake all/install tasks for now
Laurent Sansonetti authored
411 end
Something went wrong with that request. Please try again.