summaryrefslogtreecommitdiff
path: root/common.mk
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-24 10:01:08 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-24 10:01:08 +0000
commit96322412616091404ffef2687df19e9136119ae0 (patch)
tree698d77ddd677c64927fab76f120c9245fa5ff46a /common.mk
parentff9bfed83dc694b87244a5caff7e19e27e16b3a9 (diff)
* common.mk (main): split from exts and makes main program after
building exts with miniruby, to get rid of overwriting running program. [ruby-core:22339] * Makefile.in, win32/Makefile.sub (RUNCMD, MKMAIN_CMD): macros to run script file. * ext/extmk.rb (parse_args): added --command-output option which creates script file to make main program. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'common.mk')
-rw-r--r--common.mk13
1 files changed, 10 insertions, 3 deletions
diff --git a/common.mk b/common.mk
index 85d7050eb4..e01e941ec2 100644
--- a/common.mk
+++ b/common.mk
@@ -122,9 +122,16 @@ BOOTSTRAPRUBY = $(BASERUBY)
COMPILE_PRELUDE = $(MINIRUBY) -I$(srcdir) -rrbconfig $(srcdir)/tool/compile_prelude.rb
-all: encs exts
-exts: $(MKFILES) incs $(PREP) $(RBCONFIG) $(LIBRUBY)
- @$(MINIRUBY) $(srcdir)/ext/extmk.rb --make="$(MAKE)" $(EXTMK_ARGS)
+all: encs exts main
+
+main: exts
+ @$(RUNCMD) $(MKMAIN_CMD) MAKE=$(MAKE)
+
+exts: $(MKMAIN_CMD)
+
+$(MKMAIN_CMD): $(MKFILES) incs $(PREP) $(RBCONFIG) $(LIBRUBY)
+ @$(MINIRUBY) $(srcdir)/ext/extmk.rb --make="$(MAKE)" --command-output=$@ $(EXTMK_ARGS)
+
prog: $(PROGRAM) $(WPROGRAM)
loadpath: $(PREP)