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

John Criswell criswell at choi.cs.uiuc.edu
Thu Jun 26 10:55:01 PDT 2003


Changes in directory llvm:

Makefile.common updated: 1.88.2.4 -> 1.88.2.5

---
Log message:

Fixed the rules for building dynamic objects.  This involved making each shell
command its own line (since the $VERB was causing /bin/sh grief).
Also modified the makefile so that the target all builds a dynamically linked
library if SHARED_LIBRARY is defined.  This fixes a problems where recursive
builds didn't build the library.
Fixed the distclean target so that it cleans LLVM proper instead of your
projects directory.



---
Diffs of the changes:

Index: llvm/Makefile.common
diff -u llvm/Makefile.common:1.88.2.4 llvm/Makefile.common:1.88.2.5
--- llvm/Makefile.common:1.88.2.4	Wed Jun 25 13:43:32 2003
+++ llvm/Makefile.common	Thu Jun 26 10:53:56 2003
@@ -130,7 +130,7 @@
 
 ifdef SHARED_LIBRARY
 # if SHARED_LIBRARY is specified, the default is to build the dynamic lib
-dynamic ::
+all:: dynamic
 endif
 
 # Default Rule:  Make sure it's also a :: rule
@@ -467,35 +467,35 @@
 # Rules for building dynamically linked libraries.
 #
 $(LIBNAME_O): $(LObjectsO) $(LibSubDirs) $(DESTLIBRELEASE)/.dir
-	@echo ======= Linking $(LIBRARYNAME) release library =======
-	$(VERB) $(Link) -o $*.la $(LObjectsO) $(LibSubDirs) $(LibLinkOpts); \
+	@echo ======= Linking $(LIBRARYNAME) dynamic release library =======
+	$(VERB) $(Link) -o $*.la $(LObjectsO) $(LibSubDirs) $(LibLinkOpts);
 	$(VERB) $(LIBTOOL) --mode=install $(INSTALL) $*.la $(DESTLIBCURRENT);
 
 $(LIBNAME_P): $(LObjectsP) $(LibSubDirs) $(DESTLIBPROFILE)/.dir
-	@echo ======= Linking $(LIBRARYNAME) profile library =======
-	$(VERB) $(Link) -o $*.la $(LObjectsP) $(LibSubDirs) $(LibLinkOpts); \
+	@echo ======= Linking $(LIBRARYNAME) dynamic profile library =======
+	$(VERB) $(Link) -o $*.la $(LObjectsP) $(LibSubDirs) $(LibLinkOpts);
 	$(VERB) $(LIBTOOL) --mode=install $(INSTALL) $*.la $(DESTLIBCURRENT);
 
 $(LIBNAME_G): $(LObjectsG) $(LibSubDirs) $(DESTLIBDEBUG)/.dir
-	@echo ======= Linking $(LIBRARYNAME) debug library =======
-	$(VERB) $(Link) -o $*.la $(LObjectsG) $(LibSubDirs) $(LibLinkOpts); \
+	@echo ======= Linking $(LIBRARYNAME) dynamic debug library =======
+	$(VERB) $(Link) -o $*.la $(LObjectsG) $(LibSubDirs) $(LibLinkOpts);
 	$(VERB) $(LIBTOOL) --mode=install $(INSTALL) $*.la $(DESTLIBCURRENT);
 
 #
 # Rules for building static archive libraries.
 #
 $(LIBNAME_AO): $(LObjectsO) $(LibSubDirs) $(DESTLIBRELEASE)/.dir
-	@echo ======= Linking $(LIBRARYNAME) release library =======
+	@echo ======= Linking $(LIBRARYNAME) archive release library =======
 	@$(RM) -f $@
 	$(VERB) $(Link) -03 -o $@ $(LObjectsO) $(LibSubDirs) -static
 
 $(LIBNAME_AP): $(LObjectsP) $(LibSubDirs) $(DESTLIBPROFILE)/.dir
-	@echo ======= Linking $(LIBRARYNAME) profile library =======
+	@echo ======= Linking $(LIBRARYNAME) archive profile library =======
 	@$(RM) -f $@
 	$(VERB) $(Link) -03 $(PROFILE) -o $@ $(LObjectsP) $(LibSubDirs) -static
 
 $(LIBNAME_AG): $(ObjectsG) $(LibSubDirs) $(DESTLIBDEBUG)/.dir
-	@echo ======= Linking $(LIBRARYNAME) debug library =======
+	@echo ======= Linking $(LIBRARYNAME) archive debug library =======
 	@$(RM) -f $@
 	$(VERB) $(Link) -g $(STRIP) -o $@ $(LObjectsG) $(LibSubDirs) -static
 
@@ -712,10 +712,10 @@
 	$(VERB) $(RM) -f $(LEX_OUTPUT) $(YACC_OUTPUT)
 
 distclean:: clean
-	$(VERB) $(RM) -rf $(LEVEL)/Makefile.config \
-	                  $(LEVEL)/include/Config/config.h \
-	                  $(LEVEL)/autom4te.cache \
-	                  $(LEVEL)/config.log
+	$(VERB) (cd $(LLVM_SRC_ROOT); $(RM) -rf $(LEVEL)/Makefile.config \
+	            $(LEVEL)/include/Config/config.h \
+	            $(LEVEL)/autom4te.cache \
+	            $(LEVEL)/config.log)
 
 ###########################################################################
 # C/C++ Dependencies





More information about the llvm-commits mailing list