2
1

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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. From 2c2c2d992c3b298793983317588f73cf41675652 Mon Sep 17 00:00:00 2001
  2. From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  3. Date: Wed, 27 Jul 2016 22:49:58 +0200
  4. Subject: [PATCH] Makefile.in: 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
  9. to 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. ---
  16. Makefile.in | 6 +++++-
  17. 1 file changed, 5 insertions(+), 1 deletion(-)
  18. diff --git a/Makefile.in b/Makefile.in
  19. index 19697ff..5870a58 100644
  20. --- a/Makefile.in
  21. +++ b/Makefile.in
  22. @@ -219,7 +219,7 @@ test: test-fsck test-mkfs test-convert test-misc test-fuzz
  23. # NOTE: For static compiles, you need to have all the required libs
  24. # static equivalent available
  25. #
  26. -static: $(progs_static)
  27. +static: $(progs_static) $(libs_static)
  28. version.h: version.sh version.h.in configure.ac
  29. @echo " [SH] $@"
  30. @@ -384,6 +384,10 @@ install-static: $(progs_static) $(INSTALLDIRS)
  31. done
  32. # btrfsck is a link to btrfs in the src tree, make it so for installed file as well
  33. $(LN_S) -f btrfs.static $(DESTDIR)$(bindir)/btrfsck.static
  34. + $(INSTALL) -m755 -d $(DESTDIR)$(libdir)
  35. + $(INSTALL) $(libs_static) $(DESTDIR)$(libdir)
  36. + $(INSTALL) -m755 -d $(DESTDIR)$(incdir)
  37. + $(INSTALL) -m644 $(headers) $(DESTDIR)$(incdir)
  38. $(INSTALLDIRS):
  39. @echo "Making install in $(patsubst install-%,%,$@)"
  40. --
  41. 2.7.3