[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
8.1.4.1 Conditional programs using configure
substitutions
In this case, you must notify Automake of all the programs that can
possibly be built, but at the same time cause the generated
‘Makefile.in’ to use the programs specified by configure
.
This is done by having configure
substitute values into each
_PROGRAMS
definition, while listing all optionally built programs
in EXTRA_PROGRAMS
.
bin_PROGRAMS = cpio pax $(MT) libexec_PROGRAMS = $(RMT) EXTRA_PROGRAMS = mt rmt |
As explained in Support for executable extensions, Automake will rewrite
bin_PROGRAMS
, libexec_PROGRAMS
, and
EXTRA_PROGRAMS
, appending ‘$(EXEEXT)’ to each binary.
Obviously it cannot rewrite values obtained at run-time through
configure
substitutions, therefore you should take care of
appending ‘$(EXEEXT)’ yourself, as in ‘AC_SUBST([MT],
['mt${EXEEXT}'])’.