[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: EXEEXT and EXTRA_PROGRAMS
From: |
Ralf Wildenhues |
Subject: |
Re: EXEEXT and EXTRA_PROGRAMS |
Date: |
Wed, 11 Jan 2006 17:02:05 +0100 |
User-agent: |
Mutt/1.5.11 |
* D M wrote on Wed, Jan 11, 2006 at 01:28:22PM CET:
>
> I'm not 100% sure if it is the right group to ask but I'll try.
> I'm trying to compile program which is built condinally. So my Makefile.am
> looks like this:
> EXTRA_PROGRAMS=foo
> address@hidden@
> correspoding configure.in:
> if (certain condidtions)
> FOO=foo
> AC_SUBST(FOO)
>
> However, if a platform that application is compiled for uses exe
> extensions, FOO still gets value 'foo' - resulting Makefile is incorrect
> and is not able to compile the app. I read info pages on EXEEXT but
> I found no clear explanation of how such case should be handled
> properly.
Try using an Automake conditional instead:
configure.ac:
if $whatever; then
want_foo = yes
fi
AM_CONDITIONAL([WANT_FOO], [test "$want_foo" = yes])
Makefile.am:
if WANT_FOO
FOO = foo
else
FOO =
endif
bin_PROGRAMS = $(FOO)
EXTRA_PROGRAMS = foo
Cheers,
Ralf