1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/extmk.rb: split --make argument contains options, assume

the first word of --make-flags is always options even unless
  preceeded by -, and ignore letter-case of options if nmake.

* instruby.rb: extract -n option also from --make and
  --make-flags.

* bcc32/Makefile.sub, win32/Makefile.sub: not prepend - to
  $(MFLAGS)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2002-12-30 10:16:53 +00:00
parent 20d146389c
commit fb0b931709
5 changed files with 32 additions and 13 deletions

View file

@ -1,3 +1,15 @@
Mon Dec 30 19:10:30 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* ext/extmk.rb: split --make argument contains options, assume
the first word of --make-flags is always options even unless
preceeded by -, and ignore letter-case of options if nmake.
* instruby.rb: extract -n option also from --make and
--make-flags.
* bcc32/Makefile.sub, win32/Makefile.sub: not prepend - to
$(MFLAGS)
Mon Dec 30 16:44:14 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* string.c (rb_str_substr): should share the shared string if

View file

@ -184,7 +184,7 @@ OBJS = array.obj \
all: miniruby$(EXEEXT) rbconfig.rb \
$(LIBRUBY) $(MISCLIBS)
@.\miniruby$(EXEEXT) $(srcdir)ext/extmk.rb --extstatic=$(EXTSTATIC) --make "$(MAKE)" --make-flags "-$(MFLAGS)$(MAKEFLAGS)"
@.\miniruby$(EXEEXT) $(srcdir)ext/extmk.rb --extstatic=$(EXTSTATIC) --make "$(MAKE)" --make-flags "$(MFLAGS)$(MAKEFLAGS)"
ruby: $(PROGRAM)
rubyw: $(WPROGRAM)
@ -407,8 +407,8 @@ $(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 --make "$(MAKE)" --make-flags "$(MFLAGS)$(MAKEFLAGS)" $(DESTDIR)
$(MINIRUBY) $(srcdir)ext/extmk.rb --make "$(MAKE)" --make-flags "$(MFLAGS)$(MAKEFLAGS) DESTDIR=$(DESTDIR)" install
clean: clean-ext clean-local
@ -425,7 +425,7 @@ clean-local:
@if exist *.il? del *.il?
clean-ext:
@-$(MINIRUBY) $(srcdir)ext/extmk.rb --make "$(MAKE)" --make-flags "-$(MFLAGS)$(MAKEFLAGS)" clean
@-$(MINIRUBY) $(srcdir)ext/extmk.rb --make "$(MAKE)" --make-flags "$(MFLAGS)$(MAKEFLAGS)" clean
distclean: distclean-ext distclean-local
@ -459,7 +459,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 --make "$(MAKE)" --make-flags "$(MFLAGS)$(MAKEFLAGS)" distclean
realclean: distclean
@if exist parse.c del parse.c

View file

@ -105,8 +105,11 @@ getopts('', 'extstatic', 'make:', 'make-flags:')
$force_static = $OPT['extstatic'] == 'static'
$make = $OPT['make'] || $make
$mflags = Shellwords.shellwords($OPT['make-flags'] || "")
$mflags[0].sub!(/^(?=\w+)$/, "-") unless mflags.empty?
$make, *$mflags[0, 0] = Shellwords.shellwords($make)
mflags = $mflags.grep(/^-([^-].*)/) {$1}.join
mflags.downcase! if $nmake == ?m
$continue = mflags.include?(?k)
$dryrun = mflags.include?(?n)

View file

@ -12,9 +12,13 @@ File.umask(0)
getopts("n", "make:", "make-flags:")
$dryrun = $OPT["n"]
Shellwords.shellwords($OPT["make-flags"] || "").grep(/^-[^-]*n/) do
break $dryrun = true
end
mflags = Shellwords.shellwords($OPT["make-flags"] || "")
mflags[0].sub!(/^(?=\w+)$/, "-") unless mflags.empty?
make, *mflags[0, 0] = Shellwords.shellwords($OPT['make'] || ENV["MAKE"] || "")
mflags = mflags.grep(/^-[^-]*/) {$1}.join
mflags.downcase! if /nmake/i == make
$dryrun = true if mflags.include?(?n)
ARGV.delete_if{|x|x[0] == ?-}
destdir = ARGV[0] || ''

View file

@ -171,7 +171,7 @@ OBJS = array.obj \
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) --make "$(MAKE)" --make-flags "$(MFLAGS)$(MAKEFLAGS)"
ext:
@mkdir $@
@ -407,8 +407,8 @@ $(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 --make-flags "$(MFLAGS)$(MAKEFLAGS)" $(DESTDIR)
$(MINIRUBY) $(srcdir)/ext/extmk.rb --make "$(MAKE)" --make-flags "$(MFLAGS)$(MAKEFLAGS) DESTDIR=$(DESTDIR)" install
clean: clean-ext clean-local
@ -423,7 +423,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 --make "$(MAKE)" --make-flags "$(MFLAGS)$(MAKEFLAGS)" clean
distclean: distclean-ext distclean-local
@ -457,7 +457,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 --make "$(MAKE)" --make-flags "$(MFLAGS)$(MAKEFLAGS)" distclean
realclean: distclean
@if exist parse.c del parse.c