0002-lib-Makefile-create-include-directory-before-headers.patch 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. From 9a0643b633c00e86db059e3790bdea7155fb6dc9 Mon Sep 17 00:00:00 2001
  2. From: Baruch Siach <baruch@tkos.co.il>
  3. Date: Tue, 8 May 2018 20:43:28 +0300
  4. Subject: [PATCH] lib/Makefile: create include directory before headers
  5. installation
  6. Make sure that $(INCLUDEDIR) exists before copying the headers there.
  7. Otherwise, the contest of header files is copied over
  8. $(DESTDIR)$(INCLUDEDIR), making it a regular file.
  9. While at it, remove $(DESTDIR)$(INCLUDEDIR) from the list of directories
  10. to create in the install-pc target. The install-pc target does not need
  11. this directory.
  12. Signed-off-by: Baruch Siach <baruch@tkos.co.il>
  13. ---
  14. Upstream status: https://github.com/facebook/zstd/pull/1123
  15. lib/Makefile | 3 ++-
  16. 1 file changed, 2 insertions(+), 1 deletion(-)
  17. diff --git a/lib/Makefile b/lib/Makefile
  18. index f64f192d4724..d8178c7a58a0 100644
  19. --- a/lib/Makefile
  20. +++ b/lib/Makefile
  21. @@ -163,7 +163,7 @@ install: install-pc install-static install-shared install-includes
  22. @echo zstd static and shared library installed
  23. install-pc: libzstd.pc
  24. - @$(INSTALL) -d -m 755 $(DESTDIR)$(PKGCONFIGDIR)/ $(DESTDIR)$(INCLUDEDIR)/
  25. + @$(INSTALL) -d -m 755 $(DESTDIR)$(PKGCONFIGDIR)/
  26. @$(INSTALL_DATA) libzstd.pc $(DESTDIR)$(PKGCONFIGDIR)/
  27. install-static: libzstd.a
  28. @@ -178,6 +178,7 @@ install-shared: libzstd
  29. install-includes:
  30. @echo Installing includes
  31. + @$(INSTALL) -d -m 755 $(DESTDIR)$(INCLUDEDIR)/
  32. @$(INSTALL_DATA) zstd.h $(DESTDIR)$(INCLUDEDIR)
  33. @$(INSTALL_DATA) common/zstd_errors.h $(DESTDIR)$(INCLUDEDIR)
  34. @$(INSTALL_DATA) deprecated/zbuff.h $(DESTDIR)$(INCLUDEDIR) # prototypes generate deprecation warnings
  35. --
  36. 2.17.0