summaryrefslogtreecommitdiffstats
path: root/liblvm
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2010-04-09 21:42:48 +0000
committerZdenek Kabelac <zkabelac@redhat.com>2010-04-09 21:42:48 +0000
commit23b059e7b7559280966b806e30d5b1e9c1ecfeaa (patch)
tree9048a37126534d34c906b0cd34a46af4e68975de /liblvm
parentc737d348045479f71ea7d31eaeadda16eea94aa9 (diff)
downloadlvm2-23b059e7b7559280966b806e30d5b1e9c1ecfeaa.tar.gz
lvm2-23b059e7b7559280966b806e30d5b1e9c1ecfeaa.tar.xz
lvm2-23b059e7b7559280966b806e30d5b1e9c1ecfeaa.zip
INSTALL rules updates
Patch is inspired by Debian's extra patch. - removes OWNER & GROUP make vars they are parts of INSTALL command. - adds INSTALL_PROGRAM for executable, uses $(INSTALL) - adds INSTALL_DATA for non-executable data, uses ($INSTALL) - adds INSTALL_WDATA for writable non-executable data, uses ($INSTALL) - adds configure option --enable-write_install - to support installatin of writable files used by distribution - replaces usage of ifeq @LIB_SUFFIX@ with $(LIB_SUFFIX) - installs .a files from static builds without executable flag - installs .a files to $(usrlibdir) instead of $(libdir) - installs all static binaries to $(staticdir) - create .so links for devel package in $(usrlibdir) instead of $(libdir) - makes .so and .so.LIB_VERSION files within builddir - removes VERSIONED_SHLIB and created versioned LIB_SHARED automagicaly - install LIB_SHARED via install_lib_shared target - install plugins via install_lib_shared_plugin target - prints whole 'install' command during installation instead of less informative "Installing $(something) $(somewhere)" - install multiple man pages with one INSTALL command - use DISTCLEAN_TARGETS instead of creating multiple distclean targets
Diffstat (limited to 'liblvm')
-rw-r--r--liblvm/Makefile.in44
1 files changed, 11 insertions, 33 deletions
diff --git a/liblvm/Makefile.in b/liblvm/Makefile.in
index 165ce46f..66904296 100644
--- a/liblvm/Makefile.in
+++ b/liblvm/Makefile.in
@@ -1,6 +1,6 @@
#
# Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
-# Copyright (C) 2004-2009 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2004-2010 Red Hat, Inc. All rights reserved.
#
# This file is part of LVM2.
#
@@ -25,19 +25,14 @@ SOURCES =\
LIB_NAME = liblvm2app
LIB_VERSION = $(LIB_VERSION_APP)
-VERSIONED_SHLIB = $(LIB_NAME).$(LIB_SUFFIX).$(LIB_VERSION_APP)
ifeq ("@STATIC_LINK@", "yes")
LIB_STATIC = $(LIB_NAME).a
endif
-ifeq ("@LIB_SUFFIX@","dylib")
- LIB_SHARED = $(LIB_NAME).dylib
-else
- LIB_SHARED = $(LIB_NAME).so
-endif
+LIB_SHARED = $(LIB_NAME).$(LIB_SUFFIX)
-CLEAN_TARGETS += liblvm.cflow
+CLEAN_TARGETS += liblvm.cflow $(LIB_NAME).a
include $(top_builddir)/make.tmpl
@@ -47,12 +42,7 @@ ifeq ("@DMEVENTD@", "yes")
LIBS += -ldevmapper-event
endif
-$(VERSIONED_SHLIB): %.$(LIB_SUFFIX).$(LIB_VERSION_APP): %.$(LIB_SUFFIX)
- rm -f $@
- $(LN_S) $< $@
-
-.PHONY: install_dynamic install_static install_include install_pkgconfig \
- distclean_lib distclean
+.PHONY: install_dynamic install_static install_include install_pkgconfig
INSTALL_TYPE = install_dynamic
@@ -66,23 +56,16 @@ endif
install: $(INSTALL_TYPE) install_include
-install_include:
- $(INSTALL) -D $(OWNER) $(GROUP) -m 444 $(srcdir)/lvm2app.h $(includedir)/lvm2app.h
+install_include: $(srcdir)/lvm2app.h
+ $(INSTALL_DATA) -D $< $(includedir)/$(<F)
-install_dynamic: $(LIB_SHARED)
- $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \
- $(libdir)/$(LIB_SHARED).$(LIB_VERSION_APP)
- $(LN_S) -f $(LIB_SHARED).$(LIB_VERSION_APP) \
- $(libdir)/$(LIB_SHARED)
+install_dynamic: install_lib_shared
install_static: $(LIB_STATIC)
- $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \
- $(libdir)/$(LIB_STATIC).$(LIB_VERSION_APP)
- $(LN_S) -f $(LIB_STATIC).$(LIB_VERSION_APP) $(libdir)/$(LIB_STATIC)
+ $(INSTALL_DATA) -D $< $(usrlibdir)/$(<F)
-install_pkgconfig:
- $(INSTALL) -D $(OWNER) $(GROUP) -m 444 $(LIB_NAME).pc \
- $(usrlibdir)/pkgconfig/lvm2app.pc
+install_pkgconfig: $(LIB_NAME).pc
+ $(INSTALL_DATA) -D $< $(usrlibdir)/pkgconfig/lvm2app.pc
liblvm.cflow: $(SOURCES)
set -e; (echo -n "SOURCES += "; \
@@ -92,9 +75,4 @@ liblvm.cflow: $(SOURCES)
cflow: liblvm.cflow
-CLEAN_TARGETS += $(LIB_NAME).$(LIB_SUFFIX)
-
-distclean_lib:
- $(RM) $(LIB_NAME).pc
-
-distclean: distclean_lib
+DISTCLEAN_TARGETS += $(LIB_NAME).pc