Created
November 19, 2017 11:59
-
-
Save Hexa/3da39e8d72b536b9eb272c7603fac57f to your computer and use it in GitHub Desktop.
ifeq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.PHONY: all | |
b: | |
$(eval N := $(shell echo "100")) | |
p: b | |
ifeq ($(CMD),a) | |
$(eval B := $(shell expr $N + 10 )) | |
else | |
$(eval B := $(shell expr $N + 20 )) | |
endif | |
all: p | |
@echo $(B) | |
# $ make all CMD=a | |
# 110 | |
# $ make all CMD=b | |
# 120 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment