I'm including a file at the beginning of my Makefile that will just have lines like:
SOMETHING=123 SOMETHING_ELSE=hello In the Makefile, I then have this: ifndef SOMETHING missing += SOMETHING endif Then ${missing} has all the missing variables which can be echoed to the user. But then I need to have this ifndef... section for every variable and it's difficult to maintain and read. I've tried a number of things, including the following: required = SOMETHING SOMETHING_ELSE define CHECKIT ifeq ($$($(strip $(1))),) echo $(1) endif endef missing = $(foreach var,$(required),$(call CHECKIT,$(var))) I'm using GNU make 3.81, but I'll need something that's fairly portable. Any ideas? Thanks in advance... -- View this message in context: http://www.nabble.com/Checking-that-required-variables-have-been-set-tp18119651p18119651.html Sent from the Gnu - Make - Help mailing list archive at Nabble.com. _______________________________________________ Help-make mailing list Help-make@gnu.org http://lists.gnu.org/mailman/listinfo/help-make