path: root/bcc32
diff options
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 /bcc32
parentcdc46f0f833cad58fd3a2e3499a6f06a11eebb5c (diff)
* instruby.rb, ext/extmk.rb,, 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:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bcc32')
1 files changed, 12 insertions, 7 deletions
diff --git a/bcc32/Makefile.sub b/bcc32/Makefile.sub
index c2eb07f..c16430c 100644
--- a/bcc32/Makefile.sub
+++ b/bcc32/Makefile.sub
@@ -182,9 +182,14 @@ OBJS = array.obj \
version.obj \
+SCRIPT_ARGS = "--dest-dir=$(DESTDIR)" \
+ "--make=$(MAKE)" \
+ "--mflags=$(MFLAGS)" \
+ "--make-flags=$(MAKEFLAGS)"
all: miniruby$(EXEEXT) rbconfig.rb \
- .\miniruby$(EXEEXT) $(srcdir)ext/extmk.rb --extstatic=$(EXTSTATIC) --make "$(MAKE)" --make-flags "$(MFLAGS)$(MAKEFLAGS)"
+ .\miniruby$(EXEEXT) $(srcdir)ext/extmk.rb --extstatic=$(EXTSTATIC) $(SCRIPT_ARGS)
ruby: $(PROGRAM)
rubyw: $(WPROGRAM)
@@ -408,12 +413,12 @@ $(RUBYDEF): $(LIBRUBY_A) miniruby$(EXEEXT)
$(MINIRUBY) $(srcdir)bcc32/mkexports.rb -output=$@ $(LIBRUBY_A)
install: rbconfig.rb
- $(MINIRUBY) $(srcdir)instruby.rb --make "$(MAKE)" --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 "$(MAKE)" --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
@@ -430,7 +435,7 @@ clean-local:
@if exist *.il? del *.il?
- @-$(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
@@ -464,7 +469,7 @@ distclean-local: clean-local
@if exist miniruby$(EXEEXT) del miniruby$(EXEEXT)
- @-$(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