Transform floor((double)FLT) -> (double)floorf(FLT), implementing
[oota-llvm.git] / Makefile.rules
index b32cf803e7faba77b074badbeed45155f0c01992..61e683239e890dded4d3070827301115b70ec5a3 100644 (file)
@@ -28,6 +28,13 @@ TopLevelTargets  := check dist dist-check dist-clean tags dist-gzip dist-bzip2 \
 UserTargets      := $(RecursiveTargets) $(LocalTargets) $(TopLevelTargets)
 InternalTargets  := preconditions distdir dist-hook
 
+FilesToConfig := \
+  include/llvm/Config/config.h \
+  include/llvm/Support/DataTypes.h \
+  include/llvm/ADT/hash_map \
+  include/llvm/ADT/hash_set \
+  include/llvm/ADT/iterator
+
 ################################################################################
 # INITIALIZATION: Basic things the makefile needs
 ################################################################################
@@ -77,6 +84,9 @@ ifneq ($(MakefileConfigIn),)
 PreConditions      += $(MakefileConfig)
 endif
 
+FilesToConfigPATH  := $(addprefix $(LLVM_OBJ_ROOT)/,$(FilesToConfig))
+PreConditions      += $(FilesToConfigPATH)
+
 preconditions : $(PreConditions)
 
 #------------------------------------------------------------------------
@@ -134,6 +144,11 @@ $(ConfigStatusScript): $(ConfigureScript)
          $(ConfigStatusScript) --recheck $(ConfigureScriptFLAGS) && \
          $(ConfigStatusScript)
 
+.PRECIOUS: $(FilesToConfigPATH)
+$(FilesToConfigPATH) : $(LLVM_OBJ_ROOT)/% : $(LLVM_SRC_ROOT)/%.in 
+       $(Echo) Regenerating $*
+       $(Verb) cd $(LLVM_OBJ_ROOT) && $(ConfigStatusScript) $*
+
 #------------------------------------------------------------------------
 # Make sure the configuration makefile is up to date
 #------------------------------------------------------------------------
@@ -604,7 +619,7 @@ endif
 
 # You can enable the Alpha JIT on a non-Alpha host by setting the flag
 # ENABLE_ALPHA_JIT on the make command line. If not, it will still be
-# enabled automagically on an PowerPC host.
+# enabled automagically on an Alpha host.
 ifeq ($(ARCH), Alpha)
   ENABLE_ALPHA_JIT = 1
 endif
@@ -625,6 +640,12 @@ endif
 # (defined by the user's project) and "LLVM" libs (defined 
 # by the # LLVM project).
 #---------------------------------------------------------
+# Some versions of gcc on Alpha produce too many symbols, so use a .a file
+ifeq ($(ARCH),Alpha)
+USEDLIBS :=  $(subst LLVMCore, LLVMCore.a, $(USEDLIBS))
+LLVMLIBS := $(subst LLVMCore, LLVMCore.a, $(LLVMLIBS))
+endif
+
 ProjLibsOptions := $(patsubst %.a.o, -l%, $(addsuffix .o, $(USEDLIBS)))
 ProjLibsOptions := $(patsubst %.o, $(LibDir)/%.o,  $(ProjLibsOptions))
 LLVMLibsOptions := $(patsubst %.a.o, -l%, $(addsuffix .o, $(LLVMLIBS)))
@@ -1570,3 +1591,4 @@ printvars::
        $(Echo) "YaccFiles    : " '$(YaccFiles)'
        $(Echo) "LexFiles     : " '$(LexFiles)'
        $(Echo) "Module       : " '$(Module)'
+       $(Echo) "FilesToConfig: " '$(FilesToConfigPATH)'