blob: 1c532f42336ca045b5ffeb6e72260eda0ddc19c0 [file] [log] [blame]
#===-- Makefile.top - Rules for top level directory --------*- Makefile -*--===#
#
# The LLVM Compiler Infrastructure
#
# This file was developed by Reid Spencer group and is distributed under the
# University of Illinois Open Source License. See LICENSE.TXT for details.
#
#===------------------------------------------------------------------------===#
#
# This file is used by all top level directories of LLVM modules. It provides
# the targets that only occur at the top level in addition to Makefile.common
#
#===-----------------------------------------------------------------------====#
include $(LLVM_TOP)/support/make/Makefile.compile
#-------------------------------------------------------------------------------
# Provide a spotless target to really blow things away and start from scratch
#-------------------------------------------------------------------------------
ifneq ($(OBJ_ROOT),$(SRC_ROOT))
spotless:
$(Verb) if test -x config.status ; then \
$(EchoCmd) Wiping out $(OBJ_ROOT) ; \
$(MKDIR) .spotless.save ; \
$(MV) config.status .spotless.save ; \
$(MV) mklib .spotless.save ; \
$(MV) projects .spotless.save ; \
$(RM) -rf * ; \
$(MV) .spotless.save/config.status . ; \
$(MV) .spotless.save/mklib . ; \
$(MV) .spotless.save/projects . ; \
$(RM) -rf .spotless.save ; \
$(EchoCmd) Rebuilding configuration of $(OBJ_ROOT) ; \
$(ConfigStatusScript) --recheck $(ConfigureScriptFLAGS) && \
$(ConfigStatusScript) ; \
else \
$(EchoCmd) "make spotless" can only be run from $(OBJ_ROOT); \
fi
else
spotless:
$(EchoCmd) "spotless target not supported for objdir == srcdir"
endif