--- ruby-netcdf.orig/extconf.rb
+++ ruby-netcdf/extconf.rb
@@ -111,9 +111,9 @@
       newmkfl.puts("\t\t@$(RM) *.nc demo/*.nc demo/*~ lib/*~ doc/*~ test/*.nc test/*~ Makefile.orig")
    when /^all:/
       newmkfl.puts(line)
-      newmkfl.puts("")         
-      newmkfl.puts("test: all")            # insert the "test" target
-      newmkfl.puts("\t\t@cd test && ruby test.rb && echo 'test did not fail :-p (please ignore the warnings)' && cd ..") 
+      newmkfl.puts("\t\t -@( [ ! -d lib/numru ] && (mkdir -p lib/numru && cd lib/numru && ln -s ../../netcdfraw.so )) ")
+      newmkfl.puts("\t\t @(cd test && /usr/bin/ruby$(CDBS_RUBY_VER) -I../lib test.rb 1>/dev/null )")
+      newmkfl.puts("\t\t -@( rm -rf lib/numru )")
    when /lib\/netcdf/
       line = line.chomp! + "/"
       newmkfl.puts(line)
