From: Chris Lattner Date: Mon, 28 Jan 2008 04:18:41 +0000 (+0000) Subject: reduce duplicate -I flags passed to the compiler, cleaning up the VERBOSE X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=2671fc390c8a5d6548ebec83d59dbc474f8de48b reduce duplicate -I flags passed to the compiler, cleaning up the VERBOSE output. Patch contributed by Sam Bishop! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46432 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/Makefile.rules b/Makefile.rules index 0f2be6503b8..a9421c6e13e 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -454,12 +454,11 @@ endif LD.Flags += -L$(LibDir) -L$(LLVMLibDir) 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$(PROJ_OBJ_DIR) -I$(PROJ_SRC_DIR) \ - -I$(PROJ_OBJ_ROOT)/include \ - -I$(PROJ_SRC_ROOT)/include \ - -I$(LLVM_OBJ_ROOT)/include \ - -I$(LLVM_SRC_ROOT)/include \ - $(CPP.BaseFlags) +CPP.Flags += $(patsubst %,-I%/include,$(sort \ + $(PROJ_OBJ_DIR) $(PROJ_SRC_DIR) \ + $(PROJ_OBJ_ROOT) $(PROJ_SRC_ROOT) \ + $(LLVM_OBJ_ROOT) $(LLVM_SRC_ROOT))) \ + $(CPP.BaseFlags) Compile.C = $(CC) $(CPP.Flags) $(C.Flags) $(CompileCommonOpts) -c LTCompile.C = $(LIBTOOL) $(LibTool.Flags) --mode=compile $(Compile.C)