Is it possible to perform a make clean from the parent directory which also recursively cleans all sub-directories without having to include a makefile in each sub-directory?
ALL_MOD = $(shell find . -maxdepth 1 -type d )
ALL_MOD_CLEAN = $(addsuffix .clean, $(ALL_MOD))
.PHONY: $(ALL_MOD_CLEAN) $(ALL_MOD) default all clean
$(ALL_MOD_CLEAN):
$(E) "cleaning $(basename $@)"
if [ -e $(basename $@)/Makefile ] ; then \
$(MAKE) -C $(basename $@) clean ;\
fi
clean: $(ALL_MOD_CLEAN)
$(E) "cleaning complete: " $(ALL_MOD)
add '.' to the suffix and use $(basename ...) instead of original target otherwise will be re-making all files every time need just to clean the project