0001-Makefile-install-static-library-and-headers-in-insta.patch 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. From ff93866eb119cedb791894814780c0e44db35715 Mon Sep 17 00:00:00 2001
  2. From: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
  3. Date: Fri, 10 Mar 2017 14:56:17 +0000
  4. Subject: [PATCH] Makefile: install static library and headers in
  5. install-static
  6. Currently, the install-static target only installs the statically
  7. compiled tools. However, some programs outside of btrfs-progs (for
  8. example docker) link with the btrfs libraries. If such programs want to
  9. link statically against the btrfs-progs library, then this library
  10. should be installed by "install-static". Indeed, "make install" cannot
  11. be used if the support for shared library is not enabled.
  12. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  13. [Gustavo: Rebase for btrfs-progs 4.7.2]
  14. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
  15. [Vincent: Rebase for btrfs-progs 4.10]
  16. Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
  17. ---
  18. Makefile | 6 +++++-
  19. 1 file changed, 5 insertions(+), 1 deletion(-)
  20. diff --git a/Makefile b/Makefile
  21. index 67fbc48..d9e34be 100644
  22. --- a/Makefile
  23. +++ b/Makefile
  24. @@ -308,7 +308,7 @@ test: test-fsck test-mkfs test-convert test-misc test-fuzz test-cli
  25. # NOTE: For static compiles, you need to have all the required libs
  26. # static equivalent available
  27. #
  28. -static: $(progs_static)
  29. +static: $(progs_static) $(libs_static)
  30. version.h: version.sh version.h.in configure.ac
  31. @echo " [SH] $@"
  32. @@ -537,6 +537,10 @@ install-static: $(progs_static) $(INSTALLDIRS)
  33. $(INSTALL) $(progs_static) $(DESTDIR)$(bindir)
  34. # btrfsck is a link to btrfs in the src tree, make it so for installed file as well
  35. $(LN_S) -f btrfs.static $(DESTDIR)$(bindir)/btrfsck.static
  36. + $(INSTALL) -m755 -d $(DESTDIR)$(libdir)
  37. + $(INSTALL) $(libs_static) $(DESTDIR)$(libdir)
  38. + $(INSTALL) -m755 -d $(DESTDIR)$(incdir)
  39. + $(INSTALL) -m644 $(headers) $(DESTDIR)$(incdir)
  40. $(INSTALLDIRS):
  41. @echo "Making install in $(patsubst install-%,%,$@)"
  42. --
  43. 2.10.2