Provide support for auto-detection and use of compression libraries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16643 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Makefile.rules b/Makefile.rules
index 76b00ae..adf5ef9 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -463,8 +463,8 @@
$(MKDIR) $(sysconfdir)
install-config-files: $(sysconfdir) $(CONFIG_FILES)
- $(VERB) echo Installing Configuration Files To $(sysconfdir)
- $(VERB) for file in $(CONFIG_FILES); do \
+ $(VERB)$(ECHO) Installing Configuration Files To $(sysconfdir)
+ $(VERB)for file in $(CONFIG_FILES); do \
$(INSTALL) $(SourceDir)/$${file} $(sysconfdir) ; \
done
endif
@@ -527,7 +527,7 @@
$(DESTDIR)$(bytecode_libdir)/lib$(LIBRARYNAME).bc: $(LIBNAME_BC) $(DESTDIR)$(bytecode_libdir)
@${ECHO} ======= Installing $(LIBRARYNAME) bytecode library =======
- cp $< $@
+ $(VERB)cp $< $@
# Does the library want a .o version built?
ifndef DONT_BUILD_RELINKED
@@ -593,7 +593,7 @@
#
$(LIBNAME_AO): $(ObjectsO) $(LibSubDirs) $(DESTLIBRELEASE)/.dir
@${ECHO} Linking $(LIBRARYNAME) archive release library
- @$(RM) -f $@
+ $(VERB)$(RM) -f $@
$(VERB) $(Link) -03 -o $@ $(ObjectsO) $(LibSubDirs) -static
@${ECHO} Finished building $(LIBRARYNAME) archive release library =======
@@ -656,6 +656,13 @@
#
ifdef TOOLNAME
+# Handle compression libraries automatically
+ifeq ($(HAVE_BZIP2),1)
+USEDLIBS += bz2.a
+endif
+ifeq ($(HAVE_ZLIB),1)
+USEDLIBS += z.a
+endif
# TOOLEXENAME* - These compute the output filenames to generate...
TOOLEXENAME_G := $(DESTTOOLDEBUG)/$(TOOLNAME)
TOOLEXENAME_O := $(DESTTOOLRELEASE)/$(TOOLNAME)
@@ -728,8 +735,9 @@
@${ECHO} ======= Finished building $(TOOLNAME) profile executable =======
install:: $(TOOLEXENAMES)
- $(MKDIR) $(DESTDIR)$(bindir)
- $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) -c -m 0755 $(TOOLEXENAMES) $(DESTDIR)$(bindir)/$(TOOLNAME)
+ @${ECHO} Installing $(TOOLEXENAMES) to $(DESTDIR)$(bindir)
+ $(VERB)$(MKDIR) $(DESTDIR)$(bindir)
+ $(VERB)$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) -c -m 0755 $(TOOLEXENAMES) $(DESTDIR)$(bindir)/$(TOOLNAME)
endif