Skip to content

Commit e509cd6

Browse files
committed
Revert "Revert "mk: Run 'make install' through install.sh""
This reverts commit d621631. Conflicts: mk/install.mk
1 parent ff17b7c commit e509cd6

File tree

3 files changed

+15
-67
lines changed

3 files changed

+15
-67
lines changed

Makefile.in

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -232,19 +232,20 @@ ifneq ($(strip $(findstring prepare,$(MAKECMDGOALS)) \
232232
include $(CFG_SRC_DIR)mk/prepare.mk
233233
endif
234234

235-
# (Unix) Installation from the build directory
236-
ifneq ($(findstring install,$(MAKECMDGOALS)),)
237-
CFG_INFO := $(info cfg: including install rules)
238-
include $(CFG_SRC_DIR)mk/install.mk
239-
endif
240-
241235
# Source and binary distribution artifacts
242236
ifneq ($(strip $(findstring dist,$(MAKECMDGOALS)) \
237+
$(findstring install,$(MAKECMDGOALS)) \
243238
$(findstring clean,$(MAKECMDGOALS))),)
244239
CFG_INFO := $(info cfg: including dist rules)
245240
include $(CFG_SRC_DIR)mk/dist.mk
246241
endif
247242

243+
# (Unix) Installation from the build directory
244+
ifneq ($(findstring install,$(MAKECMDGOALS)),)
245+
CFG_INFO := $(info cfg: including install rules)
246+
include $(CFG_SRC_DIR)mk/install.mk
247+
endif
248+
248249
# Cleaning
249250
ifneq ($(findstring clean,$(MAKECMDGOALS)),)
250251
CFG_INFO := $(info cfg: including clean rules)

mk/dist.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# * dist-tar-bins - Ad-hoc Unix binary installers
2323
# * dist-docs - Stage docs for upload
2424

25-
PKG_NAME = $(CFG_PACKAGE_NAME)
25+
PKG_NAME := $(CFG_PACKAGE_NAME)
2626

2727
# License suitable for displaying in a popup
2828
LICENSE.txt: $(S)COPYRIGHT $(S)LICENSE-APACHE $(S)LICENSE-MIT

mk/install.mk

Lines changed: 7 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -8,70 +8,17 @@
88
# option. This file may not be copied, modified, or distributed
99
# except according to those terms.
1010

11-
# FIXME: Docs are currently not installed from the stageN dirs.
12-
# For consistency it might be desirable for stageN to be an exact
13-
# mirror of the installation directory structure.
1411

15-
# The stage we install from
16-
ISTAGE = $(PREPARE_STAGE)
12+
install: dist-install-dir-$(CFG_BUILD)
13+
$(Q)sh tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --prefix="$(CFG_PREFIX)"
1714

18-
$(eval $(call DEF_PREPARE,mkfile-install))
15+
uninstall: dist-install-dir-$(CFG_BUILD)
16+
$(Q)sh tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --prefix="$(CFG_PREFIX)" --uninstall
1917

20-
install: PREPARE_HOST=$(CFG_BUILD)
21-
install: PREPARE_TARGETS=$(CFG_TARGET)
22-
install: PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
23-
install: PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
24-
install: PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
25-
install: PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD)
26-
install: PREPARE_SOURCE_DIR=$(PREPARE_HOST)/stage$(PREPARE_STAGE)
27-
install: PREPARE_SOURCE_BIN_DIR=$(PREPARE_SOURCE_DIR)/bin
28-
install: PREPARE_SOURCE_LIB_DIR=$(PREPARE_SOURCE_DIR)/$(CFG_LIBDIR_RELATIVE)
29-
install: PREPARE_SOURCE_MAN_DIR=$(S)/man
30-
install: PREPARE_DEST_BIN_DIR=$(DESTDIR)$(CFG_PREFIX)/bin
31-
install: PREPARE_DEST_LIB_DIR=$(DESTDIR)$(CFG_LIBDIR)
32-
install: PREPARE_DEST_MAN_DIR=$(DESTDIR)$(CFG_MANDIR)/man1
33-
install: prepare-everything-mkfile-install
34-
35-
36-
# Uninstall code
37-
38-
PREFIX_ROOT = $(CFG_PREFIX)
39-
PREFIX_BIN = $(PREFIX_ROOT)/bin
40-
PREFIX_LIB = $(CFG_LIBDIR)
41-
42-
INSTALL_TOOLS := $(PREPARE_TOOLS)
43-
44-
# Shorthand for build/stageN/bin
45-
HB = $(HBIN$(ISTAGE)_H_$(CFG_BUILD))
46-
HB2 = $(HBIN2_H_$(CFG_BUILD))
47-
# Shorthand for build/stageN/lib
48-
HL = $(HLIB$(ISTAGE)_H_$(CFG_BUILD))
49-
# Shorthand for the prefix bin directory
50-
PHB = $(PREFIX_BIN)
51-
# Shorthand for the prefix bin directory
52-
PHL = $(PREFIX_LIB)
53-
54-
HOST_LIB_FROM_HL_GLOB = \
55-
$(patsubst $(HL)/%,$(PHL)/%,$(wildcard $(HL)/$(1)))
56-
57-
uninstall: $(foreach tool,$(INSTALL_TOOLS),uninstall-tool-$(tool))
58-
$(Q)rm -Rf $(PHL)/$(CFG_RUSTLIBDIR)
59-
60-
define UNINSTALL_TOOL
61-
uninstall-tool-$(1): $$(foreach dep,$$(TOOL_DEPS_$(1)),uninstall-lib-$$(dep))
62-
$$(Q)rm -f $$(PHB)/$(1)$$(X_$$(CFG_BUILD))
63-
$$(Q)rm -f $$(CFG_MANDIR)/man1/$(1).1
64-
endef
65-
66-
$(foreach tool,$(INSTALL_TOOLS),$(eval $(call UNINSTALL_TOOL,$(tool))))
67-
68-
define UNINSTALL_LIB
69-
uninstall-lib-$(1): $$(foreach dep,$$(RUST_DEPS_$(1)),uninstall-lib-$$(dep))
70-
$$(Q)rm -f $$(call HOST_LIB_FROM_HL_GLOB,$$(call CFG_LIB_GLOB_$$(CFG_BUILD),$(1)))
71-
endef
72-
73-
$(foreach lib,$(CRATES),$(eval $(call UNINSTALL_LIB,$(lib))))
7418

19+
######################################################################
20+
# Android remote installation
21+
######################################################################
7522

7623
# Android runtime setup
7724
# FIXME: This probably belongs somewhere else

0 commit comments

Comments
 (0)