Revert "Revert "mk: Run 'make install' through install.sh""
This reverts commit d62163188a
.
Conflicts:
mk/install.mk
This commit is contained in:
parent
ff17b7c099
commit
e509cd6e2b
15
Makefile.in
15
Makefile.in
|
@ -232,19 +232,20 @@ ifneq ($(strip $(findstring prepare,$(MAKECMDGOALS)) \
|
||||||
include $(CFG_SRC_DIR)mk/prepare.mk
|
include $(CFG_SRC_DIR)mk/prepare.mk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Source and binary distribution artifacts
|
||||||
|
ifneq ($(strip $(findstring dist,$(MAKECMDGOALS)) \
|
||||||
|
$(findstring install,$(MAKECMDGOALS)) \
|
||||||
|
$(findstring clean,$(MAKECMDGOALS))),)
|
||||||
|
CFG_INFO := $(info cfg: including dist rules)
|
||||||
|
include $(CFG_SRC_DIR)mk/dist.mk
|
||||||
|
endif
|
||||||
|
|
||||||
# (Unix) Installation from the build directory
|
# (Unix) Installation from the build directory
|
||||||
ifneq ($(findstring install,$(MAKECMDGOALS)),)
|
ifneq ($(findstring install,$(MAKECMDGOALS)),)
|
||||||
CFG_INFO := $(info cfg: including install rules)
|
CFG_INFO := $(info cfg: including install rules)
|
||||||
include $(CFG_SRC_DIR)mk/install.mk
|
include $(CFG_SRC_DIR)mk/install.mk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Source and binary distribution artifacts
|
|
||||||
ifneq ($(strip $(findstring dist,$(MAKECMDGOALS)) \
|
|
||||||
$(findstring clean,$(MAKECMDGOALS))),)
|
|
||||||
CFG_INFO := $(info cfg: including dist rules)
|
|
||||||
include $(CFG_SRC_DIR)mk/dist.mk
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Cleaning
|
# Cleaning
|
||||||
ifneq ($(findstring clean,$(MAKECMDGOALS)),)
|
ifneq ($(findstring clean,$(MAKECMDGOALS)),)
|
||||||
CFG_INFO := $(info cfg: including clean rules)
|
CFG_INFO := $(info cfg: including clean rules)
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
# * dist-tar-bins - Ad-hoc Unix binary installers
|
# * dist-tar-bins - Ad-hoc Unix binary installers
|
||||||
# * dist-docs - Stage docs for upload
|
# * dist-docs - Stage docs for upload
|
||||||
|
|
||||||
PKG_NAME = $(CFG_PACKAGE_NAME)
|
PKG_NAME := $(CFG_PACKAGE_NAME)
|
||||||
|
|
||||||
# License suitable for displaying in a popup
|
# License suitable for displaying in a popup
|
||||||
LICENSE.txt: $(S)COPYRIGHT $(S)LICENSE-APACHE $(S)LICENSE-MIT
|
LICENSE.txt: $(S)COPYRIGHT $(S)LICENSE-APACHE $(S)LICENSE-MIT
|
||||||
|
|
|
@ -8,70 +8,17 @@
|
||||||
# option. This file may not be copied, modified, or distributed
|
# option. This file may not be copied, modified, or distributed
|
||||||
# except according to those terms.
|
# except according to those terms.
|
||||||
|
|
||||||
# FIXME: Docs are currently not installed from the stageN dirs.
|
|
||||||
# For consistency it might be desirable for stageN to be an exact
|
|
||||||
# mirror of the installation directory structure.
|
|
||||||
|
|
||||||
# The stage we install from
|
install: dist-install-dir-$(CFG_BUILD)
|
||||||
ISTAGE = $(PREPARE_STAGE)
|
$(Q)sh tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --prefix="$(CFG_PREFIX)"
|
||||||
|
|
||||||
$(eval $(call DEF_PREPARE,mkfile-install))
|
uninstall: dist-install-dir-$(CFG_BUILD)
|
||||||
|
$(Q)sh tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --prefix="$(CFG_PREFIX)" --uninstall
|
||||||
install: PREPARE_HOST=$(CFG_BUILD)
|
|
||||||
install: PREPARE_TARGETS=$(CFG_TARGET)
|
|
||||||
install: PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
|
|
||||||
install: PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
|
|
||||||
install: PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
|
|
||||||
install: PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD)
|
|
||||||
install: PREPARE_SOURCE_DIR=$(PREPARE_HOST)/stage$(PREPARE_STAGE)
|
|
||||||
install: PREPARE_SOURCE_BIN_DIR=$(PREPARE_SOURCE_DIR)/bin
|
|
||||||
install: PREPARE_SOURCE_LIB_DIR=$(PREPARE_SOURCE_DIR)/$(CFG_LIBDIR_RELATIVE)
|
|
||||||
install: PREPARE_SOURCE_MAN_DIR=$(S)/man
|
|
||||||
install: PREPARE_DEST_BIN_DIR=$(DESTDIR)$(CFG_PREFIX)/bin
|
|
||||||
install: PREPARE_DEST_LIB_DIR=$(DESTDIR)$(CFG_LIBDIR)
|
|
||||||
install: PREPARE_DEST_MAN_DIR=$(DESTDIR)$(CFG_MANDIR)/man1
|
|
||||||
install: prepare-everything-mkfile-install
|
|
||||||
|
|
||||||
|
|
||||||
# Uninstall code
|
######################################################################
|
||||||
|
# Android remote installation
|
||||||
PREFIX_ROOT = $(CFG_PREFIX)
|
######################################################################
|
||||||
PREFIX_BIN = $(PREFIX_ROOT)/bin
|
|
||||||
PREFIX_LIB = $(CFG_LIBDIR)
|
|
||||||
|
|
||||||
INSTALL_TOOLS := $(PREPARE_TOOLS)
|
|
||||||
|
|
||||||
# Shorthand for build/stageN/bin
|
|
||||||
HB = $(HBIN$(ISTAGE)_H_$(CFG_BUILD))
|
|
||||||
HB2 = $(HBIN2_H_$(CFG_BUILD))
|
|
||||||
# Shorthand for build/stageN/lib
|
|
||||||
HL = $(HLIB$(ISTAGE)_H_$(CFG_BUILD))
|
|
||||||
# Shorthand for the prefix bin directory
|
|
||||||
PHB = $(PREFIX_BIN)
|
|
||||||
# Shorthand for the prefix bin directory
|
|
||||||
PHL = $(PREFIX_LIB)
|
|
||||||
|
|
||||||
HOST_LIB_FROM_HL_GLOB = \
|
|
||||||
$(patsubst $(HL)/%,$(PHL)/%,$(wildcard $(HL)/$(1)))
|
|
||||||
|
|
||||||
uninstall: $(foreach tool,$(INSTALL_TOOLS),uninstall-tool-$(tool))
|
|
||||||
$(Q)rm -Rf $(PHL)/$(CFG_RUSTLIBDIR)
|
|
||||||
|
|
||||||
define UNINSTALL_TOOL
|
|
||||||
uninstall-tool-$(1): $$(foreach dep,$$(TOOL_DEPS_$(1)),uninstall-lib-$$(dep))
|
|
||||||
$$(Q)rm -f $$(PHB)/$(1)$$(X_$$(CFG_BUILD))
|
|
||||||
$$(Q)rm -f $$(CFG_MANDIR)/man1/$(1).1
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(foreach tool,$(INSTALL_TOOLS),$(eval $(call UNINSTALL_TOOL,$(tool))))
|
|
||||||
|
|
||||||
define UNINSTALL_LIB
|
|
||||||
uninstall-lib-$(1): $$(foreach dep,$$(RUST_DEPS_$(1)),uninstall-lib-$$(dep))
|
|
||||||
$$(Q)rm -f $$(call HOST_LIB_FROM_HL_GLOB,$$(call CFG_LIB_GLOB_$$(CFG_BUILD),$(1)))
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(foreach lib,$(CRATES),$(eval $(call UNINSTALL_LIB,$(lib))))
|
|
||||||
|
|
||||||
|
|
||||||
# Android runtime setup
|
# Android runtime setup
|
||||||
# FIXME: This probably belongs somewhere else
|
# FIXME: This probably belongs somewhere else
|
||||||
|
|
Loading…
Reference in New Issue