Bug 1382697 - Honor file install mode for $(INSTALL); r?glandium
Previously, we switched between copy and symlinks based on Windows and
cross-compiling. Now that we have a configure-derived variable dictating
our policy, we can key off that instead.
MozReview-Commit-ID: CP4yjr7353l
--- a/config/config.mk
+++ b/config/config.mk
@@ -434,29 +434,27 @@ GARBAGE += $(DEPENDENCIES) core $(wildc
NSINSTALL_PY := $(PYTHON) $(abspath $(MOZILLA_DIR)/config/nsinstall.py)
ifneq (,$(or $(filter WINNT,$(HOST_OS_ARCH)),$(if $(COMPILE_ENVIRONMENT),,1)))
NSINSTALL = $(NSINSTALL_PY)
else
NSINSTALL = $(DEPTH)/config/nsinstall$(HOST_BIN_SUFFIX)
endif # WINNT
-ifeq (,$(CROSS_COMPILE)$(filter-out WINNT, $(OS_ARCH)))
-INSTALL = $(NSINSTALL) -t
-
-else
-
-ifeq ($(NSDISTMODE),copy)
+ifeq ($(FILE_INSTALL_MODE),copy)
INSTALL = $(NSINSTALL) -t
else
-INSTALL = $(NSINSTALL) -R
+ # NSDISTMODE can override symlinks
+ ifeq ($(NSDISTMODE),copy)
+ INSTALL = $(NSINSTALL) -t
+ else
+ INSTALL = $(NSINSTALL) -R
+ endif
endif
-endif # WINNT
-
# The default for install_cmd is simply INSTALL
install_cmd ?= $(INSTALL) $(1)
# Use nsinstall in copy mode to install files on the system
SYSINSTALL = $(NSINSTALL) -t
# This isn't necessarily true, just here
sysinstall_cmd = install_cmd