So, if I run gmake (the patched cygwin version) and nmake (Microsoft's make) on roughly the same tree. (CMake can generate files for either.) nmake is able to check the depend information about twice as fast as gmake can. I suspect that the problem is in the use of stat. Although windows/ cygwin provide stat, there are significantly faster versions of stat available via direct windows system calls. We had a similar problem in CMake, and use the following code in windows to compare times stamps of
two files:

// Windows version. Get the modification time from extended file attributes.
 WIN32_FILE_ATTRIBUTE_DATA f1d;
 WIN32_FILE_ATTRIBUTE_DATA f2d;
 if(!GetFileAttributesEx(f1, GetFileExInfoStandard, &f1d))
   {
   return false;
   }
 if(!GetFileAttributesEx(f2, GetFileExInfoStandard, &f2d))
   {
   return false;
   }

 // Compare the file times using resolution provided by system call.
*result = (int)CompareFileTime(&f1d.ftLastWriteTime, &f2d.ftLastWriteTime);

The speed up was significant for cmake, and I suspect there would be a similar improvement for gmake. My question is where in the make source tree would I put such code?
Thanks.

-Bill






_______________________________________________
Make-w32 mailing list
Make-w32@gnu.org
http://lists.gnu.org/mailman/listinfo/make-w32

Reply via email to