help-gnu-utils
[Top][All Lists]
Advanced

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

Re: condition in Makefile.am


From: Ralf Wildenhues
Subject: Re: condition in Makefile.am
Date: Tue, 6 Feb 2007 23:59:32 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

Hello Ranjith,

* ranjith wrote on Tue, Feb 06, 2007 at 08:49:07AM CET:
>  
> I want to include a condition in MAkefile.am to check the
> architecture, I did some thing like this
>  
> s       :=
> s       += # gets a space in s
> ARCH    := $(subst $(s),_,$(shell uname ms))
>  
> ifeq ($(ARCH), Linux_i686)
> bin_PROGRAMS    = CCap
> endif
> 
> but while running automake I am getting the error
>  
> linux32/Makefile.am:15: endif without if
> win32/Makefile.am:12: endif without if

You're mixing up GNU make-specific constructs (ifeq, and others, see
<http://www.gnu.org/software/make/manual/html_node/Conditionals.html>)
together with Automake.  Automake only understands most of POSIX
make features, and is only able to ignore some GNU make extensions.

OTOH, Automake has some extra features, such as Automake conditionals:
<http://sources.redhat.com/automake/automake.html#Conditionals>

You need to choose to either use Automake, and thus give up some GNU
make specific functionality, or use GNU make, and give up Automake
(i.e., write a Makefile, not Makefile.am; or write a Makefile.in which
is then treated by e.g., a configure script generated by autoconf).

Hope that helps.

Cheers,
Ralf




reply via email to

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