From: Michal Rokos Date: 2003-01-16T06:40:25+09:00 Subject: [RFC] mkmf.rb - add files to clean and distclean targets This is a multi-part message in MIME format. --------------020305000704030209050102 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi, I think it could be handy to make possible adding files to 'clean' and 'distclean' sections of Makefile. What do you think? Michal --------------020305000704030209050102 Content-Type: text/plain; name="RubyMKMF.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="RubyMKMF.diff" Index: lib/mkmf.rb =================================================================== RCS file: /src/ruby/lib/mkmf.rb,v retrieving revision 1.123 diff -u -p -r1.123 mkmf.rb --- lib/mkmf.rb 31 Dec 2002 12:31:12 -0000 1.123 +++ lib/mkmf.rb 15 Jan 2003 20:53:12 -0000 @@ -601,6 +601,9 @@ def dummy_makefile(srcdir) configuration(srcdir) << "all install: Makefile\n" << CLEANINGS end +$cleanfiles = [] +$distcleanfiles = [] + def create_makefile(target, srcprefix = nil) $target = target libpath = $LIBPATH @@ -637,8 +640,6 @@ def create_makefile(target, srcprefix = target = nil if $objs == "" - cleanfiles = [] - distcleanfiles = [] if target and EXPORT_PREFIX origdef = target + '.def' deffile = EXPORT_PREFIX + origdef @@ -663,7 +664,7 @@ def create_makefile(target, srcprefix = end end end - distcleanfiles << deffile unless deffile == origdef + $distcleanfiles << deffile unless deffile == origdef end libpath = libpathflag(libpath) @@ -675,8 +676,8 @@ def create_makefile(target, srcprefix = LIBPATH = #{libpath} DEFFILE = #{deffile} -CLEANFILES = #{cleanfiles.join(' ')} -DISTCLEANFILES = #{distcleanfiles.join(' ')} +CLEANFILES = #{$cleanfiles.join(' ')} +DISTCLEANFILES = #{$distcleanfiles.join(' ')} target_prefix = #{target_prefix} LOCAL_LIBS = #{$LOCAL_LIBS} --------------020305000704030209050102--