bug-automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Doesn't work: blah_PROGRAMS = $(EXTRA_PROGRAMS)


From: Daniel Herring
Subject: Re: Doesn't work: blah_PROGRAMS = $(EXTRA_PROGRAMS)
Date: Fri, 27 Mar 2009 00:49:53 -0400 (EDT)
User-agent: Alpine 1.10 (LNX 962 2008-03-14)

On Fri, 27 Mar 2009, Daniel Richard G. wrote:

I have a Makefile.am with programs that are conditionally compiled, e.g.

        EXTRA_PROGRAMS = foo bar

        if ENABLE_STUFF
        bin_PROGRAMS = foo bar
        endif


I don't think you need to use EXTRA_PROGRAMS if you use the idiom

        bin_PROGRAMS =
        if ENABLE_STUFF
        bin_PROGRAMS += foo bar
        endif


EXTRA_PROGRAMS was designed for cases like

== in configure.ac ==
if test X; then
  PROGS="foo bar"
else
  PROGS="baz"
fi
AC_SUBST(PROGS)

== in Makefile.am ==
EXTRA_PROGRAMS=foo bar baz
bin_PROGRAMS=quux $(PROGS)


Without the EXTRA_PROGRAMS, automake wouldn't know what to do with things like foo_SOURCES since foo is otherwise missing from Makefile.am.

- Daniel H




reply via email to

[Prev in Thread] Current Thread [Next in Thread]