summaryrefslogtreecommitdiff
path: root/win32/Makefile.sub
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-01-25 18:59:34 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-01-25 18:59:34 +0000
commit78f457a5d57b06e2e28931e46bef2ee64a0de8a9 (patch)
tree39811750f5d3501bbf07c86f93dd590d35aa406c /win32/Makefile.sub
parentcdc46f0f833cad58fd3a2e3499a6f06a11eebb5c (diff)
* instruby.rb, ext/extmk.rb, Makefile.in, win32/Makefile.sub,
bcc32/Makefile.sub: Replace the complicated MFLAGS/MAKEFLAGS parser with something plain and comprehensible. This fixes a bug where make flags were wrongly reordered and the resulted command line often did not make sense especially when BSD make is used with extra arguments given. Tested with FreeBSD and Linux by me and mswin32, bccwin32 and mingw by usa. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32/Makefile.sub')
-rw-r--r--win32/Makefile.sub19
1 files changed, 12 insertions, 7 deletions
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index 5ba33b1..50647a6 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -169,9 +169,14 @@ OBJS = array.obj \
version.obj \
$(MISSING)
+SCRIPT_ARGS = "--dest-dir=$(DESTDIR)" \
+ "--make=$(MAKE)" \
+ "--mflags=$(MFLAGS)" \
+ "--make-flags=$(MAKEFLAGS)"
+
all: ext miniruby$(EXEEXT) rbconfig.rb \
$(LIBRUBY) $(MISCLIBS)
- @$(MINIRUBY) $(srcdir)/ext/extmk.rb --extstatic=$(EXTSTATIC) --make "$(MAKE)" --make-flags "$(MFLAGS)$(MAKEFLAGS)"
+ @$(MINIRUBY) $(srcdir)/ext/extmk.rb --extstatic=$(EXTSTATIC) $(SCRIPT_ARGS)
ext:
@mkdir $@
@@ -408,12 +413,12 @@ $(RUBYDEF): $(LIBRUBY_A) miniruby$(EXEEXT)
$(AR) $(ARFLAGS)$@ -def:$<
install: rbconfig.rb
- $(MINIRUBY) $(srcdir)/instruby.rb --make-flags "$(MFLAGS)$(MAKEFLAGS)" $(DESTDIR)
- $(MINIRUBY) $(srcdir)/ext/extmk.rb --make "$(MAKE)" --make-flags "$(MFLAGS)$(MAKEFLAGS) DESTDIR=$(DESTDIR)" install
+ $(MINIRUBY) $(srcdir)/instruby.rb $(SCRIPT_ARGS)
+ $(MINIRUBY) $(srcdir)/ext/extmk.rb $(SCRIPT_ARGS) install
what-where no-install: rbconfig.rb
- $(MINIRUBY) $(srcdir)/instruby.rb --make-flags "$(MFLAGS)$(MAKEFLAGS) -n" $(DESTDIR)
- $(MINIRUBY) $(srcdir)/ext/extmk.rb --make "$(MAKE)" --make-flags "$(MFLAGS)$(MAKEFLAGS) -n DESTDIR=$(DESTDIR)" install
+ $(MINIRUBY) $(srcdir)/instruby.rb -n $(SCRIPT_ARGS)
+ $(MINIRUBY) $(srcdir)/ext/extmk.rb -n $(SCRIPT_ARGS) install
clean: clean-ext clean-local
@@ -428,7 +433,7 @@ clean-local:
@if exist *.res del *.res
clean-ext:
- @-$(MINIRUBY) $(srcdir)/ext/extmk.rb --make "$(MAKE)" --make-flags "$(MFLAGS)$(MAKEFLAGS)" clean
+ @-$(MINIRUBY) $(srcdir)/ext/extmk.rb $(SCRIPT_ARGS) clean
distclean: distclean-ext distclean-local
@@ -462,7 +467,7 @@ distclean-local: clean-local
@if exist miniruby$(EXEEXT) del miniruby$(EXEEXT)
distclean-ext:
- @-$(MINIRUBY) $(srcdir)/ext/extmk.rb --make "$(MAKE)" --make-flags "$(MFLAGS)$(MAKEFLAGS)" distclean
+ @-$(MINIRUBY) $(srcdir)/ext/extmk.rb $(SCRIPT_ARGS) distclean
realclean: distclean
@if exist parse.c del parse.c