Author: reid Date: Sun Dec 9 21:14:08 2007 New Revision: 44764 URL: http://llvm.org/viewvc/llvm-project?rev=44764&view=rev Log: Split this spotless target out into the Makefile.top file since it is only relevant at the top level directory.
Allow the top level directory to be used as an include file source for projects like HLVM. Added: support/trunk/make/Makefile.top Modified: support/trunk/make/Makefile.common Modified: support/trunk/make/Makefile.common URL: http://llvm.org/viewvc/llvm-project/support/trunk/make/Makefile.common?rev=44764&r1=44763&r2=44764&view=diff ============================================================================== --- support/trunk/make/Makefile.common (original) +++ support/trunk/make/Makefile.common Sun Dec 9 21:14:08 2007 @@ -90,29 +90,6 @@ -$(Verb) $(RM) -f $(BUILT_SOURCES) endif -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 $(BUILT_SOURCES) : $(ObjMakefiles) @@ -446,8 +423,9 @@ CPP.BaseFlags += -D_GNU_SOURCE -D__STDC_LIMIT_MACROS # All -I flags should go here, so that they don't confuse llvm-config. CPP.Flags += -I$(OBJ_DIR) -I$(SRC_DIR) \ - -I$(OBJ_ROOT)/include \ - -I$(SRC_ROOT)/include \ + -I$(OBJ_ROOT)/include -I$(SRC_ROOT)/include \ + -I$(OBJ_ROOT) -I$(SRC_ROOT) \ + $(patsubst %,-I$(LLVM_TOP)/%/include -I$(LLVM_TOP)/%,$(LLVM_MODULE_DEPENDS_ON)) \ $(CPP.BaseFlags) Compile.C = $(CC) $(CPP.Flags) $(C.Flags) $(CompileCommonOpts) -c Added: support/trunk/make/Makefile.top URL: http://llvm.org/viewvc/llvm-project/support/trunk/make/Makefile.top?rev=44764&view=auto ============================================================================== --- support/trunk/make/Makefile.top (added) +++ support/trunk/make/Makefile.top Sun Dec 9 21:14:08 2007 @@ -0,0 +1,43 @@ +#===-- 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 _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits