Update list of failing benchmarks
[oota-llvm.git] / Makefile.rules
index 81bb53719a3288f7451eca66fedebb2dcbaec1f9..3f817e334039400cf9bfbdb28ef0e6c92c8bc385 100644 (file)
@@ -19,9 +19,9 @@
 #--------------------------------------------------------------------
 # Define the various target sets
 #--------------------------------------------------------------------
-RecursiveTargets := all clean check install uninstall
-LocalTargets     := all-local clean-local check-local install-local printvars \
-                    uninstall-local
+RecursiveTargets := all clean clean-all check install uninstall
+LocalTargets     := all-local clean-local clean-all-local check-local \
+                    install-local printvars uninstall-local
 TopLevelTargets  := dist dist-check dist-clean tags dist-gzip dist-bzip2 \
                     dist-zip
 UserTargets      := $(RecursiveTargets) $(LocalTargets) $(TopLevelTargets)
@@ -77,7 +77,7 @@ $(filter-out clean clean-local,UserTargets):: $(BUILT_SOURCES)
 
 clean-local::
 ifneq ($(strip $(BUILT_SOURCES)),)
-       $(Verb) $(RM) -f $(BUILT_SOURCES)
+       -$(Verb) $(RM) -f $(BUILT_SOURCES)
 endif
 
 $(BUILT_SOURCES) : $(ObjMakefiles)
@@ -131,6 +131,7 @@ $(UserTargets):: $(PreConditions)
 all:: all-local
 check:: check-local
 clean:: clean-local 
+clean-all:: clean-local clean-all-local
 install:: install-local
 uninstall:: uninstall-local
 check-local:: all-local
@@ -221,6 +222,14 @@ else
   LD.Flags += -rpath $(LibDir)
 endif
 
+ifdef TOOL_VERBOSE
+  C.Flags += -v
+  CXX.Flags += -v
+  LD.Flags += -v
+  BCLinkLib.Flags += -v
+  VERBOSE := 1
+endif
+
 # Adjust settings for verbose mode
 ifndef VERBOSE
   Verb := @
@@ -267,11 +276,12 @@ Link          = $(LIBTOOL) $(LibTool.Flags) --mode=link $(CXX) $(CPP.Flags) \
                $(CompileCommonOpts) $(LD.Flags) $(Strip)
 Relink        = $(LIBTOOL) $(LibTool.Flags) --mode=link $(CXX) $(CPP.Flags) \
                 $(CompileCommonOpts)
-BCLinkLib     = $(LLVMGCC) -shared -nostdlib
+BCLinkLib     = $(LLVMGCC) -shared -nostdlib $(BCLinkLib.Flags)
 LTInstall     = $(LIBTOOL) $(LibTool.Flags) --mode=install $(INSTALL)
 Burg          = $(BURG) -I $(BUILD_SRC_DIR)
 TableGen      = $(TBLGEN) -I $(BUILD_SRC_DIR)
 Archive       = $(AR) $(AR.Flags)
+LArchive      = $(ToolDir)/llvm-ar rcsf
 ifdef RANLIB
 Ranlib        = $(RANLIB)
 else
@@ -373,6 +383,7 @@ SubDirs += $(PARALLEL_DIRS)
 # recursive targets are added.
 all      :: $(addsuffix /.makeall      ,$(PARALLEL_DIRS))
 clean    :: $(addsuffix /.makeclean    ,$(PARALLEL_DIRS))
+clean-all:: $(addsuffix /.makeclean-all,$(PARALLEL_DIRS))
 check    :: $(addsuffix /.makecheck    ,$(PARALLEL_DIRS))
 install  :: $(addsuffix /.makeinstall  ,$(PARALLEL_DIRS))
 uninstall:: $(addsuffix /.makeuninstall,$(PARALLEL_DIRS))
@@ -458,7 +469,7 @@ $(LibName.LA): $(BUILT_SOURCES) $(ObjectsLO) $(LibDir)/.dir
 
 clean-local::
 ifneq ($(strip $(LibName.LA)),)
-       $(Verb) $(RM) -f $(LibName.LA)
+       -$(Verb) $(RM) -f $(LibName.LA)
 endif
 
 DestSharedLib = $(libdir)/lib$(LIBRARYNAME)$(SHLIBEXT)
@@ -472,7 +483,7 @@ $(DestSharedLib): $(libdir) $(LibName.LA)
 
 uninstall-local:: 
        $(Echo) Uninstalling $(BuildMode) Shared Library $(DestSharedLib)
-       $(Verb) $(RM) -f $(DestSharedLib)
+       -$(Verb) $(RM) -f $(libdir)/lib$(LIBRARYNAME).*
 
 endif
 
@@ -502,7 +513,7 @@ $(LibName.BC): $(BUILT_SOURCES) $(ObjectsBC) $(LibDir)/.dir
 
 clean-local::
 ifneq ($(strip $(LibName.BC)),)
-       $(Verb) $(RM) -f $(LibName.BC)
+       -$(Verb) $(RM) -f $(LibName.BC)
 endif
 
 DestBytecodeLib = $(bytecode_libdir)/lib$(LIBRARYNAME).bc
@@ -515,7 +526,7 @@ $(DestBytecodeLib): $(bytecode_libdir) $(LibName.BC)
 
 uninstall-local::
        $(Echo) Uninstalling $(BuildMode) Bytecode Library $(DestBytecodeLib)
-       $(Verb) $(RM) -f $(DestBytecodeLib)
+       -$(Verb) $(RM) -f $(DestBytecodeLib)
 
 endif
 
@@ -534,7 +545,7 @@ $(LibName.O): $(BUILT_SOURCES) $(ObjectsO) $(LibDir)/.dir
 
 clean-local::
 ifneq ($(strip $(LibName.O)),)
-       $(Verb) $(RM) -f $(LibName.O)
+       -$(Verb) $(RM) -f $(LibName.O)
 endif
 
 DestRelinkedLib = $(libdir)/$(LIBRARYNAME).o
@@ -547,7 +558,7 @@ $(DestRelinkedLib): $(libdir) $(LibName.O)
 
 uninstall-local::
        $(Echo) Uninstalling $(BuildMode) Object Library $(DestRelinkedLib)
-       $(Verb) $(RM) -f $(DestRelinkedLib)
+       -$(Verb) $(RM) -f $(DestRelinkedLib)
 
 endif
 
@@ -562,13 +573,13 @@ all-local:: $(LibName.A)
 
 $(LibName.A): $(BUILT_SOURCES) $(ObjectsO) $(LibDir)/.dir
        $(Echo) Building $(BuildMode) Archive Library $(notdir $@)
-       $(Verb)$(RM) -f $@
+       -$(Verb) $(RM) -f $@
        $(Verb) $(Archive) $@ $(ObjectsO)
        $(Verb) $(Ranlib) $@
 
 clean-local::
 ifneq ($(strip $(LibName.A)),)
-       $(Verb) $(RM) -f $(LibName.A)
+       -$(Verb) $(RM) -f $(LibName.A)
 endif
 
 DestArchiveLib := $(libdir)/lib$(LIBRARYNAME).a
@@ -582,7 +593,7 @@ $(DestArchiveLib): $(libdir) $(LibName.A)
 
 uninstall-local::
        $(Echo) Uninstalling $(BuildMode) Archive Library $(DestArchiveLib)
-       $(Verb) $(RM) -f $(DestArchiveLib)
+       -$(Verb) $(RM) -f $(DestArchiveLib)
 
 endif
 
@@ -633,7 +644,7 @@ all-local:: $(ToolBuildPath)
 
 clean-local::
 ifneq ($(strip $(ToolBuildPath)),)
-       $(Verb) $(RM) -f $(ToolBuildPath)
+       -$(Verb) $(RM) -f $(ToolBuildPath)
 endif
 
 $(ToolBuildPath): $(BUILT_SOURCES) $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths)\
@@ -653,7 +664,7 @@ $(DestTool): $(bindir) $(ToolBuildPath)
 
 uninstall-local::
        $(Echo) Uninstalling $(BuildMode) $(DestTool)
-       $(Verb) $(RM) -f $(DestTool)
+       -$(Verb) $(RM) -f $(DestTool)
 
 endif
 
@@ -809,7 +820,7 @@ $(INCFiles) : $(TBLGEN) $(TDFiles)
        $(Verb) $(TableGen) -gen-emitter -o $@ $<
 
 clean-local::
-       $(Verb) $(RM) -f $(INCFiles)
+       -$(Verb) $(RM) -f $(INCFiles)
 
 endif
 
@@ -822,9 +833,11 @@ endif
 # (f)lex input sources. 
 #---------------------------------------------------------
 
-LexOutput   := $(strip $(subst %.l,%.cpp,$(filter %.l,$(Sources))))
+LexFiles  := $(filter %.l,$(Sources))
 
-ifneq ($(LexOutput),)
+ifneq ($(LexFiles),)
+
+LexOutput := $(strip $(patsubst %.l,%.cpp,$(LexFiles)))
 
 .PRECIOUS: $(LexOutput)
 
@@ -843,7 +856,8 @@ ifneq ($(LexOutput),)
          > $@
 
 clean-local::
-       $(RM) -f $(LexOutput)
+       -$(Verb) $(RM) -f $(LexOutput)
+       $(Verb) $(RM) -f $(LexOutput)
 
 endif
 
@@ -852,10 +866,9 @@ endif
 # from yacc (bison) input sources.
 #---------------------------------------------------------
 
-YaccOutput  := $(strip $(addprefix $(subst %.y,%,$(filter %.y,$(Sources))),\
-               .h .cpp .output))
-
-ifneq ($(YaccOutput),)
+YaccFiles  := $(filter %.y,$(Sources))
+ifneq ($(YaccFiles),)
+YaccOutput := $(addprefix $(patsubst %.y,%,$(YaccFiles)),.h .cpp .output)
 
 .PRECIOUS: $(YaccOutput)
 
@@ -872,7 +885,8 @@ ifneq ($(YaccOutput),)
        $(Verb) $(MV) -f $*.tab.h $*.h
 
 clean-local::
-       $(RM) -f $(YaccOutput)
+       -$(Verb) $(RM) -f $(YaccOutput)
+       $(Verb) $(RM) -f $(YaccOutput)
 endif
 
 ###############################################################################
@@ -898,19 +912,36 @@ endif
 # errors or disastrous removal.
 clean-local::
 ifneq ($(strip $(ObjDir)),)
-       $(Verb) $(RM) -rf $(ObjDir)
+       -$(Verb) $(RM) -rf $(ObjDir)
 endif
-       $(Verb) $(RM) -f core core.[0-9][0-9]* *.o *.d *~ *.flc
+       -$(Verb) $(RM) -f core core.[0-9][0-9]* *.o *.d *~ *.flc
 ifneq ($(strip $(SHLIBEXT)),) # Extra paranoia - make real sure SHLIBEXT is set
-       $(Verb) $(RM) -f *$(SHLIBEXT)
+       -$(Verb) $(RM) -f *$(SHLIBEXT)
 endif
 
+clean-all-local::
+       -$(Verb) $(RM) -rf Debug Release Profile
+
 # Build tags database for Emacs/Xemacs:
-tags:: TAGS
+tags:: TAGS CTAGS
+
 TAGS: 
-       find include lib tools examples -name '*.cpp' -o -name '*.h' | \
+       find $(BUILD_SRC_ROOT)/include $(BUILD_SRC_ROOT)/lib \
+          $(BUILD_SRC_ROOT)/tools $(BUILD_SRC_ROOT)/examples \
+          $(BUILD_OBJ_ROOT)/include $(BUILD_OBJ_ROOT)/lib \
+          $(BUILD_OBJ_ROOT)/tools $(BUILD_OBJ_ROOT)/examples \
+        -name '*.cpp' -o -name '*.h' | \
         $(ETAGS) $(ETAGSFLAGS) -
 
+CTAGS:
+       find $(BUILD_SRC_ROOT)/include $(BUILD_SRC_ROOT)/lib \
+          $(BUILD_SRC_ROOT)/tools $(BUILD_SRC_ROOT)/examples \
+          $(BUILD_OBJ_ROOT)/include $(BUILD_OBJ_ROOT)/lib \
+          $(BUILD_OBJ_ROOT)/tools $(BUILD_OBJ_ROOT)/examples \
+          \( -name '*.cpp' -o -name '*.h' \) -print | \
+          ctags -ImtT -o $(BUILD_OBJ_ROOT)/CTAGS -L -
+
+
 ###############################################################################
 # DEPENDENCIES: Include the dependency files if we should
 ###############################################################################
@@ -1035,7 +1066,7 @@ dist-check:: $(DistCheckTop) $(DistTarGZip)
 
 dist-clean::
        $(Echo) Cleaning distribution files
-       $(Verb) $(RM) -rf $(DistTarGZip) $(DistTarBZ2) $(DistZip) $(DistName) $(DistCheckDir)
+       -$(Verb) $(RM) -rf $(DistTarGZip) $(DistTarBZ2) $(DistZip) $(DistName) $(DistCheckDir)
 
 endif
 
@@ -1168,3 +1199,5 @@ printvars::
        $(Echo) "Compile.CXX    : " '$(Compile.CXX)'
        $(Echo) "Compile.C      : " '$(Compile.C)'
        $(Echo) "Archive        : " '$(Archive)'
+       $(Echo) "YaccFiles      : " '$(YaccFiles)'
+       $(Echo) "LexFiles       : " '$(LexFiles)'