Bug 1382697 - Expand NSDISTMODE handling; r?glandium draft
authorGregory Szorc <gps@mozilla.com>
Fri, 21 Jul 2017 21:46:10 -0700
changeset 613677 08a4c924d50187e3b76c604758f2f7bccc08a177
parent 613676 8cd34ccbcf90c18dc147e5ee7446c6fb3f556671
child 613678 f09d3dff64de1e352889e71549c786a1cca680ec
push id69832
push usergszorc@mozilla.com
push dateSat, 22 Jul 2017 06:27:51 +0000
reviewersglandium
bugs1382697
milestone56.0a1
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
config/config.mk
--- 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