automake
[Top][All Lists]
Advanced

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

Re: Conditionally overriding variables set by Autoconf


From: Karl Berry
Subject: Re: Conditionally overriding variables set by Autoconf
Date: Thu, 2 Jul 2020 19:21:35 -0600

Hi Marius,

    Makefile.am:86: warning: pkglibdir was already defined in condition
    TRUE, which includes condition USE_VERSION_LINKS ...

All I can think of to do is introduce a new variable in each branch, and
define the "built-in" variables outside the conditional.  Unfortunately
this means reproducing Automake's defaults, as far as I can see.  As in
this for Makefile.am (and minimal configure.ac below):

if USE_VERSION_LINKS
mypkglibdir = $(versiondir)$(libdir)/ganeti
else
mypkglibdir = $(libdir)/@PACKAGE@
endif
pkglibdir = $(mypkglibdir)

I suspect there is a cleaner way, but I don't have the brains to see
what it is. I hope someone else here does ... --best, karl.

--- configure.ac ---
AC_INIT([amin], [0.0], [nowhere@example.net])
AM_INIT_AUTOMAKE([foreign])
AM_CONDITIONAL([USE_VERSION_LINKS], [false])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT



reply via email to

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