From: ts Date: 2001-01-03T02:27:05+09:00 Subject: [ruby-talk:8525] Re: 1.6.2 on Solaris2.5.1 >>>>> "H" == Hugh Sasse Staff Elec Eng writes: H> Is There A Better Way To Do It? We can't use ruby to distclean ruby, of H> course... Probably there is a better way to do it pigeon% diff -ru ruby-1.6.2 ruby-yy diff -ru ruby-1.6.2/Makefile.in ruby-yy/Makefile.in --- ruby-1.6.2/Makefile.in Mon Dec 25 04:55:18 2000 +++ ruby-yy/Makefile.in Tue Jan 2 18:17:58 2001 @@ -111,7 +111,10 @@ @-@MINIRUBY@ -Cext extmk.rb clean 2> /dev/null || true @rm -f $(PROGRAM) miniruby$(EXEEXT) -distclean: clean +distcleanext: + @-@MINIRUBY@ -Cext extmk.rb distclean 2> /dev/null || true + +distclean: distcleanext clean @rm -f Makefile ext/extmk.rb config.h @rm -f ext/config.cache config.cache config.log config.status @rm -f *~ core *.core gmon.out y.tab.c y.output ruby.imp diff -ru ruby-1.6.2/ext/extmk.rb.in ruby-yy/ext/extmk.rb.in --- ruby-1.6.2/ext/extmk.rb.in Thu Dec 21 07:27:44 2000 +++ ruby-yy/ext/extmk.rb.in Tue Jan 2 18:17:58 2001 @@ -14,6 +14,9 @@ elsif ARGV[0] == 'clean' $clean = true ARGV.shift +elsif ARGV[0] == 'distclean' + $distclean = true + ARGV.shift end SRC_EXT = ["c", "cc", "m", "cxx", "cpp", "C"] @@ -563,7 +566,7 @@ $static = false end - unless $install or $clean + unless $install or $clean or $distclean return if $nodynamic and not $static end @@ -600,7 +603,7 @@ Dir.chdir target $target = target $mdir = target - unless $install or $clean + unless $install or $clean or $distclean if $static_ext.size > 0 || !File.exist?("./Makefile") || older("./Makefile", "#{$top_srcdir}/ext/@setup@") || @@ -626,6 +629,8 @@ system "#{$make} install DESTDIR=#{$destdir}" elsif $clean system "#{$make} clean" + elsif $distclean + system "#{$make} distclean" else unless system "#{$make} all" if ENV["MAKEFLAGS"] != "k" and ENV["MFLAGS"] != "-k" @@ -680,6 +685,8 @@ print "installing ", d, "\n" elsif $clean print "cleaning ", d, "\n" + elsif $distclean + print "real cleaning ", d, "\n" else print "compiling ", d, "\n" if RUBY_PLATFORM =~ /-aix/ and older("../ruby.imp", "../miniruby") @@ -689,7 +696,7 @@ extmake(d) end -if $install or $clean +if $install or $clean or $distclean Dir.chdir ".." exit end pigeon% Guy Decoux