Created
October 20, 2016 01:38
-
-
Save alpha22jp/5c8559b3aca395debe3d56d902a5b495 to your computer and use it in GitHub Desktop.
MakefileでAND/OR条件判定
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
COND_A = NO | |
COND_B = YES | |
all: | |
# AND condition | |
ifeq ($(COND_A) $(COND_B), YES YES) | |
@echo "A and B is true" | |
else | |
@echo "A and B is false" | |
endif | |
# OR condition | |
ifeq ($(findstring YES, $(COND_A) $(COND_B)), YES) | |
@echo "A or B is true" | |
else | |
@echo "A or B is false" | |
endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment