mdbx-make: refine install/uninstall targets.

Change-Id: Id8390b6ff462f55237534a06a92d03b8666b518f
This commit is contained in:
Leonid Yuriev 2020-04-06 02:24:16 +03:00
parent cf7cce9079
commit d37d3b54f4

View File

@ -9,7 +9,7 @@
SHELL := env bash SHELL := env bash
# install sandbox # install sandbox
SANDBOX ?= DESTDIR ?=
# install prefixes (inside sandbox) # install prefixes (inside sandbox)
prefix ?= /usr/local prefix ?= /usr/local
@ -303,14 +303,17 @@ cross-qemu:
#< dist-cutoff-end #< dist-cutoff-end
install: $(LIBRARIES) $(TOOLS) $(HEADERS) install: $(LIBRARIES) $(TOOLS) $(HEADERS)
mkdir -p $(SANDBOX)$(prefix)/bin$(suffix) \ install -D -p -s -t $(DESTDIR)$(prefix)/bin$(suffix) $(TOOLS) && \
&& cp -t $(SANDBOX)$(prefix)/bin$(suffix) $(TOOLS) && \ install -D -p -s -t $(DESTDIR)$(prefix)/lib$(suffix) $(filter-out libmdbx.a,$(LIBRARIES)) && \
mkdir -p $(SANDBOX)$(prefix)/lib$(suffix) \ install -D -p -t $(DESTDIR)$(prefix)/lib$(suffix) libmdbx.a && \
&& cp -t $(SANDBOX)$(prefix)/lib$(suffix) $(LIBRARIES) && \ install -D -p -m 444 -t $(DESTDIR)$(prefix)/include $(HEADERS) && \
mkdir -p $(SANDBOX)$(prefix)/include \ install -D -p -m 444 -t $(DESTDIR)$(mandir)/man1 $(addprefix $(MAN_SRCDIR), $(MANPAGES))
&& cp -t $(SANDBOX)$(prefix)/include $(HEADERS) && \
mkdir -p $(SANDBOX)$(mandir)/man1 \ uninstall:
&& cp -t $(SANDBOX)$(mandir)/man1 $(addprefix $(MAN_SRCDIR), $(MANPAGES)) rm -f $(addprefix $(DESTDIR)$(prefix)/bin$(suffix)/,$(TOOLS)) \
$(addprefix $(DESTDIR)$(prefix)/lib$(suffix)/,$(LIBRARIES)) \
$(addprefix $(DESTDIR)$(prefix)/include/,$(HEADERS)) \
$(addprefix $(DESTDIR)$(mandir)/man1/,$(MANPAGES))
################################################################################ ################################################################################
# Benchmarking by ioarena # Benchmarking by ioarena