summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-01-18 06:48:40 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-01-18 06:48:40 +0000
commit9edf5cdd69d2d2a74b37ec14e475c5d6367e6eec (patch)
treecdd1b559532b294398b9e97a24e57ccb5a950c0b /Makefile
parentfaf0150036689985ecea64e78f2637093857cd7b (diff)
Change subdir traversal to primarily cache information about what is available in subdirectories.
- Rest of makefiles will move to using the information after it has been computed, instead of during subdir traversal. Also, add 'make info-functions' target, which prints information on all the functions available in compiler-rt. Also, add 'make help-devel' for listing help on targets intended for compiler-rt developers or direct users. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@93715 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile30
1 files changed, 29 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index cb964ce26..1f47dd4a8 100644
--- a/Makefile
+++ b/Makefile
@@ -37,7 +37,12 @@ help:
@echo " all: build all configurations"
@echo
-help-hidden: help
+help-devel: help
+ @echo "Development targets:"
+ @echo " info-functions: list available compiler-rt functions"
+ @echo
+
+help-hidden: help-devel
@echo "Debugging variables:"
@echo " DEBUGMAKE=1: enable some Makefile logging [default=]"
@echo " =2: enable more Makefile logging"
@@ -46,6 +51,14 @@ help-hidden: help
@echo " make-print-FOO: print information on the variable 'FOO'"
@echo
+info-functions:
+ @echo "compiler-rt Available Functions"
+ @echo
+ @echo "All Functions: $(AvailableFunctions)"
+ @$(foreach fn,$(AvailableFunctions),\
+ printf " %-20s - available in (%s)\n" $(fn)\
+ "$(foreach key,$(AvailableIn.$(fn)),$($(key).Dir))";)
+
# Provide default clean target which is extended by other templates.
.PHONY: clean
clean::
@@ -230,3 +243,18 @@ ifneq ($(DEBUGMAKE),)
$(info MAKE: Done processing Makefile)
$(info )
endif
+
+###
+# Function Information
+#
+# FIXME: Factor out.
+
+AvailableObjects := $(sort $(foreach key,$(SubDirKeys),\
+ $($(key).ObjNames)))
+AvailableFunctions := $(AvailableObjects:%.o=%)
+
+# Compute lists of where each function is available.
+$(foreach key,$(SubDirKeys),\
+ $(foreach fn,$(subst .o,,$($(key).ObjNames)),\
+ $(call Append,AvailableIn.$(fn),$(key))))
+