Simplify subdirectory makefiles, and be more robust by checking that they define the appropriate variables.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@93714 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Makefile b/Makefile
index 7941f10..cb964ce 100644
--- a/Makefile
+++ b/Makefile
@@ -39,7 +39,8 @@
help-hidden: help
@echo "Debugging variables:"
- @echo " DEBUGMAKE=1: enable some Makefile logging [default=0]"
+ @echo " DEBUGMAKE=1: enable some Makefile logging [default=]"
+ @echo " =2: enable more Makefile logging"
@echo
@echo "Debugging targets:"
@echo " make-print-FOO: print information on the variable 'FOO'"
@@ -201,7 +202,8 @@
###
# Include child makefile fragments
-$(foreach subdir,$(SubDirs),$(eval include $(subdir)/Makefile.mk))
+Dir := .
+include make/subdir.mk
###
# Determine the actual inputs for an optimized library.
@@ -223,3 +225,8 @@
$(foreach config,$(Configs), \
$(foreach arch,$(Archs), \
$(eval $(call Final_CNA_template,$(config),$(arch)))))
+
+ifneq ($(DEBUGMAKE),)
+ $(info MAKE: Done processing Makefile)
+ $(info )
+endif