Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
Bug 786520 - Clean up branding Makefile.in's for browser; r=ted
Browse files Browse the repository at this point in the history
Previously all Makefile.in were identical. Common bits are now
refactored into a shared .mk file. They also use the generic
copy/install rule instead of a one-off make rule.
  • Loading branch information
indygreg committed Sep 4, 2012
1 parent c5e4487 commit b1a82fd
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 232 deletions.
66 changes: 5 additions & 61 deletions browser/branding/aurora/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,66 +2,10 @@
# 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/.

DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
DEPTH := @DEPTH@
topsrcdir := @top_srcdir@
srcdir := @srcdir@
VPATH := @srcdir@

include $(DEPTH)/config/autoconf.mk

DIRS = \
content \
locales \
$(NULL)

PREF_JS_EXPORTS = $(srcdir)/pref/firefox-branding.js

include $(topsrcdir)/config/rules.mk

WINDOWS_BRANDING_FILES = \
firefox.ico \
document.ico \
branding.nsi \
wizHeader.bmp \
wizHeaderRTL.bmp \
wizWatermark.bmp \
newwindow.ico \
newtab.ico \
pbmode.ico \
$(NULL)

OSX_BRANDING_FILES = \
background.png \
firefox.icns \
disk.icns \
document.icns \
dsstore \
$(NULL)

LINUX_BRANDING_FILES = \
default16.png \
default32.png \
default48.png \
mozicon128.png \
$(NULL)

OS2_BRANDING_FILES = \
firefox-os2.ico \
document-os2.ico \
$(NULL)

export::
$(NSINSTALL) -D $(DIST)/branding
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
cp $(addprefix $(srcdir)/, $(WINDOWS_BRANDING_FILES)) $(DIST)/branding/
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
cp $(addprefix $(srcdir)/, $(OSX_BRANDING_FILES)) $(DIST)/branding/
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
cp $(addprefix $(srcdir)/, $(LINUX_BRANDING_FILES)) $(DIST)/branding/
$(NSINSTALL) -D $(DIST)/install
endif
ifeq ($(OS_ARCH),OS2)
cp $(addprefix $(srcdir)/, $(OS2_BRANDING_FILES)) $(DIST)/branding/
endif
include $(srcdir)/../branding.mk
83 changes: 83 additions & 0 deletions browser/branding/branding.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# 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/.

# This .mk file is included by all the branding Makefiles. It defines
# variables that are common to all.

ifndef top_srcdir
$(error Must define top_srcdir before including this file)
endif

ifndef srcdir
$(error Must define srcdir before including this file)
endif

DIRS := content locales
PREF_JS_EXPORTS := $(srcdir)/pref/firefox-branding.js

# These are the lists of branding files per platform. These are shared
# across all branding setups.
#
# If you add files to one branding config, you should define the
# corresponding variable in the respective Makefile and then include this
# file.
#
# If you remove a file from one branding config, that's not currently
# supported. You should add support for that in this file somehow.
# Alternatively, you can just reimplement the logic in this file.

windows_files += \
firefox.ico \
document.ico \
branding.nsi \
wizHeader.bmp \
wizHeaderRTL.bmp \
wizWatermark.bmp \
newwindow.ico \
newtab.ico \
pbmode.ico \
$(NULL)

osx_files += \
background.png \
firefox.icns \
disk.icns \
document.icns \
dsstore \
$(NULL)

linux_files += \
default16.png \
default32.png \
default48.png \
mozicon128.png \
$(NULL)

os2_files += \
firefox-os2.ico \
document-os2.ico \
$(NULL)

BRANDING_DEST := $(DIST)/branding

ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
BRANDING_FILES := $(windows_files)
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
BRANDING_FILES := $(osx_files)
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
BRANDING_FILES := $(linux_files)
endif
ifeq ($(OS_ARCH),OS2)
BRANDING_FILES := $(os2_files)
endif

BRANDING_FILES := $(addprefix $(srcdir)/,$(BRANDING_FILES))

ifneq ($(BRANDING_FILES),)
INSTALL_TARGETS += BRANDING
endif

include $(topsrcdir)/config/rules.mk
58 changes: 1 addition & 57 deletions browser/branding/nightly/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,60 +8,4 @@ srcdir = @srcdir@
VPATH = @srcdir@

include $(DEPTH)/config/autoconf.mk

DIRS = \
content \
locales \
$(NULL)

PREF_JS_EXPORTS = $(srcdir)/pref/firefox-branding.js

include $(topsrcdir)/config/rules.mk

WINDOWS_BRANDING_FILES = \
firefox.ico \
document.ico \
branding.nsi \
wizHeader.bmp \
wizHeaderRTL.bmp \
wizWatermark.bmp \
newwindow.ico \
newtab.ico \
pbmode.ico \
$(NULL)

OSX_BRANDING_FILES = \
background.png \
firefox.icns \
disk.icns \
document.icns \
dsstore \
$(NULL)

LINUX_BRANDING_FILES = \
default16.png \
default32.png \
default48.png \
mozicon128.png \
$(NULL)

OS2_BRANDING_FILES = \
firefox-os2.ico \
document-os2.ico \
$(NULL)

export::
$(NSINSTALL) -D $(DIST)/branding
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
cp $(addprefix $(srcdir)/, $(WINDOWS_BRANDING_FILES)) $(DIST)/branding/
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
cp $(addprefix $(srcdir)/, $(OSX_BRANDING_FILES)) $(DIST)/branding/
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
cp $(addprefix $(srcdir)/, $(LINUX_BRANDING_FILES)) $(DIST)/branding/
$(NSINSTALL) -D $(DIST)/install
endif
ifeq ($(OS_ARCH),OS2)
cp $(addprefix $(srcdir)/, $(OS2_BRANDING_FILES)) $(DIST)/branding/
endif
include $(srcdir)/../branding.mk
58 changes: 1 addition & 57 deletions browser/branding/official/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,60 +8,4 @@ srcdir = @srcdir@
VPATH = @srcdir@

include $(DEPTH)/config/autoconf.mk

DIRS = \
content \
locales \
$(NULL)

PREF_JS_EXPORTS = $(srcdir)/pref/firefox-branding.js

include $(topsrcdir)/config/rules.mk

WINDOWS_BRANDING_FILES = \
firefox.ico \
document.ico \
branding.nsi \
wizHeader.bmp \
wizHeaderRTL.bmp \
wizWatermark.bmp \
newwindow.ico \
newtab.ico \
pbmode.ico \
$(NULL)

OSX_BRANDING_FILES = \
background.png \
firefox.icns \
disk.icns \
document.icns \
dsstore \
$(NULL)

LINUX_BRANDING_FILES = \
default16.png \
default32.png \
default48.png \
mozicon128.png \
$(NULL)

OS2_BRANDING_FILES = \
firefox-os2.ico \
document-os2.ico \
$(NULL)

export::
$(NSINSTALL) -D $(DIST)/branding
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
cp $(addprefix $(srcdir)/, $(WINDOWS_BRANDING_FILES)) $(DIST)/branding/
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
cp $(addprefix $(srcdir)/, $(OSX_BRANDING_FILES)) $(DIST)/branding/
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
cp $(addprefix $(srcdir)/, $(LINUX_BRANDING_FILES)) $(DIST)/branding/
$(NSINSTALL) -D $(DIST)/install
endif
ifeq ($(OS_ARCH),OS2)
cp $(addprefix $(srcdir)/, $(OS2_BRANDING_FILES)) $(DIST)/branding/
endif
include $(srcdir)/../branding.mk
58 changes: 1 addition & 57 deletions browser/branding/unofficial/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,60 +8,4 @@ srcdir = @srcdir@
VPATH = @srcdir@

include $(DEPTH)/config/autoconf.mk

DIRS = \
content \
locales \
$(NULL)

PREF_JS_EXPORTS = $(srcdir)/pref/firefox-branding.js

include $(topsrcdir)/config/rules.mk

WINDOWS_BRANDING_FILES = \
firefox.ico \
document.ico \
branding.nsi \
wizHeader.bmp \
wizHeaderRTL.bmp \
wizWatermark.bmp \
newwindow.ico \
newtab.ico \
pbmode.ico \
$(NULL)

OSX_BRANDING_FILES = \
background.png \
firefox.icns \
disk.icns \
document.icns \
dsstore \
$(NULL)

LINUX_BRANDING_FILES = \
default16.png \
default32.png \
default48.png \
mozicon128.png \
$(NULL)

OS2_BRANDING_FILES = \
firefox-os2.ico \
document-os2.ico \
$(NULL)

export::
$(NSINSTALL) -D $(DIST)/branding
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
cp $(addprefix $(srcdir)/, $(WINDOWS_BRANDING_FILES)) $(DIST)/branding/
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
cp $(addprefix $(srcdir)/, $(OSX_BRANDING_FILES)) $(DIST)/branding/
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
cp $(addprefix $(srcdir)/, $(LINUX_BRANDING_FILES)) $(DIST)/branding/
$(NSINSTALL) -D $(DIST)/install
endif
ifeq ($(OS_ARCH),OS2)
cp $(addprefix $(srcdir)/, $(OS2_BRANDING_FILES)) $(DIST)/branding/
endif
include $(srcdir)/../branding.mk

0 comments on commit b1a82fd

Please sign in to comment.