help-make
[Top][All Lists]
Advanced

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

Re: My makefile problem


From: David Boyce
Subject: Re: My makefile problem
Date: Wed, 27 Dec 2006 09:13:21 -0500

At 02:30 PM 12/22/2006, Gautreaux, Richard wrote:
content-class: urn:content-classes:message
Content-Type: multipart/alternative;
        boundary="----_=_NextPart_001_01C725FF.A150542D"

I am having a problem with a makefile and cannot solve it on my own after looking through the documentation for GNU make. What I am trying to do is compare the argument passed in to the make util. So I am trying to set something if the arg is vxWorks.bin. So here is a portion of my makefile.

I am calling make vxWorks.bin and the following code does not compare to TRUE.

ifeq (<mailto:$@,vxWorks.bin>$@,vxWorks.bin)
LDFLAGS += -T$(BSP_PATH)/ldscript.ld
endif
I cannot get this to evaluate to TRUE even though if I echo the statement $@ and vxWorks.bin they both print
vxWorks.bin
vxWorks.bin

Any help would be greatly appriciated.

First, $@ is defined only within a build script (aka command). GNU make conditionals are defined only outside of a build script. Thus you cannot use them together.

Second, the normal solution to your problem would be via target-specific variable settings. See section 6.10 of the online manual. Something like

vxWorks.bin: LDFLAGS += ...

-David Boyce





reply via email to

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