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

* ext/extmk.rb.in: add target `distclean' in Makefile for extlib.

target `clean' doesn't remove Makefile.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
knu 2001-04-24 07:06:31 +00:00
parent d93e913dfb
commit 40542f32cf
2 changed files with 19 additions and 8 deletions

View file

@ -1,3 +1,8 @@
Tue Apr 24 16:03:25 2001 Hiroshi Igarashi <iga@ruby-lang.org>
* ext/extmk.rb.in: add target `distclean' in Makefile for extlib.
target `clean' doesn't remove Makefile.
Tue Apr 24 15:57:45 2001 Akinori MUSHA <knu@iDaemons.org>
* ext/extmk.rb.in, lib/mkmf.rb: (dir_config) do not add the

View file

@ -12,7 +12,13 @@ elsif ARGV[0] == 'install'
$destdir = ARGV[1] || ''
ARGV.shift
elsif ARGV[0] == 'clean'
$clean = true
$clean = "clean"
ARGV.shift
elsif ARGV[0] == 'distclean'
$clean = "distclean"
ARGV.shift
elsif ARGV[0] == 'realclean'
$clean = "realclean"
ARGV.shift
end
@ -646,7 +652,7 @@ def extmake(target)
if $install
system "#{$make} install DESTDIR=#{$destdir}"
elsif $clean
system "#{$make} clean"
system "#{$make} #{$clean}"
else
unless system "#{$make} all"
if ENV["MAKEFLAGS"] != "k" and ENV["MFLAGS"] != "-k"
@ -675,15 +681,15 @@ $static_ext = {}
for setup in ["@setup@", "#{$top_srcdir}/ext/@setup@"]
if File.file? setup
f = open(setup)
while f.gets()
$_.chomp!
sub!(/#.*$/, '')
next if /^\s*$/
if /^option +nodynamic/
while line = f.gets()
line.chomp!
line.sub!(/#.*$/, '')
next if /^\s*$/ =~ line
if /^option +nodynamic/ =~ line
$nodynamic = true
next
end
target = $_.split[0]
target = line.split[0]
target = target.downcase if /mswin32/ =~ RUBY_PLATFORM
$static_ext[target] = true
end