GNUmakefile: Prepend PROG_PREFIX to LIBSTDBUF_DIR too (#9068)

* GNUmakefile: Append PROG_PREFIX to LIBSTDBUF_DIR too

* GNUmakefile: FIx woording

Co-authored-by: Etienne Cordonnier <ecordonnier@snap.com>

---------

Co-authored-by: Etienne Cordonnier <ecordonnier@snap.com>
This commit is contained in:
oech3 2025-12-22 20:42:29 +09:00 committed by GitHub
parent 87ba3afd19
commit b9b965555c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 13 deletions

View file

@ -300,22 +300,22 @@ jobs:
run: make nextest PROFILE=ci CARGOFLAGS="--hide-progress-bar"
env:
RUST_BACKTRACE: "1"
- name: "`make install PROFILE=release-fast COMPLETIONS=n MANPAGES=n LOCALES=n`"
- name: "`make install PROG_PREFIX=uu- PROFILE=release-fast COMPLETIONS=n MANPAGES=n LOCALES=n`"
shell: bash
run: |
set -x
DESTDIR=/tmp/ make PROFILE=release-fast COMPLETIONS=n MANPAGES=n LOCALES=n install
DESTDIR=/tmp/ make install PROG_PREFIX=uu- PROFILE=release-fast COMPLETIONS=n MANPAGES=n LOCALES=n
# Check that utils are built with given profile
./target/release-fast/true
# Check that the utils are present
test -f /tmp/usr/local/bin/tty
# Check that the progs have prefix
test -f /tmp/usr/local/bin/uu-tty
test -f /tmp/usr/local/libexec/uu-coreutils/libstdbuf.*
# Check that the manpage is not present
! test -f /tmp/usr/local/share/man/man1/whoami.1
! test -f /tmp/usr/local/share/man/man1/uu-whoami.1
# Check that the completion is not present
! test -f /tmp/usr/local/share/zsh/site-functions/_install
! test -f /tmp/usr/local/share/bash-completion/completions/head.bash
! test -f /tmp/usr/local/share/fish/vendor_completions.d/cat.fish
! test -f /tmp/usr/local/share/zsh/site-functions/_uu-install
! test -f /tmp/usr/local/share/bash-completion/completions/uu-head.bash
! test -f /tmp/usr/local/share/fish/vendor_completions.d/uu-cat.fish
env:
RUST_BACKTRACE: "1"
- name: "`make install`"

View file

@ -27,20 +27,20 @@ CARGO ?= cargo
CARGOFLAGS ?=
RUSTC_ARCH ?= # should be empty except for cross-build, not --target $(shell rustc --print host-tuple)
#prefix prepended to all binaries and library dir
PROG_PREFIX ?=
# Install directories
PREFIX ?= /usr/local
DESTDIR ?=
BINDIR ?= $(PREFIX)/bin
DATAROOTDIR ?= $(PREFIX)/share
LIBSTDBUF_DIR ?= $(PREFIX)/libexec/coreutils
LIBSTDBUF_DIR ?= $(PREFIX)/libexec/$(PROG_PREFIX)coreutils
# Export variable so that it is used during the build
export LIBSTDBUF_DIR
INSTALLDIR_BIN=$(DESTDIR)$(BINDIR)
#prefix to apply to coreutils binary and all tool binaries
PROG_PREFIX ?=
# This won't support any directory with spaces in its name, but you can just
# make a symlink without spaces that points to the directory.
BASEDIR ?= $(shell pwd)