]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - package/zstd/0002-lib-Makefile-create-include-directory-before-headers.patch
zstd: fix host headers installation
[coffee/buildroot.git] / package / zstd / 0002-lib-Makefile-create-include-directory-before-headers.patch
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
7 Make sure that $(INCLUDEDIR) exists before copying the headers there.
8 Otherwise, the contest of header files is copied over
9 $(DESTDIR)$(INCLUDEDIR), making it a regular file.
10
11 While at it, remove $(DESTDIR)$(INCLUDEDIR) from the list of directories
12 to create in the install-pc target. The install-pc target does not need
13 this directory.
14
15 Signed-off-by: Baruch Siach <baruch@tkos.co.il>
16 ---
17 Upstream status: https://github.com/facebook/zstd/pull/1123
18
19  lib/Makefile | 3 ++-
20  1 file changed, 2 insertions(+), 1 deletion(-)
21
22 diff --git a/lib/Makefile b/lib/Makefile
23 index f64f192d4724..d8178c7a58a0 100644
24 --- a/lib/Makefile
25 +++ b/lib/Makefile
26 @@ -163,7 +163,7 @@ install: install-pc install-static install-shared install-includes
27         @echo zstd static and shared library installed
28  
29  install-pc: libzstd.pc
30 -       @$(INSTALL) -d -m 755 $(DESTDIR)$(PKGCONFIGDIR)/ $(DESTDIR)$(INCLUDEDIR)/
31 +       @$(INSTALL) -d -m 755 $(DESTDIR)$(PKGCONFIGDIR)/
32         @$(INSTALL_DATA) libzstd.pc $(DESTDIR)$(PKGCONFIGDIR)/
33  
34  install-static: libzstd.a
35 @@ -178,6 +178,7 @@ install-shared: libzstd
36  
37  install-includes:
38         @echo Installing includes
39 +       @$(INSTALL) -d -m 755 $(DESTDIR)$(INCLUDEDIR)/
40         @$(INSTALL_DATA) zstd.h $(DESTDIR)$(INCLUDEDIR)
41         @$(INSTALL_DATA) common/zstd_errors.h $(DESTDIR)$(INCLUDEDIR)
42         @$(INSTALL_DATA) deprecated/zbuff.h $(DESTDIR)$(INCLUDEDIR)     # prototypes generate deprecation warnings
43 -- 
44 2.17.0
45