| || |
As I already noted in 25.5 Package Installation, the fact that Windows requires that all program files be named with the extension `.exe' , is the cause of several inconsistencies in package behaviour between Windows and Unix.
For example, where Libtool is involved, if a package builds an executable which is linked against an as yet uninstalled library,
It is very important to correctly add the `.exe' extension to program file names in your `Makefile.am' , otherwise many of the generated rules will not work correctly while they await a file without the `.exe' extension. Fortunately, Automake will do this for you where ever it is able to tell that a file is a program -- everything listed in `bin_PROGRAMS' for example. Occasionaly you will find cases where there is no way for Automake to be sure of this, in which case you must be sure to add the `$(EXEEXT)' suffix. By structuring your `Makefile.am' carefully , this can be avoided in the majority of cases:
could be rewritten as:
The value of `EXEEXT' is always set correctly with respect to the host machine if you use Libtool in your project. If you don't use Libtool, you must manually call the Autoconf macro, `AC_EXEEXT' in your `configure.in' to make sure that it is initialiesed correctly. If you don't call this macro (either directly or implicity with `AC_PROG_LIBTOOL' ), your project will almost certainly not build correctly on Cygwin.