Bug 1382697 - Expand NSDISTMODE handling; r?glandium
The comment saying this needs to be target-specific is from an
ancient era. NSDISTMODE is only used in 4 places outside of nspr
and nss and all of them are global in a Makefile.in.
MozReview-Commit-ID: 5xGDsoVhlWW
--- a/config/config.mk
+++ b/config/config.mk
@@ -446,19 +446,23 @@ NSINSTALL = $(DEPTH)/config/nsinstall$(H
endif # WINNT
ifeq (,$(CROSS_COMPILE)$(filter-out WINNT, $(OS_ARCH)))
INSTALL = $(NSINSTALL) -t
else
-# This isn't laid out as conditional directives so that NSDISTMODE can be
-# target-specific.
-INSTALL = $(if $(filter copy, $(NSDISTMODE)), $(NSINSTALL) -t, $(if $(filter absolute_symlink, $(NSDISTMODE)), $(NSINSTALL) -L $(PWD), $(NSINSTALL) -R))
+ifeq ($(NSDISTMODE),copy)
+INSTALL = $(NSINSTALL) -t
+else ifeq ($(NSDISTMODE),absolute_symlink)
+INSTALL = $(NSINSTALL) -L $(PWD)
+else
+INSTALL = $(NSINSTALL) -R
+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