We used to have MK_INSTALL_DEST = "$(shell cygpath $1)" but this meant we ended up with "$(shell cygpath "[...]/html/`basename $$i`")" and the $(...) gets evaluated before the makefile rule, so the for loop hasn't been run, and so $i isn't defined. So we were taking the basename of the empty string, meaning docs weren't being installed in the right place. Now we have MK_INSTALL_DEST = $$(cygpath $1) so the evaluation happens in the shell, while the for loop is running.
cygwin's /bin/install doesn't set file modes correctly if the destination path is a C: style path: $ /bin/install -c -m 644 foo /cygdrive/c/cygwin/home/ian/foo2 $ /bin/install -c -m 644 foo c:/cygwin/home/ian/foo3 $ ls -l foo* -rw-r--r-- 1 ian None 0 2011-01-06 18:28 foo -rw-r--r-- 1 ian None 0 2011-01-06 18:29 foo2 -rwxrwxrwx 1 ian None 0 2011-01-06 18:29 foo3 This causes problems for bindisttest/checkBinaries.sh which then thinks that e.g. the userguide HTML files are binaries. We therefore use a /cygdrive path if we are on cygwin
This means we can remove some conditional stuff from the Makefiles, and means the testsuite doesn't have to work out whether or not it's on Windows.