]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
lib/Makefile: create include directory before headers installation 1123/head
authorBaruch Siach <baruch@tkos.co.il>
Tue, 8 May 2018 17:43:28 +0000 (20:43 +0300)
committerBaruch Siach <baruch@tkos.co.il>
Tue, 8 May 2018 17:59:44 +0000 (20:59 +0300)
Make sure that $(INCLUDEDIR) exists before copying the headers there.
Otherwise, the contest of header files is copied over
$(DESTDIR)$(INCLUDEDIR), making it a regular file.

While at it, remove $(DESTDIR)$(INCLUDEDIR) from the list of directories
to create in the install-pc target. The install-pc target does not need
this directory.

lib/Makefile

index f64f192d47249beaff24c7fc8e9ab2ce03f15ca7..d8178c7a58a0008d5e4d6cf3e36f27b28b055b4b 100644 (file)
@@ -163,7 +163,7 @@ install: install-pc install-static install-shared install-includes
        @echo zstd static and shared library installed
 
 install-pc: libzstd.pc
-       @$(INSTALL) -d -m 755 $(DESTDIR)$(PKGCONFIGDIR)/ $(DESTDIR)$(INCLUDEDIR)/
+       @$(INSTALL) -d -m 755 $(DESTDIR)$(PKGCONFIGDIR)/
        @$(INSTALL_DATA) libzstd.pc $(DESTDIR)$(PKGCONFIGDIR)/
 
 install-static: libzstd.a
@@ -178,6 +178,7 @@ install-shared: libzstd
 
 install-includes:
        @echo Installing includes
+       @$(INSTALL) -d -m 755 $(DESTDIR)$(INCLUDEDIR)/
        @$(INSTALL_DATA) zstd.h $(DESTDIR)$(INCLUDEDIR)
        @$(INSTALL_DATA) common/zstd_errors.h $(DESTDIR)$(INCLUDEDIR)
        @$(INSTALL_DATA) deprecated/zbuff.h $(DESTDIR)$(INCLUDEDIR)     # prototypes generate deprecation warnings