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
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.
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
15 Signed-off-by: Baruch Siach <baruch@tkos.co.il>
17 Upstream status: https://github.com/facebook/zstd/pull/1123
20 1 file changed, 2 insertions(+), 1 deletion(-)
22 diff --git a/lib/Makefile b/lib/Makefile
23 index f64f192d4724..d8178c7a58a0 100644
26 @@ -163,7 +163,7 @@ install: install-pc install-static install-shared install-includes
27 @echo zstd static and shared library installed
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)/
34 install-static: libzstd.a
35 @@ -178,6 +178,7 @@ install-shared: libzstd
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