Skip to content

Commit 37d8957

Browse files
committed
---
yaml --- r: 46718 b: refs/heads/auto c: 995a019 h: refs/heads/master v: v3
1 parent c7ee997 commit 37d8957

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: 23eb1058959c45fedce7a4a6e47b730caf7d8870
17+
refs/heads/auto: 995a019dffc9c0b91392f2afe0be5685be045c2f

branches/auto/mk/install.mk

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ PREFIX_ROOT = $(CFG_PREFIX)
3030
PREFIX_BIN = $(PREFIX_ROOT)/bin
3131
PREFIX_LIB = $(PREFIX_ROOT)/$(CFG_LIBDIR)
3232

33-
define INSTALL_TARGET_N
33+
define INSTALL_PREPARE_N
3434
# $(1) is the target triple
3535
# $(2) is the host triple
3636

@@ -43,6 +43,24 @@ PTR$(1)$(2) = $$(PREFIX_LIB)/rustc/$(1)
4343
PTB$(1)$(2) = $$(PTR$(1)$(2))/bin
4444
PTL$(1)$(2) = $$(PTR$(1)$(2))/$(CFG_LIBDIR)
4545

46+
endef
47+
48+
$(foreach target,$(CFG_TARGET_TRIPLES), \
49+
$(eval $(call INSTALL_PREPARE_N,$(target),$(CFG_BUILD_TRIPLE))))
50+
51+
define INSTALL_TARGET_N
52+
install-target-$(1)-host-$(2): $$(TSREQ$$(ISTAGE)_T_$(1)_H_$(2)) $$(SREQ$$(ISTAGE)_T_$(1)_H_$(2))
53+
$$(Q)mkdir -p $$(PTL$(1)$(2))
54+
$$(Q)$$(call INSTALL,$$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(CFG_RUNTIME_$(1)))
55+
$$(Q)$$(call INSTALL_LIB, \
56+
$$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(CORELIB_GLOB_$(1)))
57+
$$(Q)$$(call INSTALL_LIB, \
58+
$$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(STDLIB_GLOB_$(1)))
59+
$$(Q)$$(call INSTALL,$$(TL$(1)$(2)),$$(PTL$(1)$(2)),libmorestack.a)
60+
61+
endef
62+
63+
define INSTALL_HOST_N
4664
install-target-$(1)-host-$(2): $$(CSREQ$$(ISTAGE)_T_$(1)_H_$(2))
4765
$$(Q)mkdir -p $$(PTL$(1)$(2))
4866
$$(Q)$$(call INSTALL,$$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(CFG_RUNTIME_$(1)))
@@ -67,7 +85,9 @@ install-target-$(1)-host-$(2): $$(CSREQ$$(ISTAGE)_T_$(1)_H_$(2))
6785
endef
6886

6987
$(foreach target,$(CFG_TARGET_TRIPLES), \
70-
$(eval $(call INSTALL_TARGET_N,$(target),$(CFG_BUILD_TRIPLE))))
88+
$(if $(findstring $(target), $(CFG_BUILD_TRIPLE)), \
89+
$(eval $(call INSTALL_HOST_N,$(target),$(CFG_BUILD_TRIPLE))), \
90+
$(eval $(call INSTALL_TARGET_N,$(target),$(CFG_BUILD_TRIPLE)))))
7191

7292
INSTALL_TARGET_RULES = $(foreach target,$(CFG_TARGET_TRIPLES), \
7393
install-target-$(target)-host-$(CFG_BUILD_TRIPLE))

0 commit comments

Comments
 (0)