Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pzstd Makefile to allow setting DESTDIR and BINDIR separately #3752

Merged
merged 1 commit into from Oct 8, 2023

Commits on Sep 12, 2023

  1. [pzstd]: Fix DESTDIR handling to allow setting BINDIR

    Currently, setting `BINDIR` and `DESTDIR` separately is not possible, so
    the command below fails, as BINDIR is set explicitly:
    
        $ make -j80 install PREFIX=/usr EPREFIX=/usr BINDIR=/usr/bin SBINDIR=/usr/sbin LIBEXECDIR=/usr/libexec SYSCONFDIR=/etc SHAREDSTATEDIR=/var LOCALST ATEDIR=/var LIBDIR=/usr/lib INCLUDEDIR=/usr/include DATAROOTDIR=/usr/share DATADIR=/usr/share INFODIR=/usr/share/info LOCALEDIR=/usr/share/locale MAND IR=/usr/share/man DOCDIR=/usr/share/doc/zstd DESTDIR=/dev/shm/bee-pmenzel/zstd/zstd-1.5.5-0/image -C contrib/pzstd DESTDIR=/dev/shm/bee-pmenzel/zstd/zstd-1.5.5-0/image
        make: Entering directory
        '/dev/shm/bee-pmenzel/zstd/zstd-1.5.5-0/source/contrib/pzstd' CFLAGS="  -I../../lib -I../../lib/common -I../../programs -I. -DNDEBUG -O3 -Wall -Wextra -Wno-deprecated-declarations   " LDFLAGS=" -O3 -Wall -Wextra -pedantic  " make -C ../../lib libzstd.a
        make[1]: Entering directory '/dev/shm/bee-pmenzel/zstd/zstd-1.5.5-0/source/lib'
        make[1]: Leaving directory '/dev/shm/bee-pmenzel/zstd/zstd-1.5.5-0/source/lib'
        g++ main.o ../../programs/util.o Options.o Pzstd.o SkippableFrame.o ../../lib/libzstd.a           -O3 -Wall -Wextra -pedantic    -pthread -o pzstd
        install -d -m 755 /usr/bin/
        install -m 755 pzstd /usr/bin/pzstd
        install: cannot create regular file '/usr/bin/pzstd': Permission denied
        make: *** [Makefile:116: install] Error 1
    
    So, do not prefix `BINDIR` with `DESTDIR`, and adapt all paths for
    installation. This is more common, and, for example, `programs/Makefile`
    does the same.
    
    Fixes: 8b4e842 ("[pzstd] Fix Makefile")
    paulmenzel committed Sep 12, 2023
    Configuration menu
    Copy the full SHA
    d55ebb5 View commit details
    Browse the repository at this point in the history