@@ -33,15 +33,15 @@ prepare-base: PREPARE_SOURCE_LIB_DIR=$(PREPARE_SOURCE_DIR)/$(CFG_LIBDIR_RELATIVE
33
33
prepare-base : PREPARE_SOURCE_MAN_DIR=$(S ) /man
34
34
prepare-base : PREPARE_DEST_BIN_DIR=$(PREPARE_DEST_DIR ) /bin
35
35
prepare-base : PREPARE_DEST_LIB_DIR=$(PREPARE_DEST_DIR ) /$(CFG_LIBDIR_RELATIVE )
36
- prepare-base : PREPARE_DEST_MAN_DIR=$(PREPARE_DEST_DIR ) /man/ man1
36
+ prepare-base : PREPARE_DEST_MAN_DIR=$(PREPARE_DEST_DIR ) /man1
37
37
prepare-base : prepare-host prepare-targets
38
38
39
39
prepare-everything : prepare-host prepare-targets
40
40
41
41
DEFAULT_PREPARE_DIR_CMD = umask 022 && mkdir -p
42
42
DEFAULT_PREPARE_BIN_CMD = install -m755
43
43
DEFAULT_PREPARE_LIB_CMD = install -m644
44
- DEFAULT_PREPARE_MAN_CMD = install -m644
44
+ DEFAULT_PREPARE_MAN_CMD = install -m755
45
45
46
46
# On windows we install from stage3, but on unix only stage2
47
47
# Because of the way these rules are organized, preparing from any
@@ -55,14 +55,14 @@ endif
55
55
# Create a directory
56
56
# $(1) is the directory
57
57
define PREPARE_DIR
58
- @$(Q )$(call E, prepare : $(1 ) )
58
+ @$(Q )$(call E, install : $(1 ) )
59
59
$(Q )$(PREPARE_DIR_CMD ) $(1 )
60
60
endef
61
61
62
62
# Copy an executable
63
63
# $(1) is the filename/libname-glob
64
64
define PREPARE_BIN
65
- @$(call E, prepare : $(PREPARE_DEST_BIN_DIR ) /$(1 ) )
65
+ @$(call E, install : $(PREPARE_DEST_BIN_DIR ) /$(1 ) )
66
66
$(Q )$(PREPARE_BIN_CMD ) $(PREPARE_SOURCE_BIN_DIR ) /$(1 ) $(PREPARE_DEST_BIN_DIR ) /$(1 )
67
67
endef
68
68
75
75
# problem. I'm sorry, just don't remove the $(nop), alright?
76
76
define PREPARE_LIB
77
77
$(nop )
78
- @$(call E, prepare : $(PREPARE_WORKING_DEST_LIB_DIR ) /$(1 ) )
78
+ @$(call E, install : $(PREPARE_WORKING_DEST_LIB_DIR ) /$(1 ) )
79
79
$(Q ) LIB_NAME="$(notdir $(lastword $(wildcard $(PREPARE_WORKING_SOURCE_LIB_DIR ) /$(1 ) ) ) ) "; \
80
80
MATCHES="$(filter-out % $(notdir $(lastword $(wildcard $(PREPARE_WORKING_SOURCE_LIB_DIR ) /$(1 ) ) ) ) ,\
81
81
$(wildcard $(PREPARE_WORKING_DEST_LIB_DIR ) /$(1 ) ) ) "; \
91
91
# Copy a man page
92
92
# $(1) - source dir
93
93
define PREPARE_MAN
94
- @$(call E, prepare : $(PREPARE_DEST_MAN_DIR ) /$(1 ) )
94
+ @$(call E, install : $(PREPARE_DEST_MAN_DIR ) /$(1 ) )
95
95
$(Q )$(PREPARE_MAN_CMD ) $(PREPARE_SOURCE_MAN_DIR ) /$(1 ) $(PREPARE_DEST_MAN_DIR ) /$(1 )
96
96
endef
97
97
@@ -106,7 +106,7 @@ prepare-host-tools: \
106
106
$(foreach host,$(CFG_HOST),\
107
107
prepare-host-tool-$(tool)-$(stage)-$(host))))
108
108
109
- prepare-host-dirs : prepare-maybe-clean
109
+ prepare-host-dirs :
110
110
$(call PREPARE_DIR,$(PREPARE_DEST_BIN_DIR ) )
111
111
$(call PREPARE_DIR,$(PREPARE_DEST_LIB_DIR ) )
112
112
$(call PREPARE_DIR,$(PREPARE_DEST_MAN_DIR ) )
@@ -115,8 +115,7 @@ prepare-host-dirs: prepare-maybe-clean
115
115
# $(2) is stage
116
116
# $(3) is host
117
117
define DEF_PREPARE_HOST_TOOL
118
- prepare-host-tool-$(1 ) -$(2 ) -$(3 ) : prepare-maybe-clean \
119
- $$(foreach dep,$$(TOOL_DEPS_$(1 ) ) ,prepare-host-lib-$$(dep ) -$(2 ) -$(3 ) ) \
118
+ prepare-host-tool-$(1 ) -$(2 ) -$(3 ) : $$(foreach dep,$$(TOOL_DEPS_$(1 ) ) ,prepare-host-lib-$$(dep ) -$(2 ) -$(3 ) ) \
120
119
$$(HBIN$(2 ) _H_$(3 ) ) /$(1 )$$(X_$(3 ) ) \
121
120
prepare-host-dirs
122
121
$$(if $$(findstring $(2 ) , $$(PREPARE_STAGE ) ) ,\
@@ -141,8 +140,7 @@ $(foreach tool,$(PREPARE_TOOLS),\
141
140
define DEF_PREPARE_HOST_LIB
142
141
prepare-host-lib-$(1 ) -$(2 ) -$(3 ) : PREPARE_WORKING_SOURCE_LIB_DIR=$$(PREPARE_SOURCE_LIB_DIR )
143
142
prepare-host-lib-$(1 ) -$(2 ) -$(3 ) : PREPARE_WORKING_DEST_LIB_DIR=$$(PREPARE_DEST_LIB_DIR )
144
- prepare-host-lib-$(1 ) -$(2 ) -$(3 ) : prepare-maybe-clean \
145
- $$(foreach dep,$$(RUST_DEPS_$(1 ) ) ,prepare-host-lib-$$(dep ) -$(2 ) -$(3 ) ) \
143
+ prepare-host-lib-$(1 ) -$(2 ) -$(3 ) : $$(foreach dep,$$(RUST_DEPS_$(1 ) ) ,prepare-host-lib-$$(dep ) -$(2 ) -$(3 ) ) \
146
144
$$(HLIB$(2 ) _H_$(3 ) ) /stamp.$(1 ) \
147
145
prepare-host-dirs
148
146
$$(if $$(findstring $(2 ) , $$(PREPARE_STAGE ) ) ,\
@@ -168,7 +166,7 @@ define DEF_PREPARE_TARGET_N
168
166
# Rebind PREPARE_*_LIB_DIR to point to rustlib, then install the libs for the targets
169
167
prepare-target-$(2 ) -host-$(3 ) -$(1 ) : PREPARE_WORKING_SOURCE_LIB_DIR=$$(PREPARE_SOURCE_LIB_DIR ) /$$(CFG_RUSTLIBDIR ) /$(2 ) /lib
170
168
prepare-target-$(2 ) -host-$(3 ) -$(1 ) : PREPARE_WORKING_DEST_LIB_DIR=$$(PREPARE_DEST_LIB_DIR ) /$$(CFG_RUSTLIBDIR ) /$(2 ) /lib
171
- prepare-target-$(2 ) -host-$(3 ) -$(1 ) : prepare-maybe-clean \
169
+ prepare-target-$(2 ) -host-$(3 ) -$(1 ) : \
172
170
$$(foreach crate,$$(TARGET_CRATES ) , \
173
171
$$(TLIB$(1 ) _T_$(2 ) _H_$(3 ) ) /stamp.$$(crate ) ) \
174
172
$$(if $$(findstring $(2 ) ,$$(CFG_HOST ) ) , \
@@ -196,9 +194,3 @@ $(foreach host,$(CFG_HOST),\
196
194
$(foreach target,$(CFG_TARGET), \
197
195
$(foreach stage,$(PREPARE_STAGES),\
198
196
$(eval $(call DEF_PREPARE_TARGET_N,$(stage),$(target),$(host))))))
199
-
200
- prepare-maybe-clean :
201
- $(if $(findstring true,$(PREPARE_CLEAN ) ) ,\
202
- @$(call E, cleaning destination $@),)
203
- $(if $(findstring true,$(PREPARE_CLEAN)),\
204
- $(Q)rm -rf $(PREPARE_DEST_DIR),)
0 commit comments