зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1102488 - Part 3: Output preprocessed files into generated/preprocessed. r=rnewman
(Pushing to a CLOSED TREE because this is Android only.) The preprocessed files, all of which are constant exports, are exposed in the new constants JAR. --HG-- extra : source : 05cf424592e66f30c9a6c92f07bb5d9cdf1595a6 extra : amend_source : fda465d3aa6ed282bfa2b9542358ffd1cf2d1177
This commit is contained in:
Родитель
fc649a2992
Коммит
cba0baa815
|
@ -192,11 +192,6 @@ GeneratedJNIWrappers.cpp: $(ANNOTATION_PROCESSOR_JAR_FILES)
|
|||
GeneratedJNIWrappers.cpp: $(ALL_JARS)
|
||||
$(JAVA) -classpath gecko-mozglue.jar:$(JAVA_BOOTCLASSPATH):$(JAVA_CLASSPATH):$(ANNOTATION_PROCESSOR_JAR_FILES) org.mozilla.gecko.annotationProcessors.AnnotationProcessor $(ALL_JARS)
|
||||
|
||||
# These _PP_JAVAFILES are specified in moz.build and defined in
|
||||
# backend.mk, which is included by config.mk. Therefore this needs to
|
||||
# be defined after config.mk is included.
|
||||
PP_JAVAFILES := $(filter-out generated/org/mozilla/gecko/R.java,$(gecko-mozglue_PP_JAVAFILES) $(gecko-browser_PP_JAVAFILES) $(constants_PP_JAVAFILES))
|
||||
|
||||
manifest := \
|
||||
AndroidManifest.xml.in \
|
||||
WebappManifestFragment.xml.frag.in \
|
||||
|
@ -208,9 +203,15 @@ PP_TARGETS += manifest
|
|||
# generates these files into generated/org/mozilla/gecko for
|
||||
# consumption by the build system and IDEs.
|
||||
|
||||
preprocessed := $(addsuffix .in,$(subst generated/org/mozilla/gecko/,,$(filter generated/org/mozilla/gecko/%,$(PP_JAVAFILES))))
|
||||
# The list in moz.build looks like
|
||||
# 'preprocessed/org/mozilla/gecko/AppConstants.java'. The list in
|
||||
# constants_PP_JAVAFILES looks like
|
||||
# 'generated/preprocessed/org/mozilla/gecko/AppConstants.java'. We
|
||||
# need to write AppConstants.java.in to
|
||||
# generated/preprocessed/org/mozilla/gecko.
|
||||
preprocessed := $(addsuffix .in,$(subst generated/preprocessed/org/mozilla/gecko/,,$(filter generated/preprocessed/org/mozilla/gecko/%,$(constants_PP_JAVAFILES))))
|
||||
|
||||
preprocessed_PATH := generated/org/mozilla/gecko
|
||||
preprocessed_PATH := generated/preprocessed/org/mozilla/gecko
|
||||
preprocessed_KEEP_PATH := 1
|
||||
preprocessed_FLAGS := --marker='//\\\#'
|
||||
|
||||
|
|
|
@ -1137,8 +1137,8 @@ sync_java_files = [
|
|||
]
|
||||
|
||||
sync_generated_java_files = [
|
||||
'org/mozilla/gecko/background/common/GlobalConstants.java',
|
||||
'org/mozilla/gecko/background/healthreport/HealthReportConstants.java',
|
||||
'org/mozilla/gecko/fxa/FxAccountConstants.java',
|
||||
'org/mozilla/gecko/sync/SyncConstants.java',
|
||||
'background/common/GlobalConstants.java',
|
||||
'background/healthreport/HealthReportConstants.java',
|
||||
'fxa/FxAccountConstants.java',
|
||||
'sync/SyncConstants.java',
|
||||
]
|
||||
|
|
|
@ -14,9 +14,10 @@ thirdparty_source_dir = TOPSRCDIR + '/mobile/android/thirdparty/'
|
|||
constants_jar = add_java_jar('constants')
|
||||
constants_jar.sources = []
|
||||
constants_jar.generated_sources = [
|
||||
'org/mozilla/gecko/AppConstants.java',
|
||||
'org/mozilla/gecko/SysInfo.java',
|
||||
'preprocessed/org/mozilla/gecko/AppConstants.java',
|
||||
'preprocessed/org/mozilla/gecko/SysInfo.java',
|
||||
]
|
||||
constants_jar.generated_sources += ['preprocessed/org/mozilla/gecko/' + f for f in sync_generated_java_files]
|
||||
|
||||
resjar = add_java_jar('gecko-R')
|
||||
resjar.sources = []
|
||||
|
@ -549,7 +550,6 @@ if CONFIG['MOZ_ANDROID_NEW_TABLET_UI'] and max_sdk_version >= 11:
|
|||
ANDROID_RES_DIRS += [ SRCDIR + '/newtablet/res' ]
|
||||
|
||||
gbjar.sources += sync_java_files
|
||||
gbjar.generated_sources += sync_generated_java_files
|
||||
gbjar.extra_jars += [
|
||||
'gecko-R.jar',
|
||||
'gecko-mozglue.jar',
|
||||
|
@ -794,11 +794,8 @@ else:
|
|||
# Manifest.java for all packages) but also preprocessed files. In the past, the
|
||||
# generated R.java files were used by the Eclipse build, but now Eclipse
|
||||
# generates these files itself. Therefore, we exclude those generated sources.
|
||||
main.add_classpathentry('generated', OBJDIR + '/generated',
|
||||
dstdir='generated',
|
||||
exclude_patterns=[
|
||||
'**/R.java',
|
||||
'**/Manifest.java'])
|
||||
main.add_classpathentry('generated', OBJDIR + '/generated/preprocessed',
|
||||
dstdir='generated')
|
||||
main.add_classpathentry('thirdparty', TOPSRCDIR + '/mobile/android/thirdparty',
|
||||
dstdir='thirdparty',
|
||||
ignore_warnings=True)
|
||||
|
|
Загрузка…
Ссылка в новой задаче