automake
[Top][All Lists]
Advanced

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

Re: AM_CONDITIONAL + AM_COND_IF does not work


From: Tyler Retzlaff
Subject: Re: AM_CONDITIONAL + AM_COND_IF does not work
Date: Mon, 09 Mar 2015 12:48:17 -0400
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

Hey,

On 3/9/2015 11:06 AM, Marc Wäckerlin wrote:
According to the official documentation(*):
------------------------------------------
Here is an example of how to define a conditional config file:
AM_CONDITIONAL([SHELL_WRAPPER], [test "x$with_wrapper" = xtrue])
AM_COND_IF([SHELL_WRAPPER],
           [AC_CONFIG_FILES([wrapper:wrapper.in])])
------------------------------------------

I try to generically find out, whether examples/makefile.am exists in a project and to automatically use it, if it exists:
------------------------------------------
AM_CONDITIONAL([HAVE_EXAMPLES_DIR], [test -f examples/makefile.am])
AM_COND_IF([HAVE_EXAMPLES_DIR], [AC_CONFIG_FILES([examples/makefile])])
------------------------------------------

But automake fails:
------------------------------------------
configure.ac:27: error: required file 'examples/makefile.in' not found
------------------------------------------

AC_CONFIG_FILES([examples/makefile]) presumes you have examples/makefile.in from which to generate makefile when configure is run. The error is clear, examples/makefile.in isn't found.

Did you forget generate makefile.in from makefile.am with automake? I'd try that first.

Tyler




reply via email to

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