so I need to add some logic to an existing makefile. here's the rule I'm working on:
deploy:
ifneq ($(filter $(SERVICE),$(AVAILABLE_SERVICES)),)
SA=$(SERVICE)
else
SA="default"
endif
export SA
# do something ...
# do something else
I essentially need to export SA variable based on a condition, but this wouldn't work fine since I think SA after condition does not related to the SA inside the condition
Any suggestion on how to set the variable inside if statement and then use it afterwards? (within the rule)
makestarts later; also, unless you explicitly reconfigure it on this point, the shell make starts isn't bash).