[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Conditionals
From: |
Barry D Benowitz |
Subject: |
Conditionals |
Date: |
Mon, 16 Jul 2001 11:05:32 -0400 |
Maybe some one can stop me from going crazy. Maybe not.
I'm trying to test the contents of a variable, using ifeq, and I am not
getting the appropriate results. Here is what I am doing:
linux := linux
hp := hp
target_arch :=#Make sure its empty
ifndef target_arch #Is target_arch
SET
target_arch := $(findstring $(linux), $(dir_tokens) ) # See if its linux
endif
ifndef target_arch #Is TARGET_ARCH
SET
target_arch := $(findstring $(hp), $(dir_tokens) ) #See if it hp
endif
#target arch is set the way I think it should be: either linux or hp based on
#the directory
#now I test it:
ifeq ($(strip $(target_arch) ),$(strip $(hp) ) )
result1 := true
endif
# Linux specific stuff
ifeq ($(strip $(target_arch) ),$(strip $(linux) ) )
result2 := true
endif
neither result1 nor result2 are set. What am I doing wrong.
Here is the version of make.
$ make -v
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
- Conditionals,
Barry D Benowitz <=