blob: d861dfc80a9c644d1e9380400ec735c325d44705 [file] [log] [blame]
From 2c2c2d992c3b298793983317588f73cf41675652 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 27 Jul 2016 22:49:58 +0200
Subject: [PATCH] Makefile.in: install static library and headers in
install-static
Currently, the install-static target only installs the statically
compiled tools. However, some programs outside of btrfs-progs (for
example docker) link with the btrfs libraries. If such programs want
to link statically against the btrfs-progs library, then this library
should be installed by "install-static". Indeed, "make install" cannot
be used if the support for shared library is not enabled.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[Gustavo: Rebase for btrfs-progs 4.7.2]
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
Makefile.in | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/Makefile.in b/Makefile.in
index 19697ff..5870a58 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -219,7 +219,7 @@ test: test-fsck test-mkfs test-convert test-misc test-fuzz
# NOTE: For static compiles, you need to have all the required libs
# static equivalent available
#
-static: $(progs_static)
+static: $(progs_static) $(libs_static)
version.h: version.sh version.h.in configure.ac
@echo " [SH] $@"
@@ -384,6 +384,10 @@ install-static: $(progs_static) $(INSTALLDIRS)
done
# btrfsck is a link to btrfs in the src tree, make it so for installed file as well
$(LN_S) -f btrfs.static $(DESTDIR)$(bindir)/btrfsck.static
+ $(INSTALL) -m755 -d $(DESTDIR)$(libdir)
+ $(INSTALL) $(libs_static) $(DESTDIR)$(libdir)
+ $(INSTALL) -m755 -d $(DESTDIR)$(incdir)
+ $(INSTALL) -m644 $(headers) $(DESTDIR)$(incdir)
$(INSTALLDIRS):
@echo "Making install in $(patsubst install-%,%,$@)"
--
2.7.3