Skip to content

Instantly share code, notes, and snippets.

@gladson
Created November 19, 2023 07:48
Show Gist options
  • Save gladson/e7532825b8686f4bfe440a139c1af467 to your computer and use it in GitHub Desktop.
Save gladson/e7532825b8686f4bfe440a139c1af467 to your computer and use it in GitHub Desktop.
Makefile - ESTUDO
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