diff --git a/browser/app/Makefile.in b/browser/app/Makefile.in
index d55614e92fad..54d6b43fe126 100644
--- a/browser/app/Makefile.in
+++ b/browser/app/Makefile.in
@@ -86,7 +86,7 @@ tools repackage:: $(DIST)/bin/$(MOZ_APP_NAME) $(objdir)/macbuild/Contents/MacOS-
$(MKDIR) -p '$(dist_dest)/$(LPROJ)'
rsync -a --exclude '*.in' $(srcdir)/macbuild/Contents '$(dist_dest)' --exclude English.lproj
rsync -a --exclude '*.in' $(srcdir)/macbuild/Contents/Resources/English.lproj/ '$(dist_dest)/$(LPROJ)'
- sed -e 's/%APP_VERSION%/$(MOZ_APP_VERSION)/' -e 's/%MOZ_APP_NAME%/$(MOZ_APP_NAME)/' -e 's/%MAC_APP_NAME%/$(MAC_APP_NAME)/' -e 's/%MOZ_MACBUNDLE_ID%/$(MOZ_MACBUNDLE_ID)/' -e 's/%MAC_BUNDLE_VERSION%/$(MAC_BUNDLE_VERSION)/' -e 's|%MOZ_DEVELOPER_REPO_PATH%|$(topsrcdir)|' -e 's|%MOZ_DEVELOPER_OBJ_PATH%|$(topobjdir)|' $(srcdir)/macbuild/Contents/Info.plist.in > '$(dist_dest)/Contents/Info.plist'
+ $(call py_action,preprocessor,-Fsubstitution -DAPP_VERSION='$(MOZ_APP_VERSION)' -DMOZ_APP_NAME='$(MOZ_APP_NAME)' -DMAC_APP_NAME='$(MAC_APP_NAME)' -DMOZ_MACBUNDLE_ID='$(MOZ_MACBUNDLE_ID)' -DMAC_BUNDLE_VERSION='$(MAC_BUNDLE_VERSION)' -DMOZ_DEVELOPER_REPO_PATH='$(topsrcdir)' -DMOZ_DEVELOPER_OBJ_PATH='$(topobjdir)' $(srcdir)/macbuild/Contents/Info.plist.in -o '$(dist_dest)/Contents/Info.plist')
$(call py_action,preprocessor,-Fsubstitution --output-encoding utf-16 -DMAC_APP_NAME='$(MAC_APP_NAME)' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in -o '$(dist_dest)/$(LPROJ)/InfoPlist.strings')
rsync -a --exclude-from='$(objdir)/macbuild/Contents/MacOS-files.txt' $(DIST)/bin/ '$(dist_dest)/Contents/Resources'
rsync -a --include-from='$(objdir)/macbuild/Contents/MacOS-files.txt' --exclude '*' $(DIST)/bin/ '$(dist_dest)/Contents/MacOS'
diff --git a/browser/app/macbuild/Contents/Info.plist.in b/browser/app/macbuild/Contents/Info.plist.in
index 18a88470296a..fb5e6993ea9d 100644
--- a/browser/app/macbuild/Contents/Info.plist.in
+++ b/browser/app/macbuild/Contents/Info.plist.in
@@ -163,21 +163,21 @@
CFBundleExecutable
- %MOZ_APP_NAME%
+ @MOZ_APP_NAME@
CFBundleGetInfoString
- %MAC_APP_NAME% %APP_VERSION%
+ @MAC_APP_NAME@ @APP_VERSION@
CFBundleIconFile
firefox.icns
CFBundleIdentifier
- %MOZ_MACBUNDLE_ID%
+ @MOZ_MACBUNDLE_ID@
CFBundleInfoDictionaryVersion
6.0
CFBundleName
- %MAC_APP_NAME%
+ @MAC_APP_NAME@
CFBundlePackageType
APPL
CFBundleShortVersionString
- %APP_VERSION%
+ @APP_VERSION@
CFBundleSignature
MOZB
CFBundleURLTypes
@@ -220,7 +220,7 @@
CFBundleVersion
- %MAC_BUNDLE_VERSION%
+ @MAC_BUNDLE_VERSION@
NSUserActivityTypes
NSUserActivityTypeBrowsingWeb
@@ -250,14 +250,14 @@
identifier "org.mozilla.updater" and ((anchor apple generic and certificate leaf[field.1.2.840.113635.100.6.1.9]) or (anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] and certificate leaf[field.1.2.840.113635.100.6.1.13] and certificate leaf[subject.OU] = "43AQ936H96"))
MozillaDeveloperRepoPath
- %MOZ_DEVELOPER_REPO_PATH%
+ @MOZ_DEVELOPER_REPO_PATH@
MozillaDeveloperObjPath
- %MOZ_DEVELOPER_OBJ_PATH%
+ @MOZ_DEVELOPER_OBJ_PATH@
NSCameraUsageDescription
- Only sites you allow within %MAC_APP_NAME% will be able to use the camera.
+ Only sites you allow within @MAC_APP_NAME@ will be able to use the camera.
NSMicrophoneUsageDescription
- Only sites you allow within %MAC_APP_NAME% will be able to use the microphone.
+ Only sites you allow within @MAC_APP_NAME@ will be able to use the microphone.
diff --git a/ipc/app/Makefile.in b/ipc/app/Makefile.in
index f1a5e0141f3a..b55490ff09a2 100644
--- a/ipc/app/Makefile.in
+++ b/ipc/app/Makefile.in
@@ -29,7 +29,7 @@ ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) #{
libs::
$(NSINSTALL) -D $(DIST)/bin/$(PROGRAM).app
rsync -a -C --exclude '*.in' $(srcdir)/macbuild/Contents $(DIST)/bin/$(MOZ_CHILD_PROCESS_NAME).app
- sed -e 's/%PROGRAM%/$(MOZ_CHILD_PROCESS_NAME)/' -e 's|%MOZ_DEVELOPER_REPO_PATH%|$(topsrcdir)|' -e 's|%MOZ_DEVELOPER_OBJ_PATH%|$(topobjdir)|' $(srcdir)/macbuild/Contents/Info.plist.in > $(DIST)/bin/$(MOZ_CHILD_PROCESS_NAME).app/Contents/Info.plist
+ $(call py_action,preprocessor,-Fsubstitution -DPROGRAM='$(MOZ_CHILD_PROCESS_NAME)' -DMOZ_DEVELOPER_REPO_PATH='$(topsrcdir)' -DMOZ_DEVELOPER_OBJ_PATH='$(topobjdir)' $(srcdir)/macbuild/Contents/Info.plist.in -o $(DIST)/bin/$(MOZ_CHILD_PROCESS_NAME).app/Contents/Info.plist)
$(call py_action,preprocessor,-Fsubstitution --output-encoding utf-16 -DAPP_NAME='$(MOZ_CHILD_PROCESS_BUNDLENAME)' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in -o $(DIST)/bin/$(MOZ_CHILD_PROCESS_NAME).app/Contents/Resources/English.lproj/InfoPlist.strings)
$(NSINSTALL) -D $(DIST)/bin/$(MOZ_CHILD_PROCESS_NAME).app/Contents/MacOS
$(NSINSTALL) $(DIST)/bin/$(MOZ_CHILD_PROCESS_NAME) $(DIST)/bin/$(MOZ_CHILD_PROCESS_NAME).app/Contents/MacOS
diff --git a/ipc/app/macbuild/Contents/Info.plist.in b/ipc/app/macbuild/Contents/Info.plist.in
index 847dc40ff77a..be1cb767192f 100644
--- a/ipc/app/macbuild/Contents/Info.plist.in
+++ b/ipc/app/macbuild/Contents/Info.plist.in
@@ -5,7 +5,7 @@
CFBundleDevelopmentRegion
English
CFBundleExecutable
- %PROGRAM%
+ @PROGRAM@
CFBundleIdentifier
org.mozilla.plugincontainer
CFBundleInfoDictionaryVersion
@@ -25,8 +25,8 @@
NSHighResolutionCapable
MozillaDeveloperRepoPath
- %MOZ_DEVELOPER_REPO_PATH%
+ @MOZ_DEVELOPER_REPO_PATH@
MozillaDeveloperObjPath
- %MOZ_DEVELOPER_OBJ_PATH%
+ @MOZ_DEVELOPER_OBJ_PATH@
diff --git a/toolkit/mozapps/update/updater/Makefile.in b/toolkit/mozapps/update/updater/Makefile.in
index 41eac2ed868a..502c09d21f69 100644
--- a/toolkit/mozapps/update/updater/Makefile.in
+++ b/toolkit/mozapps/update/updater/Makefile.in
@@ -17,7 +17,7 @@ include $(topsrcdir)/config/rules.mk
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
export::
- sed -e 's/%MOZ_MACBUNDLE_ID%/$(MOZ_MACBUNDLE_ID)/' $(srcdir)/macbuild/Contents/Info.plist.in > $(DIST)/bin/Info.plist
+ $(call py_action,preprocessor,-Fsubstitution -DMOZ_MACBUNDLE_ID='$(MOZ_MACBUNDLE_ID)' $(srcdir)/macbuild/Contents/Info.plist.in -o $(DIST)/bin/Info.plist)
libs::
$(NSINSTALL) -D $(DIST)/bin/updater.app
rsync -a -C --exclude '*.in' $(srcdir)/macbuild/Contents $(DIST)/bin/updater.app
diff --git a/toolkit/mozapps/update/updater/macbuild/Contents/Info.plist.in b/toolkit/mozapps/update/updater/macbuild/Contents/Info.plist.in
index b9a3bcb4f56f..05ec56165504 100644
--- a/toolkit/mozapps/update/updater/macbuild/Contents/Info.plist.in
+++ b/toolkit/mozapps/update/updater/macbuild/Contents/Info.plist.in
@@ -34,7 +34,7 @@
SMAuthorizedClients
- identifier "%MOZ_MACBUNDLE_ID%" and ((anchor apple generic and certificate leaf[field.1.2.840.113635.100.6.1.9]) or (anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] and certificate leaf[field.1.2.840.113635.100.6.1.13] and certificate leaf[subject.OU] = "43AQ936H96"))
+ identifier "@MOZ_MACBUNDLE_ID@" and ((anchor apple generic and certificate leaf[field.1.2.840.113635.100.6.1.9]) or (anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] and certificate leaf[field.1.2.840.113635.100.6.1.13] and certificate leaf[subject.OU] = "43AQ936H96"))