Changeset 245

Show
Ignore:
Timestamp:
02/26/2008 07:53:43 (9 months ago)
Author:
jgarber
Message:

Add the *.c files as a dependency of Makefile so they exist when the Makefile is generated, otherwise you get "make: Nothing to be done for `all'."
There's surely a way to do this so it doesn't regenerate the Makefile each time the *.c files change.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/superredcloth/Rakefile

    r244 r245  
    112112]  
    113113 
     114file ext_so => ext_files do 
     115  Dir.chdir(ext) do 
     116    sh(PLATFORM =~ /win32/ ? 'nmake' : 'make') 
     117  end 
     118  cp ext_so, "lib" 
     119end 
     120 
    114121task "lib" do 
    115122  directory "lib" 
     
    132139task extension.to_sym => ["#{ext}/Makefile", ext_so ] 
    133140 
    134 file "#{ext}/Makefile" => ["#{ext}/extconf.rb"] do 
     141file "#{ext}/Makefile" => ["#{ext}/extconf.rb", "#{ext}/superredcloth_scan.c","#{ext}/superredcloth_inline.c"] do 
    135142  Dir.chdir(ext) do ruby "extconf.rb" end 
    136 end 
    137  
    138 file ext_so => ext_files do 
    139   Dir.chdir(ext) do 
    140     sh(PLATFORM =~ /win32/ ? 'nmake' : 'make') 
    141   end 
    142   cp ext_so, "lib" 
    143143end 
    144144