bug-automake
[Top][All Lists]
Advanced

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

Re: Problem with AM_CONDITIONAL


From: Mike Frysinger
Subject: Re: Problem with AM_CONDITIONAL
Date: Mon, 21 Jan 2008 21:45:27 -0500
User-agent: KMail/1.9.7

On Monday 21 January 2008, Santiago Capel Torres wrote:
> I define the AM_CONDITIONAL in 'configure.ac':
>
>     CONF_HAVE_RTK=yes
>     AM_CONDITIONAL( [COMPILE_WITH_RTK], [ test $CONF_HAVE_RTK == yes ])

test uses one =, not two

> and in the makefile.am:
>
>     if COMPILE_WITH_RTK
>         RTK_SUBDIR = gestiong-rtk
>     endif
>     SUBDIRS = gestiong-lib gestiong-gui-qt3 $(RTK_SUBDIR) gestiong-system \
>         gestiong-contactos gestiong-contable gestiong-socias gestiong

your indentation is what's causing problems.  do not indent RTK_SUBDIR.

> Everything works fine, but the problem is that in the generated
> Makefile, there is a line almost at the bottom that says:
>
>     RTK_SUBDIR = gestiong-rtk
>
> but this line is BELOW the line that says
>
>     SUBDIRS = gestiong-lib gestiong-gui-qt3 $(RTK_SUBDIR) gestiong-system \
>         gestiong-contactos gestiong-contable gestiong-socias gestiong
>
> in the same Makefile, so there is no substitution at all and my
> RTK_SUBDIR is never compiled.
>
> To the best of my knoledge, the line RTK_SUBDIR = gestiong should have
> been generated at the beginning of the Makefile.

the order with make does not matter so long as you use = for assignments as 
this means delayed processing.  so if you do:
FOO = $(A) $(B)
A = a
B = $(C) b
C = c
then when you use $(FOO), it would "just work" which means you'd end up with:
FOO = a c b
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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