mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* Makefile.in, ext/extmk.rb, bcc32/Makefile.sub,
win32/Makefile.sub: Introduce better command line syntax (--make/--make-flags/--extstatic) to extmk.rb and instruby.rb. Previously such command as 'make -j3 install' with pmake doesn't fail. Formerly extmk.rb was receiving "make -j 3 -j 3" via the command line arguments and just ended up recognizing the first "3" as destdir. [with help of usa] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
db9126b073
commit
cdce29bf0f
5 changed files with 40 additions and 27 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
Mon Nov 4 06:28:09 2002 Akinori MUSHA <knu@iDaemons.org>
|
||||||
|
|
||||||
|
* Makefile.in, ext/extmk.rb, bcc32/Makefile.sub,
|
||||||
|
win32/Makefile.sub: Introduce better command line syntax
|
||||||
|
(--make/--make-flags/--extstatic) to extmk.rb and instruby.rb.
|
||||||
|
Previously such command as 'make -j3 install' with pmake doesn't
|
||||||
|
fail. Formerly extmk.rb was receiving "make -j 3 -j 3" via the
|
||||||
|
command line arguments and just ended up recognizing the first
|
||||||
|
"3" as destdir. [with help of usa]
|
||||||
|
|
||||||
Mon Nov 4 03:59:51 2002 Akinori MUSHA <knu@iDaemons.org>
|
Mon Nov 4 03:59:51 2002 Akinori MUSHA <knu@iDaemons.org>
|
||||||
|
|
||||||
* lib/getopts.rb: Do not choke on characters that cannot be used
|
* lib/getopts.rb: Do not choke on characters that cannot be used
|
||||||
|
|
10
Makefile.in
10
Makefile.in
|
@ -99,7 +99,7 @@ OBJS = array.@OBJEXT@ \
|
||||||
$(MISSING)
|
$(MISSING)
|
||||||
|
|
||||||
all: @MAKEFILES@ miniruby$(EXEEXT) rbconfig.rb $(LIBRUBY)
|
all: @MAKEFILES@ miniruby$(EXEEXT) rbconfig.rb $(LIBRUBY)
|
||||||
@$(MINIRUBY) $(srcdir)/ext/extmk.rb @EXTSTATIC@ $(MAKE) $(MFLAGS)$(MAKEFLAGS)
|
@$(MINIRUBY) $(srcdir)/ext/extmk.rb --extstatic="@EXTSTATIC@" --make="$(MAKE)" --make-flags="$(MFLAGS)$(MAKEFLAGS)"
|
||||||
|
|
||||||
miniruby$(EXEEXT): config.status $(LIBRUBY_A) $(MAINOBJ) dmyext.@OBJEXT@
|
miniruby$(EXEEXT): config.status $(LIBRUBY_A) $(MAINOBJ) dmyext.@OBJEXT@
|
||||||
@rm -f $@
|
@rm -f $@
|
||||||
|
@ -124,11 +124,11 @@ ruby.imp: $(LIBRUBY_A)
|
||||||
# $(MINIRUBY) $< $@
|
# $(MINIRUBY) $< $@
|
||||||
|
|
||||||
install: rbconfig.rb
|
install: rbconfig.rb
|
||||||
$(MINIRUBY) $(srcdir)/instruby.rb --make=$(MAKE) $(MFLAGS)$(MAKEFLAGS) $(DESTDIR)
|
$(MINIRUBY) $(srcdir)/instruby.rb --make="$(MAKE)" --make-flags="$(MFLAGS)$(MAKEFLAGS)" $(DESTDIR)
|
||||||
$(MINIRUBY) $(srcdir)/ext/extmk.rb $(MAKE) $(MFLAGS)$(MAKEFLAGS) DESTDIR=$(DESTDIR) install
|
$(MINIRUBY) $(srcdir)/ext/extmk.rb --make="$(MAKE)" --make-flags="$(MFLAGS)$(MAKEFLAGS) DESTDIR=$(DESTDIR)" install
|
||||||
|
|
||||||
clean-ext:
|
clean-ext:
|
||||||
@-$(MINIRUBY) $(srcdir)/ext/extmk.rb $(MAKE) $(MFLAGS)$(MAKEFLAGS) clean 2> /dev/null || true
|
@-$(MINIRUBY) $(srcdir)/ext/extmk.rb --make="$(MAKE)" --make-flags="$(MFLAGS)$(MAKEFLAGS)" clean 2> /dev/null || true
|
||||||
|
|
||||||
clean-local:
|
clean-local:
|
||||||
@rm -f $(OBJS) $(MAINOBJ) $(LIBRUBY_A) $(LIBRUBY_SO) $(LIBRUBY_ALIASES)
|
@rm -f $(OBJS) $(MAINOBJ) $(LIBRUBY_A) $(LIBRUBY_SO) $(LIBRUBY_ALIASES)
|
||||||
|
@ -138,7 +138,7 @@ clean-local:
|
||||||
clean: clean-ext clean-local
|
clean: clean-ext clean-local
|
||||||
|
|
||||||
distclean-ext:
|
distclean-ext:
|
||||||
@-$(MINIRUBY) $(srcdir)/ext/extmk.rb $(MAKE) $(MFLAGS)$(MAKEFLAGS) distclean 2> /dev/null || true
|
@-$(MINIRUBY) $(srcdir)/ext/extmk.rb --make="$(MAKE)" --make-flags="$(MFLAGS)$(MAKEFLAGS)" distclean 2> /dev/null || true
|
||||||
|
|
||||||
distclean-local: clean-local
|
distclean-local: clean-local
|
||||||
@rm -f @MAKEFILES@ config.h rbconfig.rb
|
@rm -f @MAKEFILES@ config.h rbconfig.rb
|
||||||
|
|
|
@ -184,7 +184,7 @@ OBJS = array.obj \
|
||||||
|
|
||||||
all: miniruby$(EXEEXT) rbconfig.rb \
|
all: miniruby$(EXEEXT) rbconfig.rb \
|
||||||
$(LIBRUBY) $(MISCLIBS)
|
$(LIBRUBY) $(MISCLIBS)
|
||||||
@.\miniruby$(EXEEXT) $(srcdir)ext/extmk.rb $(EXTSTATIC) $(MAKE) -$(MFLAGS)$(MAKEFLAGS)
|
@.\miniruby$(EXEEXT) $(srcdir)ext/extmk.rb --extstatic=$(EXTSTATIC) --make="$(MAKE)" --make-flags="-$(MFLAGS)$(MAKEFLAGS)"
|
||||||
|
|
||||||
ruby: $(PROGRAM)
|
ruby: $(PROGRAM)
|
||||||
rubyw: $(WPROGRAM)
|
rubyw: $(WPROGRAM)
|
||||||
|
@ -405,8 +405,8 @@ $(RUBYDEF): $(LIBRUBY_A) miniruby$(EXEEXT)
|
||||||
$(MINIRUBY) $(srcdir)bcc32/mkexports.rb -output=$@ $(LIBRUBY_A)
|
$(MINIRUBY) $(srcdir)bcc32/mkexports.rb -output=$@ $(LIBRUBY_A)
|
||||||
|
|
||||||
install: rbconfig.rb
|
install: rbconfig.rb
|
||||||
$(MINIRUBY) $(srcdir)instruby.rb -$(MFLAGS)$(MAKEFLAGS) $(DESTDIR)
|
$(MINIRUBY) $(srcdir)instruby.rb --make="$(MAKE)" --make-flags="-$(MFLAGS)$(MAKEFLAGS)" $(DESTDIR)
|
||||||
$(MINIRUBY) $(srcdir)ext/extmk.rb $(MAKE) -$(MFLAGS)$(MAKEFLAGS) DESTDIR=$(DESTDIR) install
|
$(MINIRUBY) $(srcdir)ext/extmk.rb --make="$(MAKE)" --make-flags="-$(MFLAGS)$(MAKEFLAGS) DESTDIR=$(DESTDIR)" install
|
||||||
|
|
||||||
clean: clean-ext clean-local
|
clean: clean-ext clean-local
|
||||||
|
|
||||||
|
@ -423,7 +423,7 @@ clean-local:
|
||||||
@if exist *.il? del *.il?
|
@if exist *.il? del *.il?
|
||||||
|
|
||||||
clean-ext:
|
clean-ext:
|
||||||
@-$(MINIRUBY) $(srcdir)ext/extmk.rb $(MAKE) -$(MFLAGS)$(MAKEFLAGS) clean
|
@-$(MINIRUBY) $(srcdir)ext/extmk.rb --make="$(MAKE)" --make-flags="-$(MFLAGS)$(MAKEFLAGS)" clean
|
||||||
|
|
||||||
distclean: distclean-ext distclean-local
|
distclean: distclean-ext distclean-local
|
||||||
|
|
||||||
|
@ -457,7 +457,7 @@ distclean-local: clean-local
|
||||||
@if exist miniruby$(EXEEXT) del miniruby$(EXEEXT)
|
@if exist miniruby$(EXEEXT) del miniruby$(EXEEXT)
|
||||||
|
|
||||||
distclean-ext:
|
distclean-ext:
|
||||||
@-$(MINIRUBY) $(srcdir)ext/extmk.rb $(MAKE) -$(MFLAGS)$(MAKEFLAGS) distclean
|
@-$(MINIRUBY) $(srcdir)ext/extmk.rb --make="$(MAKE)" --make-flags="-$(MFLAGS)$(MAKEFLAGS)" distclean
|
||||||
|
|
||||||
realclean: distclean
|
realclean: distclean
|
||||||
@if exist parse.c del parse.c
|
@if exist parse.c del parse.c
|
||||||
|
|
29
ext/extmk.rb
29
ext/extmk.rb
|
@ -69,7 +69,7 @@ def extmake(target)
|
||||||
if $static
|
if $static
|
||||||
$extlist.push [$static, $target, File.basename($target)]
|
$extlist.push [$static, $target, File.basename($target)]
|
||||||
end
|
end
|
||||||
unless system *ARGV
|
unless system($make, *$mflags)
|
||||||
$ignore or $continue or exit(1)
|
$ignore or $continue or exit(1)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
@ -93,13 +93,15 @@ def extmake(target)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if ARGV[0] == "static"
|
require 'getopts'
|
||||||
ARGV.shift
|
|
||||||
$force_static = true
|
getopts('', 'extstatic', 'make:', 'make-flags:')
|
||||||
end
|
|
||||||
|
$force_static = $OPT['extstatic']
|
||||||
|
$make = $OPT['make'] || $make
|
||||||
|
$mflags = $OPT['make-flags'] || ""
|
||||||
|
$mflags = Shellwords.shellwords(mflags)
|
||||||
|
|
||||||
$make = ARGV[0] if ARGV[0]
|
|
||||||
ARGV << $make if ARGV.empty? and $make
|
|
||||||
if mflags = ENV["MAKEFLAGS"]
|
if mflags = ENV["MAKEFLAGS"]
|
||||||
mflags, = mflags.split(nil, 2)
|
mflags, = mflags.split(nil, 2)
|
||||||
else
|
else
|
||||||
|
@ -109,14 +111,15 @@ $continue = mflags.include?(?k)
|
||||||
$dryrun = mflags.include?(?n)
|
$dryrun = mflags.include?(?n)
|
||||||
|
|
||||||
unless $message
|
unless $message
|
||||||
if ARGV.size > 1 and /^[a-z]+$/ =~ ($message = ARGV[-1])
|
if $message = ARGV.shift and /^[a-z]+$/ =~ $message
|
||||||
$message = $message.sub(/^(?:dist|real)(?=(?:clean)?$)/, '\1')
|
$message = $message.sub(/^(?:dist|real)(?=(?:clean)?$)/, '\1')
|
||||||
case $message
|
case $message
|
||||||
when "clean"
|
when "clean"
|
||||||
$ignore ||= true
|
$ignore ||= true
|
||||||
when "install"
|
when "install"
|
||||||
$ignore ||= true
|
$ignore ||= true
|
||||||
ARGV[1, 0] = ["INSTALL_PROG=install -m 0755", "INSTALL_DATA=install -m 0644"] if $dryrun
|
$mflags.unshift("INSTALL_PROG=install -m 0755",
|
||||||
|
"INSTALL_DATA=install -m 0644") if $dryrun
|
||||||
end
|
end
|
||||||
$message.sub!(/e?$/, "ing")
|
$message.sub!(/e?$/, "ing")
|
||||||
else
|
else
|
||||||
|
@ -208,7 +211,7 @@ if $extlist.size > 0
|
||||||
}.compact
|
}.compact
|
||||||
puts conf
|
puts conf
|
||||||
$stdout.flush
|
$stdout.flush
|
||||||
ARGV.concat(conf)
|
$mflags.concat(conf)
|
||||||
end
|
end
|
||||||
rubies = []
|
rubies = []
|
||||||
%w[RUBY RUBYW].each {|r|
|
%w[RUBY RUBYW].each {|r|
|
||||||
|
@ -218,10 +221,10 @@ rubies = []
|
||||||
Dir.chdir ".."
|
Dir.chdir ".."
|
||||||
puts "making #{rubies.join(', ')}"
|
puts "making #{rubies.join(', ')}"
|
||||||
$stdout.flush
|
$stdout.flush
|
||||||
ARGV.concat(rubies)
|
$mflags.concat(rubies)
|
||||||
host = (defined?(CROSS_COMPILING) ? CROSS_COMPILING : RUBY_PLATFORM)
|
host = (defined?(CROSS_COMPILING) ? CROSS_COMPILING : RUBY_PLATFORM)
|
||||||
/mswin|bccwin|mingw|djgpp|human|os2|macos/ =~ host or exec(*ARGV)
|
/mswin|bccwin|mingw|djgpp|human|os2|macos/ =~ host or exec($make, *$mflags)
|
||||||
system(*ARGV.quote) or exit($?.exitstatus)
|
system($make, *$mflags.quote) or exit($?.exitstatus)
|
||||||
|
|
||||||
#Local variables:
|
#Local variables:
|
||||||
# mode: ruby
|
# mode: ruby
|
||||||
|
|
|
@ -171,7 +171,7 @@ OBJS = array.obj \
|
||||||
|
|
||||||
all: ext miniruby$(EXEEXT) rbconfig.rb \
|
all: ext miniruby$(EXEEXT) rbconfig.rb \
|
||||||
$(LIBRUBY) $(MISCLIBS)
|
$(LIBRUBY) $(MISCLIBS)
|
||||||
@$(MINIRUBY) $(srcdir)/ext/extmk.rb $(EXTSTATIC) $(MAKE) -$(MFLAGS)$(MAKEFLAGS)
|
@$(MINIRUBY) $(srcdir)/ext/extmk.rb --extstatic=$(EXTSTATIC) --make="$(MAKE)" --make-flags="-$(MFLAGS)$(MAKEFLAGS)"
|
||||||
|
|
||||||
ext:
|
ext:
|
||||||
@mkdir $@
|
@mkdir $@
|
||||||
|
@ -406,7 +406,7 @@ $(RUBYDEF): $(LIBRUBY_A) miniruby$(EXEEXT)
|
||||||
|
|
||||||
install: rbconfig.rb
|
install: rbconfig.rb
|
||||||
$(MINIRUBY) $(srcdir)/instruby.rb -$(MFLAGS)$(MAKEFLAGS) $(DESTDIR)
|
$(MINIRUBY) $(srcdir)/instruby.rb -$(MFLAGS)$(MAKEFLAGS) $(DESTDIR)
|
||||||
$(MINIRUBY) $(srcdir)/ext/extmk.rb $(MAKE) -$(MFLAGS)$(MAKEFLAGS) DESTDIR=$(DESTDIR) install
|
$(MINIRUBY) $(srcdir)/ext/extmk.rb --make="$(MAKE)" --make-flags="-$(MFLAGS)$(MAKEFLAGS) DESTDIR=$(DESTDIR)" install
|
||||||
|
|
||||||
clean: clean-ext clean-local
|
clean: clean-ext clean-local
|
||||||
|
|
||||||
|
@ -421,7 +421,7 @@ clean-local:
|
||||||
@if exist *.res del *.res
|
@if exist *.res del *.res
|
||||||
|
|
||||||
clean-ext:
|
clean-ext:
|
||||||
@-$(MINIRUBY) $(srcdir)/ext/extmk.rb $(MAKE) -$(MFLAGS)$(MAKEFLAGS) clean
|
@-$(MINIRUBY) $(srcdir)/ext/extmk.rb --make="$(MAKE)" --make-flags="-$(MFLAGS)$(MAKEFLAGS)" clean
|
||||||
|
|
||||||
distclean: distclean-ext distclean-local
|
distclean: distclean-ext distclean-local
|
||||||
|
|
||||||
|
@ -455,7 +455,7 @@ distclean-local: clean-local
|
||||||
@if exist miniruby$(EXEEXT) del miniruby$(EXEEXT)
|
@if exist miniruby$(EXEEXT) del miniruby$(EXEEXT)
|
||||||
|
|
||||||
distclean-ext:
|
distclean-ext:
|
||||||
@-$(MINIRUBY) $(srcdir)/ext/extmk.rb $(MAKE) -$(MFLAGS)$(MAKEFLAGS) distclean
|
@-$(MINIRUBY) $(srcdir)/ext/extmk.rb --make="$(MAKE)" --make-flags="-$(MFLAGS)$(MAKEFLAGS)" distclean
|
||||||
|
|
||||||
realclean: distclean
|
realclean: distclean
|
||||||
@if exist parse.c del parse.c
|
@if exist parse.c del parse.c
|
||||||
|
|
Loading…
Add table
Reference in a new issue