From 23b059e7b7559280966b806e30d5b1e9c1ecfeaa Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 9 Apr 2010 21:42:48 +0000 Subject: 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 --- tools/Makefile.in | 47 ++++++++++++++++++++++------------------------- 1 file changed, 22 insertions(+), 25 deletions(-) (limited to 'tools/Makefile.in') diff --git a/tools/Makefile.in b/tools/Makefile.in index b048fad9..0a4d75f6 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -78,7 +78,7 @@ TARGETS_DM = dmsetup INSTALL_LVM_TARGETS = install_tools_dynamic INSTALL_DMSETUP_TARGETS = install_dmsetup_dynamic -INSTALL_CMDLIB_TARGETS = install_cmdlib_dynamic +INSTALL_CMDLIB_TARGETS = install_cmdlib_dynamic install_cmdlib_include ifeq ("@STATIC_LINK@", "yes") TARGETS += lvm.static @@ -92,10 +92,11 @@ LVMLIBS = $(LVMINTERNAL_LIBS) LIB_VERSION = $(LIB_VERSION_LVM) CLEAN_TARGETS = liblvm2cmd.$(LIB_SUFFIX) $(TARGETS_DM) \ + liblvm2cmd.$(LIB_SUFFIX).$(LIB_VERSION) lvm-static.o \ liblvm2cmd-static.a dmsetup.static lvm.static ifeq ("@CMDLIB@", "yes") - TARGETS += liblvm2cmd.$(LIB_SUFFIX) + TARGETS += liblvm2cmd.$(LIB_SUFFIX).$(LIB_VERSION) INSTALL_LVM_TARGETS += $(INSTALL_CMDLIB_TARGETS) endif @@ -145,6 +146,9 @@ liblvm2cmd-static.a: $(top_builddir)/lib/liblvm-internal.a $(OBJECTS) lvmcmdlib. liblvm2cmd.$(LIB_SUFFIX): liblvm2cmd.a $(LDDEPS) +liblvm2cmd.$(LIB_SUFFIX).$(LIB_VERSION): liblvm2cmd.$(LIB_SUFFIX) + $(LN_S) -f $< $@ + .commands: $(srcdir)/commands.h $(srcdir)/cmdnames.h Makefile $(CC) -E -P $(srcdir)/cmdnames.h 2> /dev/null | \ egrep -v '^ *(|#.*|dumpconfig|formats|help|pvdata|segtypes|version) *$$' > .commands @@ -155,44 +159,37 @@ CFLOW_SOURCES = $(addprefix $(srcdir)/, $(SOURCES)) -include $(top_builddir)/lib/liblvm-internal.cflow endif -.PHONY: install_cmdlib_dynamic install_cmdlib_static \ +.PHONY: install_cmdlib_dynamic install_cmdlib_static install_cmdlib_include \ install_tools_dynamic install_tools_static \ install_dmsetup_dynamic install_dmsetup_static +install_cmdlib_include: $(srcdir)/lvm2cmd.h + $(INSTALL_DATA) -D $< $(includedir)/$(