[#688] mkmf.rb - add files to clean and distclean targets — Michal Rokos <michal@...>

Hi,

25 messages 2003/01/15
[#722] Re: [RFC] mkmf.rb - add files to clean and distclean targets — Mathieu Bouchard <matju@...> 2003/01/20

On Thu, 16 Jan 2003, Michal Rokos wrote:

[#740] Re: [RFC] mkmf.rb - add files to clean and distclean targets — matz@... (Yukihiro Matsumoto) 2003/01/21

Hi,

[#724] Symbols: More Functionality Wanted — Ryan Pavlik <rpav@...>

I've been discussing this for a bit on #ruby-lang on OPN (or freenode or

23 messages 2003/01/20
[#728] Re: Symbols: More Functionality Wanted — matz@... (Yukihiro Matsumoto) 2003/01/20

Hi,

[#743] Re: Symbols: More Functionality Wanted — "Pit Capitain" <pit@...> 2003/01/21

On 20 Jan 2003 at 15:49, Yukihiro Matsumoto wrote:

[#767] Re: Symbols: More Functionality Wanted — Mathieu Bouchard <matju@...> 2003/01/22

[#768] Re: Symbols: More Functionality Wanted — dblack@... 2003/01/22

Hi --

[#779] Re: Symbols: More Functionality Wanted — Gavin Sinclair <gsinclair@...> 2003/01/23

On Thursday, January 23, 2003, 6:28:04 AM, dblack wrote:

[RFC] mkmf.rb - add files to clean and distclean targets

From: Michal Rokos <michal@...>
Date: 2003-01-15 21:40:25 UTC
List: ruby-core #688
Hi,

	I think it could be handy to make possible adding files to 'clean' and 
'distclean' sections of Makefile.

	What do you think?

		Michal

Attachments (1)

RubyMKMF.diff (1.31 KB, text/x-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}

In This Thread

Prev Next