Friday, December 18, 2009

cygwin make Hates Windows

I installed 'make' from cygwin's package manager and it doesn't work with windows absolute paths. Here is my Makefile:
C:/TEMP/asdf.txt:
touch C:/TEMP/asdf.txt
(that's a tab)

Invoking 'make' from cygwin gives the following error:
Makefile:1: *** target pattern contains no `%'.  Stop.
The workaround is redoing the paths that 'make' cares about to use the '/cygdrive/c/' path:
/cygdrive/c/TEMP/asdf.txt:
touch C:/TEMP/asdf.txt
(that's a tab)

This works. 'touch' knows how to read windows absolute paths and 'make' doesn't.

No comments: