mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1184446 - Remove manual package manifest preprocessing. r=mshal
packager.py itself has been able to do preprocessing since the beginning. For some reason, Makefile.in-driven preprocessing was kept back then, and never was removed, and even worse, concatenation was added on top of it. There is however a downside to the current way of doing things: error reporting is given relative to the given manifest, which in the current case is the preprocessed/concatenated file, so line numbers don't match what is in the file in the source tree. However, when packager.py does preprocessing itself, line numbers are reported properly. Thus, switch all package manifests to packager.py-driven preprocessing.
This commit is contained in:
parent
1e9f53e5c1
commit
2ceb8811dc
@ -8,7 +8,13 @@ include $(topsrcdir)/config/rules.mk
|
||||
|
||||
MOZ_PKG_REMOVALS = $(srcdir)/removed-files.in
|
||||
|
||||
MOZ_PKG_MANIFEST_P = $(srcdir)/package-manifest.in
|
||||
MOZ_PKG_MANIFEST = $(srcdir)/package-manifest.in
|
||||
|
||||
ifdef MOZ_CHROME_MULTILOCALE
|
||||
MOZ_PKG_MANIFEST_DEPS = locale-manifest.in
|
||||
|
||||
DEFINES += -DPKG_LOCALE_MANIFEST=$(CURDIR)/locale-manifest.in
|
||||
endif
|
||||
|
||||
DEFINES += \
|
||||
-DMOZ_APP_NAME=$(MOZ_APP_NAME) \
|
||||
@ -42,10 +48,6 @@ ifdef ENABLE_MARIONETTE
|
||||
DEFINES += -DENABLE_MARIONETTE=1
|
||||
endif
|
||||
|
||||
ifdef MOZ_PKG_MANIFEST_P
|
||||
MOZ_PKG_MANIFEST = package-manifest
|
||||
endif
|
||||
|
||||
MOZ_PACKAGER_MINIFY=1
|
||||
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
@ -107,19 +109,16 @@ DEFINES += -DMOZ_GTK3=1
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef MOZ_PKG_MANIFEST_P
|
||||
$(MOZ_PKG_MANIFEST): $(MOZ_PKG_MANIFEST_P) FORCE
|
||||
$(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) $< -o $@)
|
||||
ifdef MOZ_CHROME_MULTILOCALE
|
||||
printf '\n[multilocale]\n' >> $@
|
||||
locale-manifest.in: $(GLOBAL_DEPS) FORCE
|
||||
printf '\n[multilocale]\n' > $@
|
||||
for LOCALE in $(MOZ_CHROME_MULTILOCALE) ;\
|
||||
do \
|
||||
printf '$(BINPATH)/chrome/'"$$LOCALE"'$(JAREXT)\n' >> $@; \
|
||||
printf '$(BINPATH)/chrome/'"$$LOCALE"'.manifest\n' >> $@; \
|
||||
done
|
||||
endif
|
||||
|
||||
GARBAGE += $(MOZ_PKG_MANIFEST)
|
||||
GARBAGE += locale-manifest.in
|
||||
endif
|
||||
|
||||
ifdef FXOS_SIMULATOR
|
||||
|
@ -980,3 +980,7 @@ bin/libfreebl_32int64_3.so
|
||||
@RESPATH@/gmp-clearkey/0.1/@DLL_PREFIX@clearkey@DLL_SUFFIX@
|
||||
@RESPATH@/gmp-clearkey/0.1/clearkey.info
|
||||
#endif
|
||||
|
||||
#ifdef PKG_LOCALE_MANIFEST
|
||||
#include @PKG_LOCALE_MANIFEST@
|
||||
#endif
|
||||
|
@ -9,15 +9,13 @@ include $(topsrcdir)/config/rules.mk
|
||||
|
||||
MOZ_PKG_REMOVALS = $(srcdir)/removed-files.in
|
||||
|
||||
MOZ_PKG_MANIFEST_P = $(srcdir)/package-manifest.in
|
||||
|
||||
ifdef MOZ_MULET
|
||||
MOZ_PKG_MANIFEST_P += $(topsrcdir)/b2g/installer/package-manifest.in
|
||||
endif
|
||||
MOZ_PKG_MANIFEST = $(srcdir)/package-manifest.in
|
||||
|
||||
# Some files have been already bundled with xulrunner
|
||||
ifndef MOZ_MULET
|
||||
MOZ_PKG_FATAL_WARNINGS = 1
|
||||
else
|
||||
DEFINES += -DMOZ_MULET
|
||||
endif
|
||||
|
||||
DEFINES += -DMOZ_APP_NAME=$(MOZ_APP_NAME) -DPREF_DIR=$(PREF_DIR)
|
||||
@ -98,15 +96,6 @@ ifdef MAKENSISU
|
||||
DEFINES += -DHAVE_MAKENSISU=1
|
||||
endif
|
||||
|
||||
ifdef MOZ_PKG_MANIFEST_P
|
||||
MOZ_PKG_MANIFEST = package-manifest
|
||||
|
||||
$(MOZ_PKG_MANIFEST): $(MOZ_PKG_MANIFEST_P) $(GLOBAL_DEPS)
|
||||
$(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) $(MOZ_PKG_MANIFEST_P) -o $@)
|
||||
|
||||
GARBAGE += $(MOZ_PKG_MANIFEST)
|
||||
endif
|
||||
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
MOZ_PKG_MAC_DSSTORE=branding/dsstore
|
||||
MOZ_PKG_MAC_BACKGROUND=branding/background.png
|
||||
@ -180,13 +169,11 @@ else
|
||||
FINDPATH=bin
|
||||
endif
|
||||
|
||||
package-compare:: $(MOZ_PKG_MANIFEST)
|
||||
ifdef MOZ_PKG_MANIFEST_P
|
||||
package-compare::
|
||||
cd $(DIST); find $(PKGCOMP_FIND_OPTS) $(FINDPATH) -type f | sort > bin-list.txt
|
||||
grep '^$(BINPATH)' $(MOZ_PKG_MANIFEST) | sed -e 's/^\///' | sort > $(DIST)/pack-list.txt
|
||||
$(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) $(MOZ_PKG_MANIFEST)) | grep '^$(BINPATH)' | sed -e 's/^\///' | sort > $(DIST)/pack-list.txt
|
||||
-diff -u $(DIST)/pack-list.txt $(DIST)/bin-list.txt
|
||||
rm -f $(DIST)/pack-list.txt $(DIST)/bin-list.txt
|
||||
endif
|
||||
|
||||
installer::
|
||||
ifdef INSTALLER_DIR
|
||||
|
@ -917,3 +917,7 @@ bin/libfreebl_32int64_3.so
|
||||
@RESPATH@/components/GfxSanityTest.manifest
|
||||
@RESPATH@/components/SanityTest.js
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_MULET
|
||||
#include ../../b2g/installer/package-manifest.in
|
||||
#endif
|
||||
|
@ -16,7 +16,13 @@ include $(topsrcdir)/config/rules.mk
|
||||
|
||||
MOZ_PKG_REMOVALS = $(srcdir)/removed-files.in
|
||||
|
||||
MOZ_PKG_MANIFEST_P = $(srcdir)/package-manifest.in
|
||||
MOZ_PKG_MANIFEST = $(srcdir)/package-manifest.in
|
||||
|
||||
ifdef MOZ_CHROME_MULTILOCALE
|
||||
MOZ_PKG_MANIFEST_DEPS = locale-manifest.in
|
||||
|
||||
DEFINES += -DPKG_LOCALE_MANIFEST=$(CURDIR)/locale-manifest.in
|
||||
endif
|
||||
|
||||
DEFINES += \
|
||||
-DMOZ_APP_NAME=$(MOZ_APP_NAME) \
|
||||
@ -31,10 +37,6 @@ ifdef MOZ_DEBUG
|
||||
DEFINES += -DMOZ_DEBUG=1
|
||||
endif
|
||||
|
||||
ifdef MOZ_PKG_MANIFEST_P
|
||||
MOZ_PKG_MANIFEST = package-manifest
|
||||
endif
|
||||
|
||||
MOZ_PACKAGER_MINIFY=1
|
||||
|
||||
include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
|
||||
@ -63,14 +65,12 @@ ifdef ENABLE_MARIONETTE
|
||||
DEFINES += -DENABLE_MARIONETTE=1
|
||||
endif
|
||||
|
||||
ifdef MOZ_PKG_MANIFEST_P
|
||||
|
||||
ifdef MOZ_CHROME_MULTILOCALE
|
||||
# When MOZ_CHROME_MULTILOCALE is defined, we write multilocale.json like:
|
||||
# {"locales": ["en-US", "de", "ar", ...]}
|
||||
|
||||
$(MOZ_PKG_MANIFEST): $(MOZ_PKG_MANIFEST_P) $(GLOBAL_DEPS) FORCE
|
||||
$(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) $< -o $@)
|
||||
ifdef MOZ_CHROME_MULTILOCALE
|
||||
printf '\n[multilocale]\n' >> $@
|
||||
locale-manifest.in: $(GLOBAL_DEPS) FORCE
|
||||
printf '\n[multilocale]\n' > $@
|
||||
printf '@BINPATH@/res/multilocale.json\n' >> $@
|
||||
for LOCALE in en-US $(MOZ_CHROME_MULTILOCALE) ;\
|
||||
do \
|
||||
@ -80,7 +80,6 @@ ifdef MOZ_CHROME_MULTILOCALE
|
||||
COMMA=,
|
||||
echo '{"locales": [$(foreach l,$(MOZ_CHROME_MULTILOCALE),"$(l)"$(COMMA)) "en-US"]}' \
|
||||
> $(FINAL_TARGET)/res/multilocale.json
|
||||
endif
|
||||
|
||||
GARBAGE += $(MOZ_PKG_MANIFEST)
|
||||
GARBAGE += locale-manifest.in
|
||||
endif
|
||||
|
@ -658,3 +658,7 @@ bin/libfreebl_32int64_3.so
|
||||
@BINPATH@/components/DataStore.manifest
|
||||
@BINPATH@/components/DataStoreImpl.js
|
||||
@BINPATH@/components/dom_datastore.xpt
|
||||
|
||||
#ifdef PKG_LOCALE_MANIFEST
|
||||
#include @PKG_LOCALE_MANIFEST@
|
||||
#endif
|
||||
|
@ -37,7 +37,7 @@ export USE_ELF_HACK ELF_HACK_FLAGS
|
||||
# Override the value of OMNIJAR_NAME from config.status with the value
|
||||
# set earlier in this file.
|
||||
|
||||
stage-package: $(MOZ_PKG_MANIFEST)
|
||||
stage-package: $(MOZ_PKG_MANIFEST) $(MOZ_PKG_MANIFEST_DEPS)
|
||||
OMNIJAR_NAME=$(OMNIJAR_NAME) \
|
||||
NO_PKG_FILES="$(NO_PKG_FILES)" \
|
||||
$(PYTHON) $(MOZILLA_DIR)/toolkit/mozapps/installer/packager.py $(DEFINES) \
|
||||
|
Loading…
Reference in New Issue
Block a user