+# If we're cross-compiling, build the build-hosted tools first
+ifeq ($(LLVM_CROSS_COMPILING),1)
+all:: cross-compile-build-tools
+
+clean::
+ $(Verb) rm -rf BuildTools
+
+cross-compile-build-tools:
+ $(Verb) if [ ! -f BuildTools/Makefile ]; then \
+ $(MKDIR) BuildTools; \
+ cd BuildTools ; \
+ $(PROJ_SRC_DIR)/configure ; \
+ cd .. ; \
+ fi; \
+ ($(MAKE) -C BuildTools BUILD_DIRS_ONLY=1 ) || exit 1;
+endif
+