I have a makefile in a directory of mine which builds scripts with certain environment variables set. What if I want to create another makefile in the same directory with di
You can do something like this rather than using multiple makefiles for the same purpose. You can pass the environment or set a flag to the same makefile. For eg:
ifeq ($(ENV),ENV1)
ENV_VAR = THIS
else
ENV_VAR = THAT
endif
default : test
.PHONY : test
test:
@echo $(ENV_VAR)
Then you can simply run the make command with arguments
make ENV=ENV1