"Fred" == Fred Cox <address@hidden> writes:
Fred> I'm using automake 1.7.3, the latest stable release of automake.
Fred> Our generated program's name is different, depending on
Fred> configuration switches.
Fred> For platforms which don't have an extension to signify that something
Fred> is executable, this idiom seems to work for me:
Fred> EXTRA_PROGRAMS=daemon
Fred> bin_PROGRAMS=normal @DAEMON_NAME@
Fred> However, under Win32/MinGW, the make fails. After some digging I
Fred> determined that the second bin_PROGRAMS in the Makefile.in is this:
Fred> bin_PROGRAMS = normal$(EXEEXT) @DAEMON_NAME@
Fred> rather than:
Fred> bin_PROGRAMS = normal$(EXEEXT) @address@hidden(EXEEXT)
Fred> as I would expect.
Automake cannot know that @DAEMON_NAME@ will always containe
*one* program name. Consider @MAYBE_A_PROGRAM_NAME@ or
@MANY_PROGRAM_NAMES@: in both cases appending $(EXEEXT) would be
wrong.
Fred> I've attached my boiled down configure.ac and Makefile.am, along with
Fred> the generated Makefile.in.
Fred> Is there a workaround (besides hand editing the Makefile.in) or a
Fred> quick bugfix?
Sure! Please see the `Conditional compilation of programs'
section of the manual. Let me know if it can be improved.