From 5c88a52c2fbd69c5625c95ac12371e972b95ec6b Mon Sep 17 00:00:00 2001 From: Nathan Ross Date: Fri, 25 Dec 2015 00:13:29 -0500 Subject: [PATCH] destdir revert, more specific clobbering --- Makefile | 10 ++++------ README.md | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index e5477b630..3ab541ba1 100644 --- a/Makefile +++ b/Makefile @@ -18,13 +18,12 @@ CARGO ?= cargo CARGOFLAGS ?= # Install directories -FS_ROOT ?= / -PREFIX ?= /usr/local +DESTDIR ?= /usr/local BINDIR ?= /bin LIBDIR ?= /lib -INSTALLDIR_BIN=$(FS_ROOT)$(PREFIX)$(BINDIR) -INSTALLDIR_LIB=$(FS_ROOT)$(PREFIX)$(LIBDIR) +INSTALLDIR_BIN=$(DESTDIR)$(BINDIR) +INSTALLDIR_LIB=$(DESTDIR)$(LIBDIR) #prefix to apply to uutils binary and all tool binaries PROG_PREFIX ?= @@ -274,10 +273,9 @@ distclean: clean # TODO: figure out if there is way for prefixes to work with the symlinks install: build mkdir -p $(INSTALLDIR_BIN) - rm -f $(addprefix $(INSTALLDIR_BIN)/$(PROG_PREFIX),$(INSTALLEES)) ifeq (${MULTICALL}, y) 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 $(foreach prog, $(INSTALLEES), \ install $(PKG_BUILDDIR)/$(prog) $(INSTALLDIR_BIN)/$(PROG_PREFIX)$(prog);) diff --git a/README.md b/README.md index 7125ce710..2468b1333 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ make MULTICALL=y install Set install parent directory (default value is /usr/local): ``` -make PREFIX=/my/path install +make DESTDIR=/my/path install ``` Uninstallation Instructions @@ -99,7 +99,7 @@ make MULTICALL=y uninstall To uninstall from a custom parent directory: ``` -make PREFIX=/my/path uninstall +make DESTDIR=/my/path uninstall ``` Test Instructions