[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ifeq problem?
From: |
S Tao |
Subject: |
ifeq problem? |
Date: |
Tue, 2 Oct 2018 03:23:47 +0000 |
Hi, I wrote a make target "test-test" as below. my intention is to assign 1/2
to v1/v2 respectively. However, when I run command "make test-test", I am
getting "v1 == v2". Why? What workaround is available to achieve what I want to
do here? Thank you very much for your helps.
test-test:
$(eval v1=$(shell sh -c "echo 1"))
$(eval v2=$(shell sh -c "echo 2"))
@echo "v1=$(strip $(v1))="
@echo "v2=$(strip $(v2))="
ifeq ("$(strip $(v1))", "$(strip $(v2))")
@echo "v1 == v2"
endif
.PHONY: test-test