1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-29 12:07:46 +00:00

destdir revert, more specific clobbering

This commit is contained in:
Nathan Ross 2015-12-25 00:13:29 -05:00
parent 97793313c0
commit 5c88a52c2f
2 changed files with 6 additions and 8 deletions

View file

@ -18,13 +18,12 @@ CARGO ?= cargo
CARGOFLAGS ?= CARGOFLAGS ?=
# Install directories # Install directories
FS_ROOT ?= / DESTDIR ?= /usr/local
PREFIX ?= /usr/local
BINDIR ?= /bin BINDIR ?= /bin
LIBDIR ?= /lib LIBDIR ?= /lib
INSTALLDIR_BIN=$(FS_ROOT)$(PREFIX)$(BINDIR) INSTALLDIR_BIN=$(DESTDIR)$(BINDIR)
INSTALLDIR_LIB=$(FS_ROOT)$(PREFIX)$(LIBDIR) INSTALLDIR_LIB=$(DESTDIR)$(LIBDIR)
#prefix to apply to uutils binary and all tool binaries #prefix to apply to uutils binary and all tool binaries
PROG_PREFIX ?= PROG_PREFIX ?=
@ -274,10 +273,9 @@ distclean: clean
# TODO: figure out if there is way for prefixes to work with the symlinks # TODO: figure out if there is way for prefixes to work with the symlinks
install: build install: build
mkdir -p $(INSTALLDIR_BIN) mkdir -p $(INSTALLDIR_BIN)
rm -f $(addprefix $(INSTALLDIR_BIN)/$(PROG_PREFIX),$(INSTALLEES))
ifeq (${MULTICALL}, y) ifeq (${MULTICALL}, y)
install $(BUILDDIR)/uutils $(INSTALLDIR_BIN)/$(PROG_PREFIX)uutils install $(BUILDDIR)/uutils $(INSTALLDIR_BIN)/$(PROG_PREFIX)uutils
$(foreach prog, $(INSTALLEES), cd $(INSTALLDIR_BIN) && ln -s $(PROG_PREFIX)uutils $(PROG_PREFIX)$(prog);) $(foreach prog, $(INSTALLEES), cd $(INSTALLDIR_BIN) && ln -fs $(PROG_PREFIX)uutils $(PROG_PREFIX)$(prog);)
else else
$(foreach prog, $(INSTALLEES), \ $(foreach prog, $(INSTALLEES), \
install $(PKG_BUILDDIR)/$(prog) $(INSTALLDIR_BIN)/$(PROG_PREFIX)$(prog);) install $(PKG_BUILDDIR)/$(prog) $(INSTALLDIR_BIN)/$(PROG_PREFIX)$(prog);)

View file

@ -76,7 +76,7 @@ make MULTICALL=y install
Set install parent directory (default value is /usr/local): Set install parent directory (default value is /usr/local):
``` ```
make PREFIX=/my/path install make DESTDIR=/my/path install
``` ```
Uninstallation Instructions Uninstallation Instructions
@ -99,7 +99,7 @@ make MULTICALL=y uninstall
To uninstall from a custom parent directory: To uninstall from a custom parent directory:
``` ```
make PREFIX=/my/path uninstall make DESTDIR=/my/path uninstall
``` ```
Test Instructions Test Instructions