improve install, fix MKFILE_DEPS so it works
This commit is contained in:
parent
865a796081
commit
5ce33ceb76
2 changed files with 23 additions and 25 deletions
20
Makefile.in
20
Makefile.in
|
@ -49,20 +49,18 @@ STAGES = 0 1 2 3
|
|||
######################################################################
|
||||
|
||||
include config.mk
|
||||
OUR_MKFILES := Makefile config.mk $(wildcard $(CFG_SRC_DIR)/mk/*.mk)
|
||||
3RDPARTY_MKFILES := $(CFG_SRC_DIR)/src/libuv/Makefile \
|
||||
$(wildcard $(CFG_SRC_DIR)/src/libuv/*.mk)
|
||||
GEN_MKFILES := $(wildcard $(CFG_SRC_DIR)/mk/libuv/*/*/*) \
|
||||
$(wildcard $(CFG_SRC_DIR)/mk/libuv/mac/src/libuv/*) \
|
||||
$(wildcard $(CFG_SRC_DIR)/mk/libuv/mac/src/libuv/*) \
|
||||
$(wildcard $(CFG_SRC_DIR)/mk/libuv/mac/src/libuv/*)
|
||||
|
||||
MKFILES := $(OUR_MKFILES) $(3RDPARTY_MKFILES) $(GEN_MKFILES)
|
||||
|
||||
ifdef IGNORE_MKFILES
|
||||
MKFILE_DEPS :=
|
||||
else
|
||||
MKFILE_DEPS := $(MKFILES)
|
||||
OUR_MKFILES := Makefile config.mk $(wildcard $(CFG_SRC_DIR)/mk/*.mk)
|
||||
3RDPARTY_MKFILES := $(CFG_SRC_DIR)/src/libuv/Makefile \
|
||||
$(wildcard $(CFG_SRC_DIR)/src/libuv/*.mk)
|
||||
GEN_MKFILES := $(wildcard $(CFG_SRC_DIR)/mk/libuv/*/*/*) \
|
||||
$(wildcard $(CFG_SRC_DIR)/mk/libuv/mac/src/libuv/*) \
|
||||
$(wildcard $(CFG_SRC_DIR)/mk/libuv/mac/src/libuv/*) \
|
||||
$(wildcard $(CFG_SRC_DIR)/mk/libuv/mac/src/libuv/*)
|
||||
MKFILE_DEPS := $(OUR_MKFILES) $(3RDPARTY_MKFILES) $(GEN_MKFILES)
|
||||
endif
|
||||
|
||||
NON_HOST_TRIPLES = $(filter-out $(CFG_HOST_TRIPLE),$(CFG_TARGET_TRIPLES))
|
||||
|
@ -286,7 +284,7 @@ HSREQ$(1)_H_$(3) = \
|
|||
$$(HLIB$(1)_H_$(3))/$$(CFG_RUNTIME) \
|
||||
$$(HLIB$(1)_H_$(3))/$$(CFG_RUSTLLVM) \
|
||||
$$(HSTDLIB_DEFAULT$(1)_H_$(3)) \
|
||||
$$(MKFILES)
|
||||
$$(MKFILE_DEPS)
|
||||
|
||||
# Prerequisites for using the stageN compiler to build target artifacts
|
||||
TSREQ$(1)_T_$(2)_H_$(3) = \
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
ifdef VERBOSE
|
||||
INSTALL = cp $(1)/$(3) $(2)/$(3)
|
||||
else
|
||||
INSTALL = @$(call E, install: $(2)/$(3)) && cp $(1)/$(3) $(2)/$(3)
|
||||
INSTALL = $(Q)$(call E, install: $(2)/$(3)) && cp $(1)/$(3) $(2)/$(3)
|
||||
endif
|
||||
|
||||
# The stage we install from
|
||||
|
@ -22,20 +22,20 @@ define INSTALL_TARGET_N
|
|||
# $(2) is the host triple
|
||||
|
||||
# T{B,L} == Target {Bin, Lib} for stage ${ISTAGE}
|
||||
TB$(1)_H_$(2) = $$(TBIN$$(ISTAGE)_T_$(1)_H_$(2))
|
||||
TL$(1)_H_$(2) = $$(TLIB$$(ISTAGE))_T_$(1)_H_$(2))
|
||||
TB$(1)$(2) = $$(TBIN$$(ISTAGE)_T_$(1)_H_$(2))
|
||||
TL$(1)$(2) = $$(TLIB$$(ISTAGE)_T_$(1)_H_$(2))
|
||||
|
||||
# PT{R,B,L} == Prefix Target {Root, Bin, Lib}
|
||||
PTR_T_$(1)_H_$(2) = $$(PREFIX_LIB)/rustc/$(1)
|
||||
PTB_T_$(1)_H_$(2) = $$(PTR_T_$(1)_H_$(2))/bin
|
||||
PTL_T_$(1)_H_$(2) = $$(PTR_T_$(1)_H_$(2))/lib
|
||||
PTR$(1)$(2) = $$(PREFIX_LIB)/rustc/$(1)
|
||||
PTB$(1)$(2) = $$(PTR$(1)$(2))/bin
|
||||
PTL$(1)$(2) = $$(PTR$(1)$(2))/lib
|
||||
|
||||
install-target-$(1)-host-$(2): $$(SREQ$$(ISTAGE)_T_$(1)_H_$(2))
|
||||
$(Q)mkdir -p $$(PTL_$(1)_H_$(2))
|
||||
$(Q)$(call INSTALL,$$(TL$(1)_H_$(2)),$$(PTL$(1)_H_$(2)),$$(CFG_RUNTIME))
|
||||
$(Q)$(call INSTALL,$$(TL$(1)_H_$(2)),$$(PTL$(1)_H_$(2)),$$(CFG_STDLIB))
|
||||
$(Q)$(call INSTALL,$$(TL$(1)_H_$(2)),$$(PTL$(1)_H_$(2)),intrinsics.bc)
|
||||
$(Q)$(call INSTALL,$$(TL$(1)_H_$(2)),$$(PTL$(1)_H_$(2)),libmorestack.a)
|
||||
$$(Q)mkdir -p $$(PTL$(1)$(2))
|
||||
$$(Q)$$(call INSTALL,$$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(CFG_RUNTIME))
|
||||
$$(Q)$$(call INSTALL,$$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(CFG_STDLIB))
|
||||
$$(Q)$$(call INSTALL,$$(TL$(1)$(2)),$$(PTL$(1)$(2)),intrinsics.bc)
|
||||
$$(Q)$$(call INSTALL,$$(TL$(1)$(2)),$$(PTL$(1)$(2)),libmorestack.a)
|
||||
endef
|
||||
|
||||
$(foreach target,$(CFG_TARGET_TRIPLES), \
|
||||
|
@ -47,15 +47,15 @@ INSTALL_TARGET_RULES = $(foreach target,$(CFG_TARGET_TRIPLES), \
|
|||
install: install-host install-targets
|
||||
|
||||
# Shorthand for build/stageN/bin
|
||||
HB = $(HBIN$(ISTAGE)_H_$(HT))
|
||||
HB = $(HBIN$(ISTAGE)_H_$(CFG_HOST_TRIPLE))
|
||||
# Shorthand for build/stageN/lib
|
||||
HL = $(HLIB$(ISTAGE)_H_$(HT))
|
||||
HL = $(HLIB$(ISTAGE)_H_$(CFG_HOST_TRIPLE))
|
||||
# Shorthand for the prefix bin directory
|
||||
PHB = $(PREFIX_BIN)
|
||||
# Shorthand for the prefix bin directory
|
||||
PHL = $(PREFIX_LIB)
|
||||
|
||||
install-host: $(SREQ$(ISTAGE)$(CFG_HOST_TRIPLE))
|
||||
install-host: $(SREQ$(ISTAGE)_T_$(CFG_HOST_TRIPLE)_H_$(CFG_HOST_TRIPLE))
|
||||
$(Q)mkdir -p $(PREFIX_BIN)
|
||||
$(Q)mkdir -p $(PREFIX_LIB)
|
||||
$(Q)mkdir -p $(PREFIX_ROOT)/share/man/man1
|
||||
|
|
Loading…
Add table
Reference in a new issue