From 78f457a5d57b06e2e28931e46bef2ee64a0de8a9 Mon Sep 17 00:00:00 2001 From: knu Date: Sat, 25 Jan 2003 18:59:34 +0000 Subject: * 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 --- win32/Makefile.sub | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'win32/Makefile.sub') diff --git a/win32/Makefile.sub b/win32/Makefile.sub index 5ba33b1830..50647a60c9 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 -- cgit v1.2.3