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
parent 75d0f2aeaf
commit 56341318f9
30 changed files with 153 additions and 203 deletions

View File

@ -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

View File

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

View File

@ -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

View File

@ -18,3 +18,25 @@ UNIFIED_SOURCES += [
FAIL_ON_WARNINGS = True FAIL_ON_WARNINGS = True
FINAL_LIBRARY = 'xul' 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',
]

View File

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

View File

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

View File

@ -5,19 +5,7 @@
include $(topsrcdir)/config/rules.mk 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) ifeq ($(MOZ_WIDGET_TOOLKIT), qt)
CFLAGS += $(MOZ_QT_CFLAGS) CFLAGS += $(MOZ_QT_CFLAGS)
CXXFLAGS += $(MOZ_QT_CFLAGS) CXXFLAGS += $(MOZ_QT_CFLAGS)
endif endif
libs:: $(_PROP_TABLES)
$(INSTALL) $^ $(DIST)/bin/res/entityTables

View File

@ -4,3 +4,11 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # 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',
]

View File

@ -2,10 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
RESOURCES_HTML = \
$(srcdir)/folder.png \
$(NULL)
include $(topsrcdir)/config/rules.mk include $(topsrcdir)/config/rules.mk
CXXFLAGS += \ CXXFLAGS += \
@ -19,6 +15,3 @@ endif
ifdef MOZ_ENABLE_QT ifdef MOZ_ENABLE_QT
CXXFLAGS += $(MOZ_QT_CFLAGS) CXXFLAGS += $(MOZ_QT_CFLAGS)
endif endif
libs::
$(INSTALL) $(RESOURCES_HTML) $(DIST)/bin/res/html

View File

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

View File

@ -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)

View File

@ -51,4 +51,22 @@ if CONFIG['ENABLE_TESTS']:
'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',
]

View File

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

View File

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

View File

@ -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

View File

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

View File

@ -2,25 +2,5 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # 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)/config/rules.mk
include $(topsrcdir)/testing/testsuite-targets.mk include $(topsrcdir)/testing/testsuite-targets.mk
libs:: $(packaged_fonts)
$(INSTALL) $^ $(DIST)/bin/res/fonts/

View File

@ -4,3 +4,17 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # 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',
]

View File

@ -17,12 +17,6 @@ include $(topsrcdir)/config/rules.mk
check:: check::
$(RUN_TEST_PROGRAM) $(DIST)/bin/TestCookie$(BIN_SUFFIX) $(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 # One of the xpcshell unit tests needs this file, so make sure it winds
# up in the test directory. # up in the test directory.
libs:: libs::

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -5,29 +5,4 @@
include $(topsrcdir)/config/rules.mk 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) CXXFLAGS += $(TK_CFLAGS)

View File

@ -81,3 +81,50 @@ LOCAL_INCLUDES += [
'/layout/xul', '/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',
])

View File

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

View File

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

View File

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

View File

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