I have a recursive make structure (i.e. make calls the makefiles in subdirectories). I am in the process of generalizing this and so I made a target called subdirs as follows:
subdirs:
$(foreach SUBDIR, $(SUBDIRS), $(MAKE) -C $(SUBDIR) all; )
where the variable SUBDIRS is the list of subdirectories. The problem is that if one of the makefiles in the subdirectories errors, the make continues with the next subdirectory. Is there a way to use eval here? I tried and keep getting error missing seperator messages. Also, is there a way that I can get the subdirectories without having to explicitly type them in the list?
Thanks!
chacham15