[macruby-changes] [3136] MacRuby/trunk/rubyc.1

source_changes at macosforge.org source_changes at macosforge.org
Fri Dec 18 17:12:52 PST 2009


Revision: 3136
          http://trac.macosforge.org/projects/ruby/changeset/3136
Author:   ernest.prabhakar at gmail.com
Date:     2009-12-18 17:12:49 -0800 (Fri, 18 Dec 2009)
Log Message:
-----------
Updated man page for rubyc

Modified Paths:
--------------
    MacRuby/trunk/rubyc.1

Modified: MacRuby/trunk/rubyc.1
===================================================================
--- MacRuby/trunk/rubyc.1	2009-12-19 00:28:48 UTC (rev 3135)
+++ MacRuby/trunk/rubyc.1	2009-12-19 01:12:49 UTC (rev 3136)
@@ -10,7 +10,9 @@
 .Ar files...
 .Sh DESCRIPTION
 .Nm rubyc
-is a command-line interface to the MacRuby Ahead-of-Time (AOT) compiler. It statically compiles Ruby source code into native machine code (object files), and can then link it (dynamically or statically) into executables or dynamic libraries.
+is a command-line interface to the MacRuby Ahead-of-Time (AOT) compiler. It statically compiles Ruby source code into native machine code (object files), and can then link it (dynamically or statically) into executables or dynamic libraries.  It is typically invoked from
+.Nm ruby_deploy
+rather than being called directly.
 .Pp
 The Ahead-of-Time compilation process has two major advantages. The Ruby code does not need to be parsed and compiled at runtime, which improves the startup time of the program, and the original Ruby source code is no longer available, as it has been compiled down to machine code.
 .Sh OPTIONS
@@ -70,13 +72,7 @@
 .Nm rubyc .
 This option is generally used for internal debugging.
 .El
-.Sh USAGE
-The easiest way to compile an existing project is probably to generate loadable object bundles for every Ruby source file, using the
-.Fl C
-option. These bundles have the .rbo file extension and can be installed in the same directory as the original .rb source files. The MacRuby runtime will always pick .rbo files over .rb files upon #require calls. The source files can be removed later.
-.Pp
-.Dl $ find src/lib -name """*.rb""" -exec rubyc -C {} \e;
-.Pp
+.Sh EXAMPLES
 When used without options,
 .Nm rubyc
 will create a binary executable, like the C compiler.
@@ -106,6 +102,25 @@
 .Dl $ rubyc test.rb code.dylib -o test
 .Dl $ ./test
 .Pp 
+.Sh USAGE
+Generally, you should use
+.Nm ruby
+and
+.Nm irb
+during development, and
+.Nm ruby_deploy
+(via the Xcode target) when deploying Cocoa applications.  However, calling
+.Nm rubyc
+provides greater control, and allows you to create MacRuby gems, libraries, and standalone executables. 
+.Pp
+The easiest way to compile an existing project is to generate loadable object bundles for every Ruby source file, e.g., using the
+.Fl C
+option and the find command:
+.Pp
+.Dl $ find ./lib -name """*.rb""" -exec rubyc -C {} \e;
+.Pp
+This creates bundles with the .rbo file extension in the same directory as the original .rb source files. The MacRuby runtime will always pick .rbo files over .rb files upon #require calls. The source files can then be removed. 
+.Pp
 .Sh SEE ALSO
 .Xr ruby 1 ,
 .Xr irb 1 ,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20091218/1e3610a5/attachment-0001.html>


More information about the macruby-changes mailing list