[llvm-commits] CVS: llvm/Makefile.common

John Criswell criswell at choi.cs.uiuc.edu
Mon Jun 30 10:17:03 PDT 2003


Changes in directory llvm:

Makefile.common updated: 1.88.2.7 -> 1.88.2.8

---
Log message:

Modified the Makefiles so that dependency rules use .lo files (libtool) as
opposed to .o files to determine if targets are out of date.
Note that the generated header file dependencies aren't handled properly yet.


---
Diffs of the changes:

Index: llvm/Makefile.common
diff -u llvm/Makefile.common:1.88.2.7 llvm/Makefile.common:1.88.2.8
--- llvm/Makefile.common:1.88.2.7	Fri Jun 27 13:35:24 2003
+++ llvm/Makefile.common	Mon Jun 30 10:16:08 2003
@@ -390,10 +390,10 @@
 Source  := $(ExtraSource) $(wildcard *.cpp *.c *.y *.l)
 endif
 
-Objs := $(sort $(patsubst Debug/%.o, %.o, $(addsuffix .o,$(notdir $(basename $(Source))))))
-ObjectsO := $(addprefix $(BUILD_OBJ_DIR)/Release/,$(Objs))
-ObjectsP := $(addprefix $(BUILD_OBJ_DIR)/Profile/,$(Objs))
-ObjectsG := $(addprefix $(BUILD_OBJ_DIR)/Debug/,$(Objs))
+#Objs := $(sort $(patsubst Debug/%.o, %.o, $(addsuffix .o,$(notdir $(basename $(Source))))))
+#ObjectsO := $(addprefix $(BUILD_OBJ_DIR)/Release/,$(Objs))
+#ObjectsP := $(addprefix $(BUILD_OBJ_DIR)/Profile/,$(Objs))
+#ObjectsG := $(addprefix $(BUILD_OBJ_DIR)/Debug/,$(Objs))
 
 LObjs := $(sort $(patsubst Debug/%.lo, %.lo, $(addsuffix .lo,$(notdir $(basename $(Source))))))
 LObjectsO := $(addprefix $(BUILD_OBJ_DIR)/Release/,$(LObjs))
@@ -522,7 +522,7 @@
 	@$(RM) -f $@
 	$(VERB) $(Link) -03 $(PROFILE) -o $@ $(LObjectsP) $(LibSubDirs) -static
 
-$(LIBNAME_AG): $(ObjectsG) $(LibSubDirs) $(DESTLIBDEBUG)/.dir
+$(LIBNAME_AG): $(LObjectsG) $(LibSubDirs) $(DESTLIBDEBUG)/.dir
 	@echo ======= Linking $(LIBRARYNAME) archive debug library =======
 	@$(RM) -f $@
 	$(VERB) $(Link) -g $(STRIP) -o $@ $(LObjectsG) $(LibSubDirs) -static
@@ -530,17 +530,17 @@
 #
 # Rules for building .o libraries.
 #
-$(LIBNAME_OBJO): $(ObjectsO) $(LibSubDirs) $(DESTLIBRELEASE)/.dir
+$(LIBNAME_OBJO): $(LObjectsO) $(LibSubDirs) $(DESTLIBRELEASE)/.dir
 	@echo "Linking $@"
-	$(VERB) $(Relink) -o $@ $(ObjectsO) $(LibSubDirs)
+	$(VERB) $(Relink) -o $@ $(LObjectsO) $(LibSubDirs)
 
-$(LIBNAME_OBJP): $(ObjectsP) $(LibSubDirs) $(DESTLIBPROFILE)/.dir
+$(LIBNAME_OBJP): $(LObjectsP) $(LibSubDirs) $(DESTLIBPROFILE)/.dir
 	@echo "Linking $@"
-	$(VERB) $(Relink) -o $@ $(ObjectsP) $(LibSubDirs)
+	$(VERB) $(Relink) -o $@ $(LObjectsP) $(LibSubDirs)
 
-$(LIBNAME_OBJG): $(ObjectsG) $(LibSubDirs) $(DESTLIBDEBUG)/.dir
+$(LIBNAME_OBJG): $(LObjectsG) $(LibSubDirs) $(DESTLIBDEBUG)/.dir
 	@echo "Linking $@"
-	$(VERB) $(Relink) -o $@ $(ObjectsG) $(LibSubDirs)
+	$(VERB) $(Relink) -o $@ $(LObjectsG) $(LibSubDirs)
 
 endif
 
@@ -622,17 +622,17 @@
 clean::
 	$(VERB) $(RM) -f $(TOOLEXENAMES)
 
-$(TOOLEXENAME_G): $(ObjectsG) $(USED_LIB_PATHS_G) $(DESTTOOLDEBUG)/.dir
+$(TOOLEXENAME_G): $(LObjectsG) $(USED_LIB_PATHS_G) $(DESTTOOLDEBUG)/.dir
 	@echo ======= Linking $(TOOLNAME) debug executable $(STRIP_WARN_MSG)=======
-	$(VERB) $(LinkG) -o $@ $(ObjectsG) $(LIB_OPTS_G) $(LINK_OPTS) $(LIBS)
+	$(VERB) $(LinkG) -o $@ $(LObjectsG) $(LIB_OPTS_G) $(LINK_OPTS) $(LIBS)
 
-$(TOOLEXENAME_O): $(ObjectsO) $(USED_LIB_PATHS_O) $(DESTTOOLRELEASE)/.dir
+$(TOOLEXENAME_O): $(LObjectsO) $(USED_LIB_PATHS_O) $(DESTTOOLRELEASE)/.dir
 	@echo ======= Linking $(TOOLNAME) release executable =======
-	$(VERB) $(LinkO) -o $@ $(ObjectsO) $(LIB_OPTS_O) $(LINK_OPTS) $(LIBS)
+	$(VERB) $(LinkO) -o $@ $(LObjectsO) $(LIB_OPTS_O) $(LINK_OPTS) $(LIBS)
 
-$(TOOLEXENAME_P): $(ObjectsP) $(USED_LIB_PATHS_P) $(DESTTOOLPROFILE)/.dir
+$(TOOLEXENAME_P): $(LObjectsP) $(USED_LIB_PATHS_P) $(DESTTOOLPROFILE)/.dir
 	@echo ======= Linking $(TOOLNAME) profile executable =======
-	$(VERB) $(LinkP) -o $@ $(ObjectsP) $(LIB_OPTS_P) $(LINK_OPTS) $(LIBS)
+	$(VERB) $(LinkP) -o $@ $(LObjectsP) $(LIB_OPTS_P) $(LINK_OPTS) $(LIBS)
 
 endif
 
@@ -643,27 +643,27 @@
 .PRECIOUS: $(BUILD_OBJ_DIR)/Debug/.dir $(BUILD_OBJ_DIR)/Release/.dir
 
 # Create .o files in the ObjectFiles directory from the .cpp and .c files...
-$(BUILD_OBJ_DIR)/Release/%.o: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Release/.dir
-	@echo "Compiling $<"
-	$(VERB) $(CompileO) $< -o $@
-
-$(BUILD_OBJ_DIR)/Release/%.o: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Release/.dir
-	$(VERB) $(CompileCO) $< -o $@
-
-$(BUILD_OBJ_DIR)/Profile/%.o: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Profile/.dir
-	@echo "Compiling $<"
-	$(VERB) $(CompileP) $< -o $@
+#$(BUILD_OBJ_DIR)/Release/%.o: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Release/.dir
+	#@echo "Compiling $<"
+	#$(VERB) $(CompileO) $< -o $@
+
+#$(BUILD_OBJ_DIR)/Release/%.o: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Release/.dir
+	#$(VERB) $(CompileCO) $< -o $@
+
+#$(BUILD_OBJ_DIR)/Profile/%.o: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Profile/.dir
+	#@echo "Compiling $<"
+	#$(VERB) $(CompileP) $< -o $@
+
+#$(BUILD_OBJ_DIR)/Profile/%.o: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Profile/.dir
+	#@echo "Compiling $<"
+	#$(VERB) $(CompileCP) $< -o $@
+
+#$(BUILD_OBJ_DIR)/Debug/%.o: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Debug/.dir
+	#@echo "Compiling $<"
+	#$(VERB) $(CompileG) $< -o $@
 
-$(BUILD_OBJ_DIR)/Profile/%.o: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Profile/.dir
-	@echo "Compiling $<"
-	$(VERB) $(CompileCP) $< -o $@
-
-$(BUILD_OBJ_DIR)/Debug/%.o: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Debug/.dir
-	@echo "Compiling $<"
-	$(VERB) $(CompileG) $< -o $@
-
-$(BUILD_OBJ_DIR)/Debug/%.o: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Debug/.dir 
-	$(VERB) $(CompileCG) $< -o $@
+#$(BUILD_OBJ_DIR)/Debug/%.o: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Debug/.dir 
+	#$(VERB) $(CompileCG) $< -o $@
 
 # Create .lo files in the ObjectFiles directory from the .cpp and .c files...
 $(BUILD_OBlJ_DIR)/Release/%.lo: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Release/.dir
@@ -722,7 +722,7 @@
 
 # To create the directories...
 %/.dir:
-	$(VERB) ${MKDIR} $*
+	$(VERB) ${MKDIR} $* > /dev/null
 	@$(DATE) > $@
 
 # To create postscript files from dot files...





More information about the llvm-commits mailing list