Bug 772828 - Part b: use RESOURCE_FILES in moz.build instead of manual rules in Makefile.in; r=mshal

This commit is contained in:
Brian O'Keefe 2013-11-05 13:37:54 -05:00
Родитель 75d0f2aeaf
Коммит 56341318f9
30 изменённых файлов: 153 добавлений и 203 удалений

Просмотреть файл

@ -1,12 +0,0 @@
#
# 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/.
include $(topsrcdir)/config/rules.mk
EXPORT_RESOURCE_CONTENT = \
$(srcdir)/htmlmathml-f.ent \
$(NULL)
libs::
$(INSTALL) $(EXPORT_RESOURCE_CONTENT) $(DIST)/bin/res/dtd

Просмотреть файл

@ -27,3 +27,6 @@ LOCAL_INCLUDES += [
'/content/base/src',
]
RESOURCE_FILES.dtd += [
'htmlmathml-f.ent',
]

Просмотреть файл

@ -1,32 +0,0 @@
#
# 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/.
include $(topsrcdir)/config/rules.mk
_FILES = \
$(srcdir)/res/EditorOverride.css \
$(srcdir)/res/grabber.gif \
$(srcdir)/res/table-add-column-after-active.gif \
$(srcdir)/res/table-add-column-after-hover.gif \
$(srcdir)/res/table-add-column-after.gif \
$(srcdir)/res/table-add-column-before-active.gif \
$(srcdir)/res/table-add-column-before-hover.gif \
$(srcdir)/res/table-add-column-before.gif \
$(srcdir)/res/table-add-row-after-active.gif \
$(srcdir)/res/table-add-row-after-hover.gif \
$(srcdir)/res/table-add-row-after.gif \
$(srcdir)/res/table-add-row-before-active.gif \
$(srcdir)/res/table-add-row-before-hover.gif \
$(srcdir)/res/table-add-row-before.gif \
$(srcdir)/res/table-remove-column-active.gif \
$(srcdir)/res/table-remove-column-hover.gif \
$(srcdir)/res/table-remove-column.gif \
$(srcdir)/res/table-remove-row-active.gif \
$(srcdir)/res/table-remove-row-hover.gif \
$(srcdir)/res/table-remove-row.gif \
$(NULL)
libs::
$(INSTALL) $(_FILES) $(DIST)/bin/res

Просмотреть файл

@ -18,3 +18,25 @@ UNIFIED_SOURCES += [
FAIL_ON_WARNINGS = True
FINAL_LIBRARY = 'xul'
RESOURCE_FILES += [
'res/EditorOverride.css',
'res/grabber.gif',
'res/table-add-column-after-active.gif',
'res/table-add-column-after-hover.gif',
'res/table-add-column-after.gif',
'res/table-add-column-before-active.gif',
'res/table-add-column-before-hover.gif',
'res/table-add-column-before.gif',
'res/table-add-row-after-active.gif',
'res/table-add-row-after-hover.gif',
'res/table-add-row-after.gif',
'res/table-add-row-before-active.gif',
'res/table-add-row-before-hover.gif',
'res/table-add-row-before.gif',
'res/table-remove-column-active.gif',
'res/table-remove-column-hover.gif',
'res/table-remove-column.gif',
'res/table-remove-row-active.gif',
'res/table-remove-row-hover.gif',
'res/table-remove-row.gif',
]

Просмотреть файл

@ -7,16 +7,8 @@ ifeq ($(MOZ_WIDGET_TOOLKIT), qt)
OS_INCLUDES += $(MOZ_QT_CFLAGS)
endif
EXPORT_RESOURCE = \
$(srcdir)/langGroups.properties \
$(srcdir)/language.properties \
$(NULL)
include $(topsrcdir)/config/rules.mk
charsetalias.properties.h: props2arrays.py charsetalias.properties
$(PYTHON) $^ $@
libs::
$(INSTALL) $(EXPORT_RESOURCE) $(DIST)/bin/res

Просмотреть файл

@ -42,3 +42,8 @@ GENERATED_FILES = [
LOCAL_INCLUDES += [
'/intl/uconv/src',
]
RESOURCE_FILES += [
'langGroups.properties',
'language.properties',
]

Просмотреть файл

@ -5,19 +5,7 @@
include $(topsrcdir)/config/rules.mk
_PROP_TABLES = \
htmlEntityVersions.properties \
html40Latin1.properties \
html40Symbols.properties \
html40Special.properties \
transliterate.properties \
mathml20.properties \
$(NULL)
ifeq ($(MOZ_WIDGET_TOOLKIT), qt)
CFLAGS += $(MOZ_QT_CFLAGS)
CXXFLAGS += $(MOZ_QT_CFLAGS)
endif
libs:: $(_PROP_TABLES)
$(INSTALL) $^ $(DIST)/bin/res/entityTables

Просмотреть файл

@ -4,3 +4,11 @@
# 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/.
RESOURCE_FILES.entityTables = [
'htmlEntityVersions.properties',
'html40Latin1.properties',
'html40Symbols.properties',
'html40Special.properties',
'mathml20.properties',
'transliterate.properties',
]

Просмотреть файл

@ -2,10 +2,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/.
RESOURCES_HTML = \
$(srcdir)/folder.png \
$(NULL)
include $(topsrcdir)/config/rules.mk
CXXFLAGS += \
@ -19,6 +15,3 @@ endif
ifdef MOZ_ENABLE_QT
CXXFLAGS += $(MOZ_QT_CFLAGS)
endif
libs::
$(INSTALL) $(RESOURCES_HTML) $(DIST)/bin/res/html

Просмотреть файл

@ -127,3 +127,7 @@ LOCAL_INCLUDES += [
]
JAR_MANIFESTS += ['jar.mn']
RESOURCE_FILES.html = [
'folder.png',
]

Просмотреть файл

@ -1,35 +0,0 @@
#!gmake
#
# 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/.
include $(topsrcdir)/config/rules.mk
font_properties = \
mathfontMathJax_Main.properties \
mathfontUnicode.properties \
mathfontSTIXNonUnicode.properties \
mathfontSTIXSize1.properties \
mathfontSTIXSizeOneSym.properties \
mathfontAsanaMath.properties \
mathfontStandardSymbolsL.properties \
$(NULL)
ifeq ($(TARGET_MD_ARCH),win32)
font_properties += \
mathfontSymbol.properties
endif
libs:: $(font_properties)
$(INSTALL) $^ $(DIST)/bin/res/fonts
math_properties = mathfont.properties
$(DIST)/bin/res/fonts/$(math_properties) $(DESTDIR)$(mozappdir)/res/fonts/$(math_properties): $(math_properties) Makefile
test -d $(@D) || $(NSINSTALL) -D $(@D)
rm -f $@
$(call py_action,preprocessor,--marker=% $(DEFINES) $(ACDEFINES) $< -o $@)
libs:: $(DIST)/bin/res/fonts/$(math_properties)
install:: $(DESTDIR)$(mozappdir)/res/fonts/$(math_properties)

Просмотреть файл

@ -51,4 +51,22 @@ if CONFIG['ENABLE_TESTS']:
'tests',
]
JAR_MANIFESTS += ['jar.mn']
JAR_MANIFESTS += ['jar.mn']
RESOURCE_FILES.fonts += [
'mathfont.properties',
'mathfontAsanaMath.properties',
'mathfontMathJax_Main.properties',
'mathfontStandardSymbolsL.properties',
'mathfontSTIXNonUnicode.properties',
'mathfontSTIXSize1.properties',
'mathfontSTIXSizeOneSym.properties',
'mathfontUnicode.properties',
]
RESOURCE_FILES.fonts['mathfont.properties'].preprocess = True
if CONFIG['TARGET_MD_ARCH'] == 'win32':
RESOURCE_FILES.fonts += [
'mathfontSymbol.properties',
]

Просмотреть файл

@ -17,18 +17,6 @@ include $(topsrcdir)/config/rules.mk
nsStyleStructList.h : $(srcdir)/generate-stylestructlist.py
$(PYTHON) $< > $@
_FILES = \
contenteditable.css \
designmode.css \
ImageDocument.css \
TopLevelImageDocument.css \
TopLevelVideoDocument.css \
$(NULL)
GARBAGE += \
$(addprefix $(DIST)/bin/res/,$(_FILES)) \
nsStyleStructList.h \
$(NULL)
libs:: $(_FILES)
$(INSTALL) $^ $(DIST)/bin/res

Просмотреть файл

@ -156,3 +156,11 @@ LOCAL_INCLUDES += [
]
JAR_MANIFESTS += ['jar.mn']
RESOURCE_FILES += [
'contenteditable.css',
'designmode.css',
'ImageDocument.css',
'TopLevelImageDocument.css',
'TopLevelVideoDocument.css',
]

Просмотреть файл

@ -1,9 +0,0 @@
#
# 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/.
include $(topsrcdir)/config/rules.mk
libs::
$(INSTALL) $(srcdir)/svg.css $(DIST)/bin/res

Просмотреть файл

@ -58,3 +58,7 @@ LOCAL_INCLUDES += [
'../xul',
]
RESOURCE_FILES += [
'svg.css',
]

Просмотреть файл

@ -2,25 +2,5 @@
# 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/.
packaged_fonts = \
CharisSILCompact-R.ttf \
CharisSILCompact-B.ttf \
CharisSILCompact-I.ttf \
CharisSILCompact-BI.ttf \
ClearSans-Thin.ttf \
ClearSans-Light.ttf \
ClearSans-Regular.ttf \
ClearSans-Medium.ttf \
ClearSans-Bold.ttf \
ClearSans-Italic.ttf \
ClearSans-MediumItalic.ttf \
ClearSans-BoldItalic.ttf \
$(NULL)
GARBAGE += $(packaged_fonts)
include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/testing/testsuite-targets.mk
libs:: $(packaged_fonts)
$(INSTALL) $^ $(DIST)/bin/res/fonts/

Просмотреть файл

@ -4,3 +4,17 @@
# 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/.
RESOURCE_FILES.fonts += [
'CharisSILCompact-B.ttf',
'CharisSILCompact-BI.ttf',
'CharisSILCompact-I.ttf',
'CharisSILCompact-R.ttf',
'ClearSans-Bold.ttf',
'ClearSans-BoldItalic.ttf',
'ClearSans-Italic.ttf',
'ClearSans-Light.ttf',
'ClearSans-Medium.ttf',
'ClearSans-MediumItalic.ttf',
'ClearSans-Regular.ttf',
'ClearSans-Thin.ttf',
]

Просмотреть файл

@ -17,12 +17,6 @@ include $(topsrcdir)/config/rules.mk
check::
$(RUN_TEST_PROGRAM) $(DIST)/bin/TestCookie$(BIN_SUFFIX)
_RES_FILES = urlparse.dat \
urlparse_unx.dat \
$(NULL)
libs:: $(_RES_FILES)
$(INSTALL) $^ $(DIST)/bin/res
# One of the xpcshell unit tests needs this file, so make sure it winds
# up in the test directory.
libs::

Просмотреть файл

@ -56,3 +56,7 @@ CPP_UNIT_TESTS += [
'TestUDPSocket.cpp',
]
RESOURCE_FILES += [
'urlparse.dat',
'urlparse_unx.dat',
]

Просмотреть файл

@ -5,22 +5,8 @@
MOZILLA_INTERNAL_API = 1
SAMPLES_DIR = $(DIST)/bin/res/samples/rdf
RESOURCE_SAMPLES = \
DataSourceViewer.xul \
DataSourceViewer.css \
$(NULL)
EXTRA_DSO_LDOPTS = \
-L$(DIST)/bin \
$(XPCOM_LIBS) \
$(NSPR_LIBS) \
$(NULL)
include $(topsrcdir)/config/rules.mk
GARBAGE += $(addprefix $(SAMPLES_DIR)/, $(RESOURCE_SAMPLES))
libs::
$(INSTALL) $(addprefix $(srcdir)/,$(RESOURCE_SAMPLES)) $(SAMPLES_DIR)

Просмотреть файл

@ -13,3 +13,7 @@ LIBRARY_NAME = 'rdfdsds'
IS_COMPONENT = True
RESOURCE_FILES.samples.rdf += [
'DataSourceViewer.xul',
'DataSourceViewer.css',
]

Просмотреть файл

@ -60,6 +60,3 @@ include $(topsrcdir)/config/rules.mk
# install rules.txt along with spacetrace executable
libs:: rules.txt
$(INSTALL) $< $(DIST)/bin
libs:: spacetrace.css
$(INSTALL) $< $(DIST)/bin/res

Просмотреть файл

@ -39,3 +39,7 @@ SOURCES += [
]
SIMPLE_PROGRAMS += simple_cpp_sources
RESOURCE_FILES += [
'spacetrace.css'
]

Просмотреть файл

@ -5,29 +5,4 @@
include $(topsrcdir)/config/rules.mk
NIB_FILES = \
classes.nib \
info.nib \
keyedobjects.nib \
$(NULL)
NIB_DEST = $(DIST)/bin/res/MainMenu.nib
libs:: $(addprefix $(NIB_DEST)/,$(NIB_FILES))
$(NIB_DEST):
$(NSINSTALL) -D $@
$(NIB_DEST)/%: $(srcdir)/resources/MainMenu.nib/% $(NIB_DEST)
$(INSTALL) $< $(NIB_DEST)
# for objdir builds, symlink the cursors dir
ABS_topsrcdir := $(abspath $(topsrcdir))
ifneq ($(ABS_topsrcdir),$(MOZ_BUILD_ROOT))
export::
ln -fs $(srcdir)/cursors
endif
export::
$(INSTALL) $(srcdir)/cursors $(DIST)/bin/res
CXXFLAGS += $(TK_CFLAGS)

Просмотреть файл

@ -81,3 +81,50 @@ LOCAL_INCLUDES += [
'/layout/xul',
]
RESOURCE_FILES.cursors += [
'cursors/arrowN.png',
'cursors/arrowN@2x.png',
'cursors/arrowS.png',
'cursors/arrowS@2x.png',
'cursors/cell.png',
'cursors/cell@2x.png',
'cursors/colResize.png',
'cursors/colResize@2x.png',
'cursors/help.png',
'cursors/help@2x.png',
'cursors/move.png',
'cursors/move@2x.png',
'cursors/rowResize.png',
'cursors/rowResize@2x.png',
'cursors/sizeNE.png',
'cursors/sizeNE@2x.png',
'cursors/sizeNESW.png',
'cursors/sizeNESW@2x.png',
'cursors/sizeNS.png',
'cursors/sizeNS@2x.png',
'cursors/sizeNW.png',
'cursors/sizeNW@2x.png',
'cursors/sizeNWSE.png',
'cursors/sizeNWSE@2x.png',
'cursors/sizeSE.png',
'cursors/sizeSE@2x.png',
'cursors/sizeSW.png',
'cursors/sizeSW@2x.png',
'cursors/vtIBeam.png',
'cursors/vtIBeam@2x.png',
'cursors/zoomIn.png',
'cursors/zoomIn@2x.png',
'cursors/zoomOut.png',
'cursors/zoomOut@2x.png',
]
# These resources go in $(DIST)/bin/res/MainMenu.nib, but we can't use a magic
# RESOURCE_FILES.MainMenu.nib attribute, since that would put the files in
# $(DIST)/bin/res/MainMenu/nib. Instead, we call __setattr__ directly to create
# an attribute with the correct name.
RESOURCE_FILES.__setattr__('MainMenu.nib', [
'resources/MainMenu.nib/classes.nib',
'resources/MainMenu.nib/info.nib',
'resources/MainMenu.nib/keyedobjects.nib',
])

Просмотреть файл

@ -18,8 +18,3 @@ EXTRA_DSO_LDOPTS += \
$(TK_LIBS) \
$(NULL)
endif
include $(topsrcdir)/config/rules.mk
libs:: $(TARGETS)
$(INSTALL) $(srcdir)/xpconnect-sample.html $(DIST)/bin/res/samples

Просмотреть файл

@ -36,3 +36,6 @@ LIBRARY_NAME = 'xpcomsample'
# IS_COMPONENT indicates that this makefile builds a component shared library.
IS_COMPONENT = True
RESOURCE_FILES.samples += [
'xpconnect-sample.html',
]

Просмотреть файл

@ -9,9 +9,8 @@ MOZ_DEBUG_SYMBOLS = 1
include $(topsrcdir)/config/rules.mk
libs::
$(INSTALL) $(srcdir)/test.properties $(DIST)/bin/res
ifneq (,$(SIMPLE_PROGRAMS))
libs::
$(INSTALL) $(SIMPLE_PROGRAMS) $(DEPTH)/_tests/xpcshell/$(relativesrcdir)/unit
endif

Просмотреть файл

@ -122,3 +122,6 @@ LOCAL_INCLUDES += [
'../ds',
]
RESOURCE_FILES += [
'test.properties',
]