Skip to content

Commit

Permalink
Bug 874266 - Move all DEFINES that can be moved to moz.build. r=mshal
Browse files Browse the repository at this point in the history
  • Loading branch information
glandium committed Nov 27, 2013
1 parent b69bae9 commit 8fd06cf
Show file tree
Hide file tree
Showing 326 changed files with 1,106 additions and 1,566 deletions.
2 changes: 0 additions & 2 deletions accessible/public/ia2/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ DEFFILE = $(win_srcdir)/IA2Marshal.def

IA2DIR = $(topsrcdir)/other-licenses/ia2

DEFINES += -DREGISTER_PROXY_DLL

GARBAGE += $(MIDL_GENERATED_FILES)

# Please keep this list in sync with the moz.build file until the rest of this
Expand Down
2 changes: 2 additions & 0 deletions accessible/public/ia2/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
LIBRARY_NAME = 'IA2Marshal'

FORCE_SHARED_LIB = True

DEFINES['REGISTER_PROXY_DLL'] = True
2 changes: 0 additions & 2 deletions accessible/public/msaa/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

DEFFILE = $(win_srcdir)/AccessibleMarshal.def

DEFINES += -DREGISTER_PROXY_DLL

GARBAGE += $(MIDL_GENERATED_FILES) done_gen dlldata.c

MIDL_GENERATED_FILES = \
Expand Down
2 changes: 2 additions & 0 deletions accessible/public/msaa/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ GENERATED_SOURCES += [
]

FORCE_SHARED_LIB = True

DEFINES['REGISTER_PROXY_DLL'] = True
11 changes: 0 additions & 11 deletions b2g/app/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ include $(topsrcdir)/config/makefiles/rcs.mk

PREF_JS_EXPORTS = $(srcdir)/b2g.js

ifdef ENABLE_MARIONETTE
DEFINES += -DENABLE_MARIONETTE=1
endif

ifndef LIBXUL_SDK

ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
Expand Down Expand Up @@ -39,7 +35,6 @@ LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/base
LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/build
LOCAL_INCLUDES += -I$(DEPTH)/build

DEFINES += -DXPCOM_GLUE
STL_FLAGS=

LIBS += $(JEMALLOC_LIBS)
Expand Down Expand Up @@ -83,12 +78,6 @@ include $(topsrcdir)/config/rules.mk

APP_ICON = b2g

DEFINES += \
-DAPP_NAME=$(MOZ_APP_NAME) \
-DAPP_VERSION=$(MOZ_APP_VERSION) \
-DMOZ_UPDATER=$(MOZ_UPDATER) \
$(NULL)

source_repo ?= $(call getSourceRepo,$(srcdir)/..)
ifneq (,$(filter http%,$(source_repo)))
DEFINES += -DMOZ_SOURCE_REPO="$(source_repo)"
Expand Down
8 changes: 8 additions & 0 deletions b2g/app/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,11 @@ if not CONFIG['LIBXUL_SDK']:
SOURCES += [
'nsBrowserApp.cpp',
]

if CONFIG['ENABLE_MARIONETTE']:
DEFINES['ENABLE_MARIONETTE'] = 1

DEFINES['XPCOM_GLUE'] = True

for var in ('MOZ_APP_NAME', 'MOZ_APP_VERSION', 'MOZ_UPDATER'):
DEFINES[var] = CONFIG[var]
8 changes: 0 additions & 8 deletions b2g/chrome/Makefile.in

This file was deleted.

3 changes: 3 additions & 0 deletions b2g/chrome/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

DEFINES['AB_CD'] = CONFIG['MOZ_UI_LOCALE']
DEFINES['PACKAGE'] = 'browser'
DEFINES['MOZ_APP_VERSION'] = CONFIG['MOZ_APP_VERSION']
12 changes: 0 additions & 12 deletions b2g/gaia/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,6 @@

GAIA_PATH := gaia/profile

ifeq ($(OS_ARCH),WINNT)
DEFINES += \
-DB2G_NAME=L\"$(MOZ_APP_NAME)-bin$(BIN_SUFFIX)\" \
-DGAIA_PATH=L\"$(subst /,\\\\,$(GAIA_PATH))\" \
$(NULL)
else # Non-windows machines use the same wrapper program
DEFINES += \
-DB2G_NAME=\"$(MOZ_APP_NAME)-bin$(BIN_SUFFIX)\" \
-DGAIA_PATH=\"$(GAIA_PATH)\" \
$(NULL)
endif

ifdef .PYMAKE
# For use of GNU make in pymake builds.
GAIA_MAKE=$(GMAKE)
Expand Down
4 changes: 4 additions & 0 deletions b2g/gaia/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ if CONFIG['OS_ARCH'] == 'WINNT':
SOURCES += [
'run-b2g.cpp',
]
DEFINES['B2G_NAME'] = 'L"%s-bin%s"' % (PROGRAM, CONFIG['BIN_SUFFIX'])
DEFINES['GAIA_PATH'] = 'L"gaia\\\\profile"'
else:
SOURCES += [
'run-b2g.c',
]
DEFINES['B2G_NAME'] = '"%s-bin%s"' % (PROGRAM, CONFIG['BIN_SUFFIX'])
DEFINES['GAIA_PATH'] = '"gaia/profile"'
11 changes: 0 additions & 11 deletions browser/app/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@

dist_dest = $(DIST)/$(MOZ_MACBUNDLE_NAME)

ifdef ENABLE_MARIONETTE
DEFINES += -DENABLE_MARIONETTE=1
endif

PREF_JS_EXPORTS = $(srcdir)/profile/firefox.js \
$(NULL)

Expand All @@ -17,21 +13,15 @@ AB_CD = en-US

DEFINES += \
-DAB_CD=$(AB_CD) \
-DAPP_VERSION="$(MOZ_APP_VERSION)" \
-DFIREFOX_ICO=\"$(DIST)/branding/firefox.ico\" \
-DDOCUMENT_ICO=\"$(DIST)/branding/document.ico\" \
-DNEWWINDOW_ICO=\"$(DIST)/branding/newwindow.ico\" \
-DNEWTAB_ICO=\"$(DIST)/branding/newtab.ico\" \
-DPBMODE_ICO=\"$(DIST)/branding/pbmode.ico\" \
$(NULL)

ifdef MOZILLA_OFFICIAL
DEFINES += -DMOZILLA_OFFICIAL
endif

ifdef LIBXUL_SDK #{
PREF_JS_EXPORTS += $(srcdir)/profile/channel-prefs.js
DEFINES += -DLIBXUL_SDK
endif #} LIBXUL_SDK

# Build a binary bootstrapping with XRE_main
Expand All @@ -43,7 +33,6 @@ LOCAL_INCLUDES += \
-I$(DEPTH)/build \
$(NULL)

DEFINES += -DXPCOM_GLUE
STL_FLAGS=

LIBS += \
Expand Down
11 changes: 11 additions & 0 deletions browser/app/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,14 @@ PROGRAM = CONFIG['MOZ_APP_NAME']
SOURCES += [
'nsBrowserApp.cpp',
]

if CONFIG['ENABLE_MARIONETTE']:
DEFINES['ENABLE_MARIONETTE'] = 1

DEFINES['APP_VERSION'] = CONFIG['MOZ_APP_VERSION']

for var in ('MOZILLA_OFFICIAL', 'LIBXUL_SDK'):
if CONFIG[var]:
DEFINES[var] = True

DEFINES['XPCOM_GLUE'] = True
31 changes: 0 additions & 31 deletions browser/base/Makefile.in

This file was deleted.

13 changes: 13 additions & 0 deletions browser/base/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,16 @@ BROWSER_CHROME_MANIFESTS += [
'content/test/newtab/browser.ini',
'content/test/social/browser.ini',
]

DEFINES['MOZ_APP_VERSION'] = CONFIG['MOZ_APP_VERSION']
DEFINES['APP_LICENSE_BLOCK'] = '%s/content/overrides/app-license.html' % SRCDIR

if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk2', 'gtk3', 'cocoa'):
DEFINES['HAVE_SHELL_SERVICE'] = 1
DEFINES['CONTEXT_COPY_IMAGE_CONTENTS'] = 1

if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'cocoa'):
DEFINES['CAN_DRAW_IN_TITLEBAR'] = 1

if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk2', 'gtk3'):
DEFINES['MENUBAR_CAN_AUTOHIDE'] = 1
2 changes: 1 addition & 1 deletion browser/branding/aurora/locales/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

DEFINES += -DAB_CD=$(AB_CD) -DMOZ_DISTRIBUTION_ID_UNQUOTED=$(MOZ_DISTRIBUTION_ID)
DEFINES += -DAB_CD=$(AB_CD)
1 change: 1 addition & 0 deletions browser/branding/aurora/locales/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

DEFINES['MOZ_DISTRIBUTION_ID_UNQUOTED'] = CONFIG['MOZ_DISTRIBUTION_ID']
2 changes: 1 addition & 1 deletion browser/branding/nightly/locales/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

DEFINES += -DAB_CD=$(AB_CD) -DMOZ_DISTRIBUTION_ID_UNQUOTED=$(MOZ_DISTRIBUTION_ID)
DEFINES += -DAB_CD=$(AB_CD)
1 change: 1 addition & 0 deletions browser/branding/nightly/locales/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

DEFINES['MOZ_DISTRIBUTION_ID_UNQUOTED'] = CONFIG['MOZ_DISTRIBUTION_ID']
2 changes: 1 addition & 1 deletion browser/branding/unofficial/locales/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

DEFINES += -DAB_CD=$(AB_CD) -DMOZ_DISTRIBUTION_ID_UNQUOTED=$(MOZ_DISTRIBUTION_ID)
DEFINES += -DAB_CD=$(AB_CD)
1 change: 1 addition & 0 deletions browser/branding/unofficial/locales/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

DEFINES['MOZ_DISTRIBUTION_ID_UNQUOTED'] = CONFIG['MOZ_DISTRIBUTION_ID']
6 changes: 0 additions & 6 deletions browser/components/feeds/src/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,4 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

DEFINES += \
-DMOZ_APP_NAME=$(MOZ_APP_NAME) \
-DMOZ_MACBUNDLE_NAME=$(MOZ_MACBUNDLE_NAME) \
$(NULL)


LOCAL_INCLUDES = -I$(srcdir)/../../build
3 changes: 3 additions & 0 deletions browser/components/feeds/src/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ EXTRA_PP_COMPONENTS += [
]

FINAL_LIBRARY = 'browsercomps'

for var in ('MOZ_APP_NAME', 'MOZ_MACBUNDLE_NAME'):
DEFINES[var] = CONFIG[var]
12 changes: 0 additions & 12 deletions browser/components/migration/src/Makefile.in

This file was deleted.

3 changes: 3 additions & 0 deletions browser/components/migration/src/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ if CONFIG['OS_ARCH'] == 'WINNT':
EXTRA_COMPONENTS += [
'IEProfileMigrator.js',
]
DEFINES['HAS_IE_MIGRATOR'] = True

EXTRA_PP_COMPONENTS += [
'BrowserProfileMigrators.manifest',
Expand All @@ -28,11 +29,13 @@ if CONFIG['OS_ARCH'] == 'WINNT':
EXTRA_PP_COMPONENTS += [
'SafariProfileMigrator.js',
]
DEFINES['HAS_SAFARI_MIGRATOR'] = True

if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
EXTRA_PP_COMPONENTS += [
'SafariProfileMigrator.js',
]
DEFINES['HAS_SAFARI_MIGRATOR'] = True

EXTRA_PP_JS_MODULES += [
'MigrationUtils.jsm',
Expand Down
15 changes: 0 additions & 15 deletions browser/components/preferences/Makefile.in

This file was deleted.

14 changes: 0 additions & 14 deletions browser/components/preferences/in-content/Makefile.in

This file was deleted.

5 changes: 5 additions & 0 deletions browser/components/preferences/in-content/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

for var in ('MOZ_APP_NAME', 'MOZ_MACBUNDLE_NAME'):
DEFINES[var] = CONFIG[var]

if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk2', 'cocoa'):
DEFINES['HAVE_SHELL_SERVICE'] = 1
6 changes: 6 additions & 0 deletions browser/components/preferences/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,9 @@ BROWSER_CHROME_MANIFESTS += [
'in-content/tests/browser.ini',
'tests/browser.ini',
]

for var in ('MOZ_APP_NAME', 'MOZ_MACBUNDLE_NAME'):
DEFINES[var] = CONFIG[var]

if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk2', 'gtk3', 'cocoa'):
DEFINES['HAVE_SHELL_SERVICE'] = 1
3 changes: 0 additions & 3 deletions browser/components/shell/src/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@

include $(topsrcdir)/config/rules.mk

DEFINES += -DMOZ_APP_NAME=\"$(MOZ_APP_NAME)\" \
-DMOZ_APP_VERSION=\"$(MOZ_APP_VERSION)\"

CXXFLAGS += $(TK_CFLAGS)

clobber::
Expand Down
3 changes: 3 additions & 0 deletions browser/components/shell/src/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ EXTRA_COMPONENTS += [
'nsSetDefaultBrowser.js',
'nsSetDefaultBrowser.manifest',
]

for var in ('MOZ_APP_NAME', 'MOZ_APP_VERSION'):
DEFINES[var] = '"%s"' % CONFIG[var]
6 changes: 1 addition & 5 deletions browser/metro/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@ include $(topsrcdir)/config/rules.mk
#########################################
# application.ini

ifdef MOZILLA_OFFICIAL
DEFINES += -DMOZILLA_OFFICIAL
endif

GRE_BUILDID := $(shell cat $(DEPTH)/config/buildid)
DEFINES += -DGRE_MILESTONE=$(GRE_MILESTONE) -DGRE_BUILDID=$(GRE_BUILDID)
DEFINES += -DGRE_BUILDID=$(GRE_BUILDID)

# 'application.ini' breaks firefox build config. So we use something different.
metroapp.ini: metroapp.ini.in $(DEPTH)/config/buildid $(topsrcdir)/config/milestone.txt
Expand Down
Loading

0 comments on commit 8fd06cf

Please sign in to comment.