Add Debug+Asserts and Release+Asserts to svn:ignore properties.
[oota-llvm.git] / Makefile.rules
index a058838d6100c0e6058100897b2d586b5f27759c..dc15c921ffcdebad46ece8633667211df1d81216 100644 (file)
@@ -398,12 +398,11 @@ endif
 
 # If DISABLE_ASSERTIONS=1 is specified (make command line or configured),
 # then disable assertions by defining the appropriate preprocessor symbols.
-ifdef DISABLE_ASSERTIONS
-  # Indicate that assertions are turned off using a minus sign
-  BuildMode := $(BuildMode)-Asserts
-  CPP.Defines += -DNDEBUG
-else
+ifndef DISABLE_ASSERTIONS
+  BuildMode := $(BuildMode)+Asserts
   CPP.Defines += -D_DEBUG
+else
+  CPP.Defines += -DNDEBUG
 endif
 
 # If ENABLE_EXPENSIVE_CHECKS=1 is specified (make command line or
@@ -808,7 +807,7 @@ ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
 $(RecursiveTargets)::
        $(Verb) for dir in $(DIRS); do \
          if ([ ! -f $$dir/Makefile ] || \
-             [ $$dir/Makefile -ot $(PROJ_SRC_DIR)/$$dir/Makefile ]); then \
+             command test $$dir/Makefile -ot $(PROJ_SRC_DIR)/$$dir/Makefile ); then \
            $(MKDIR) $$dir; \
            $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
          fi; \
@@ -831,7 +830,7 @@ ifdef EXPERIMENTAL_DIRS
 $(RecursiveTargets)::
        $(Verb) for dir in $(EXPERIMENTAL_DIRS); do \
          if ([ ! -f $$dir/Makefile ] || \
-             [ $$dir/Makefile -ot $(PROJ_SRC_DIR)/$$dir/Makefile ]); then \
+             command test $$dir/Makefile -ot $(PROJ_SRC_DIR)/$$dir/Makefile ); then \
            $(MKDIR) $$dir; \
            $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
          fi; \
@@ -866,8 +865,8 @@ ParallelTargets := $(foreach T,$(RecursiveTargets),%/.make$(T))
 
 $(ParallelTargets) :
        $(Verb) if ([ ! -f $(@D)/Makefile ] || \
-                   [ $(@D)/Makefile -ot \
-                      $(PROJ_SRC_DIR)/$(@D)/Makefile ]); then \
+                   command test $(@D)/Makefile -ot \
+                      $(PROJ_SRC_DIR)/$(@D)/Makefile ); then \
          $(MKDIR) $(@D); \
          $(CP) $(PROJ_SRC_DIR)/$(@D)/Makefile $(@D)/Makefile; \
        fi; \
@@ -887,7 +886,7 @@ $(RecursiveTargets)::
        $(Verb) for dir in $(OPTIONAL_DIRS); do \
          if [ -d $(PROJ_SRC_DIR)/$$dir ]; then\
            if ([ ! -f $$dir/Makefile ] || \
-               [ $$dir/Makefile -ot $(PROJ_SRC_DIR)/$$dir/Makefile ]); then \
+               command test $$dir/Makefile -ot $(PROJ_SRC_DIR)/$$dir/Makefile ); then \
              $(MKDIR) $$dir; \
              $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
            fi; \
@@ -935,7 +934,7 @@ endif
 endif
 
 ###############################################################################
-# Set up variables for building libararies
+# Set up variables for building libraries
 ###############################################################################
 
 #---------------------------------------------------------
@@ -1131,7 +1130,7 @@ $(LibName.SO): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths) $(LibDir)/.dir
          $(ProjLibsOptions) $(LLVMLibsOptions) $(LIBS)
 else
 $(LibName.SO): $(ObjectsO) $(LibDir)/.dir
-       $(Echo) Linking $(BuildMode) Shared Library $(LIBRARYNAME)$(SHLIBEXT)
+       $(Echo) Linking $(BuildMode) Shared Library $(basename $@)
        $(Verb) $(Link) $(SharedLinkOptions) -o $@ $(ObjectsO)
 endif