mirror of
https://github.com/uutils/coreutils
synced 2024-11-16 01:38:04 +00:00
Merge pull request #3384 from marv/makefile-improvements
build: Remove MANDIR & introduce DATAROOTDIR
This commit is contained in:
commit
6a818454ce
1 changed files with 13 additions and 13 deletions
26
GNUmakefile
26
GNUmakefile
|
@ -1,4 +1,4 @@
|
|||
# spell-checker:ignore (misc) testsuite runtest findstring (targets) busytest distclean manpages pkgs ; (vars/env) BINDIR BUILDDIR CARGOFLAGS DESTDIR DOCSDIR INSTALLDIR INSTALLEES MANDIR MULTICALL
|
||||
# spell-checker:ignore (misc) testsuite runtest findstring (targets) busytest distclean manpages pkgs ; (vars/env) BINDIR BUILDDIR CARGOFLAGS DESTDIR DOCSDIR INSTALLDIR INSTALLEES MULTICALL DATAROOTDIR
|
||||
|
||||
# Config options
|
||||
PROFILE ?= debug
|
||||
|
@ -22,10 +22,10 @@ CARGOFLAGS ?=
|
|||
# Install directories
|
||||
PREFIX ?= /usr/local
|
||||
DESTDIR ?=
|
||||
BINDIR ?= /bin
|
||||
MANDIR ?= /man/man1
|
||||
BINDIR ?= $(PREFIX)/bin
|
||||
DATAROOTDIR ?= $(PREFIX)/share
|
||||
|
||||
INSTALLDIR_BIN=$(DESTDIR)$(PREFIX)$(BINDIR)
|
||||
INSTALLDIR_BIN=$(DESTDIR)$(BINDIR)
|
||||
|
||||
#prefix to apply to coreutils binary and all tool binaries
|
||||
PROG_PREFIX ?=
|
||||
|
@ -328,13 +328,13 @@ else
|
|||
$(INSTALL) $(BUILDDIR)/$(prog) $(INSTALLDIR_BIN)/$(PROG_PREFIX)$(prog);)
|
||||
$(if $(findstring test,$(INSTALLEES)), $(INSTALL) $(BUILDDIR)/test $(INSTALLDIR_BIN)/$(PROG_PREFIX)[)
|
||||
endif
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/share/zsh/site-functions
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/share/bash-completion/completions
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/share/fish/vendor_completions.d
|
||||
mkdir -p $(DESTDIR)$(DATAROOTDIR)/zsh/site-functions
|
||||
mkdir -p $(DESTDIR)$(DATAROOTDIR)/bash-completion/completions
|
||||
mkdir -p $(DESTDIR)$(DATAROOTDIR)/fish/vendor_completions.d
|
||||
$(foreach prog, $(INSTALLEES), \
|
||||
$(BUILDDIR)/coreutils completion $(prog) zsh > $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_$(PROG_PREFIX)$(prog); \
|
||||
$(BUILDDIR)/coreutils completion $(prog) bash > $(DESTDIR)$(PREFIX)/share/bash-completion/completions/$(PROG_PREFIX)$(prog); \
|
||||
$(BUILDDIR)/coreutils completion $(prog) fish > $(DESTDIR)$(PREFIX)/share/fish/vendor_completions.d/$(PROG_PREFIX)$(prog).fish; \
|
||||
$(BUILDDIR)/coreutils completion $(prog) zsh > $(DESTDIR)$(DATAROOTDIR)/zsh/site-functions/_$(PROG_PREFIX)$(prog); \
|
||||
$(BUILDDIR)/coreutils completion $(prog) bash > $(DESTDIR)$(DATAROOTDIR)/bash-completion/completions/$(PROG_PREFIX)$(prog); \
|
||||
$(BUILDDIR)/coreutils completion $(prog) fish > $(DESTDIR)$(DATAROOTDIR)/fish/vendor_completions.d/$(PROG_PREFIX)$(prog).fish; \
|
||||
)
|
||||
|
||||
uninstall:
|
||||
|
@ -343,8 +343,8 @@ ifeq (${MULTICALL}, y)
|
|||
endif
|
||||
rm -f $(addprefix $(INSTALLDIR_BIN)/$(PROG_PREFIX),$(PROGS))
|
||||
rm -f $(INSTALLDIR_BIN)/$(PROG_PREFIX)[
|
||||
rm -f $(addprefix $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_$(PROG_PREFIX),$(PROGS))
|
||||
rm -f $(addprefix $(DESTDIR)$(PREFIX)/share/bash-completion/completions/$(PROG_PREFIX),$(PROGS))
|
||||
rm -f $(addprefix $(DESTDIR)$(PREFIX)/share/fish/vendor_completions.d/$(PROG_PREFIX),$(addsuffix .fish,$(PROGS)))
|
||||
rm -f $(addprefix $(DESTDIR)$(DATAROOTDIR)/zsh/site-functions/_$(PROG_PREFIX),$(PROGS))
|
||||
rm -f $(addprefix $(DESTDIR)$(DATAROOTDIR)/bash-completion/completions/$(PROG_PREFIX),$(PROGS))
|
||||
rm -f $(addprefix $(DESTDIR)$(DATAROOTDIR)/fish/vendor_completions.d/$(PROG_PREFIX),$(addsuffix .fish,$(PROGS)))
|
||||
|
||||
.PHONY: all build build-coreutils build-pkgs test distclean clean busytest install uninstall
|
||||
|
|
Loading…
Reference in a new issue