|
18 | 18 | # $(2) is the destination directory
|
19 | 19 | # $(3) is the filename/libname-glob
|
20 | 20 | ifdef VERBOSE
|
21 |
| - INSTALL = install -m755 $(1)/$(3) $(2)/$(3) |
| 21 | + INSTALL = install -m755 $(1)/$(3) $(DESTDIR)$(2)/$(3) |
22 | 22 | else
|
23 |
| - INSTALL = $(Q)$(call E, install: $(2)/$(3)) && install -m755 $(1)/$(3) $(2)/$(3) |
| 23 | + INSTALL = $(Q)$(call E, install: $(DESTDIR)$(2)/$(3)) && install -m755 $(1)/$(3) $(DESTDIR)$(2)/$(3) |
24 | 24 | endif
|
25 | 25 |
|
26 | 26 | # For MK_INSTALL_DIR
|
27 | 27 | # $(1) is the directory to create
|
28 |
| -MK_INSTALL_DIR = (umask 022 && mkdir -p $(1)) |
| 28 | +MK_INSTALL_DIR = (umask 022 && mkdir -p $(DESTDIR)$(1)) |
29 | 29 |
|
30 | 30 | # For INSTALL_LIB,
|
31 | 31 | # Target-specific $(LIB_SOURCE_DIR) is the source directory
|
32 | 32 | # Target-specific $(LIB_DESTIN_DIR) is the destination directory
|
33 | 33 | # $(1) is the filename/libname-glob
|
34 | 34 | ifdef VERBOSE
|
35 |
| - DO_INSTALL_LIB = install -m644 `ls -drt1 $(LIB_SOURCE_DIR)/$(1) | tail -1` $(LIB_DESTIN_DIR)/ |
| 35 | + DO_INSTALL_LIB = install -m644 `ls -drt1 $(LIB_SOURCE_DIR)/$(1) | tail -1` $(DESTDIR)$(LIB_DESTIN_DIR)/ |
36 | 36 | else
|
37 |
| - DO_INSTALL_LIB = $(Q)$(call E, install_lib: $(LIB_DESTIN_DIR)/$(1)) && \ |
38 |
| - install -m644 `ls -drt1 $(LIB_SOURCE_DIR)/$(1) | tail -1` $(LIB_DESTIN_DIR)/ |
| 37 | + DO_INSTALL_LIB = $(Q)$(call E, install_lib: $(DESTDIR)$(LIB_DESTIN_DIR)/$(1)) && \ |
| 38 | + install -m644 `ls -drt1 $(LIB_SOURCE_DIR)/$(1) | tail -1` $(DESTDIR)$(LIB_DESTIN_DIR)/ |
39 | 39 | endif
|
40 | 40 |
|
41 | 41 | # Target-specific $(LIB_SOURCE_DIR) is the source directory
|
@@ -152,9 +152,9 @@ install-host: $(CSREQ$(ISTAGE)_T_$(CFG_BUILD_)_H_$(CFG_BUILD_))
|
152 | 152 | $(Q)$(call INSTALL_LIB,$(LIBRUSTDOC_GLOB_$(CFG_BUILD)))
|
153 | 153 | $(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_RUNTIME_$(CFG_BUILD)))
|
154 | 154 | $(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_RUSTLLVM_$(CFG_BUILD)))
|
155 |
| - $(Q)$(call INSTALL,$(S)/man, $(CFG_MANDIR)/man1,rustc.1) |
156 |
| - $(Q)$(call INSTALL,$(S)/man, $(CFG_MANDIR)/man1,rustdoc.1) |
157 |
| - $(Q)$(call INSTALL,$(S)/man, $(CFG_MANDIR)/man1,rustpkg.1) |
| 155 | + $(Q)$(call INSTALL,$(S)/man,$(CFG_MANDIR)/man1,rustc.1) |
| 156 | + $(Q)$(call INSTALL,$(S)/man,$(CFG_MANDIR)/man1,rustdoc.1) |
| 157 | + $(Q)$(call INSTALL,$(S)/man,$(CFG_MANDIR)/man1,rustpkg.1) |
158 | 158 |
|
159 | 159 | install-targets: $(INSTALL_TARGET_RULES)
|
160 | 160 |
|
|
0 commit comments