Bug 1259530 - Move *.java.in PP_TARGETS to moz.build; r?glandium draft
authorMike Shal <mshal@mozilla.com>
Mon, 11 Apr 2016 21:00:54 -0400
changeset 350125 538f41441cecf508973baa53385b3b72fad7e343
parent 350124 fbe059392f1739a2ede942fa8214f245ab35f543
child 350126 abd80a21e5d2bb04b9c5dd58ecc22c478594882e
push id15260
push userbmo:mshal@mozilla.com
push dateTue, 12 Apr 2016 22:57:49 +0000
reviewersglandium
bugs1259530
milestone48.0a1
Bug 1259530 - Move *.java.in PP_TARGETS to moz.build; r?glandium MozReview-Commit-ID: CpwzCrf8xTl
mobile/android/base/Makefile.in
mobile/android/base/moz.build
--- a/mobile/android/base/Makefile.in
+++ b/mobile/android/base/Makefile.in
@@ -302,34 +302,16 @@ jni-stubs.inc: gecko-browser.jar constan
 ANNOTATION_PROCESSOR_JAR_FILES := $(DEPTH)/build/annotationProcessors/annotationProcessors.jar
 
 # This annotation processing step also generates
 # GeneratedJNIWrappers.h and GeneratedJNINatives.h
 GeneratedJNIWrappers.cpp: $(ANNOTATION_PROCESSOR_JAR_FILES)
 GeneratedJNIWrappers.cpp: $(ALL_JARS)
 	$(JAVA) -classpath constants.jar:$(JAVA_BOOTCLASSPATH):$(JAVA_CLASSPATH):$(ANNOTATION_PROCESSOR_JAR_FILES) org.mozilla.gecko.annotationProcessors.AnnotationProcessor $(ALL_JARS)
 
-# Certain source files need to be preprocessed.  This special rule
-# generates these files into generated/org/mozilla/gecko for
-# consumption by the build system and IDEs.
-
-# 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/preprocessed/org/mozilla/gecko
-preprocessed_KEEP_PATH := 1
-preprocessed_FLAGS := --marker='//\\\#'
-
-PP_TARGETS += preprocessed
-
 include $(topsrcdir)/config/rules.mk
 
 not_android_res_files := \
   *.mkdir.done* \
   *.DS_Store* \
   *\#* \
   *.rej \
   *.orig \
--- a/mobile/android/base/moz.build
+++ b/mobile/android/base/moz.build
@@ -988,8 +988,15 @@ if CONFIG['MOZ_ANDROID_SEARCH_ACTIVITY']
 FINAL_TARGET_PP_FILES += ['package-name.txt.in']
 
 DEFINES['OBJDIR'] = OBJDIR
 DEFINES['TOPOBJDIR'] = TOPOBJDIR
 
 OBJDIR_PP_FILES.mobile.android.base += [
     'AndroidManifest.xml.in',
 ]
+
+OBJDIR_PP_FILES.mobile.android.base.generated.preprocessed.org.mozilla.gecko += [
+    'AdjustConstants.java.in',
+    'AppConstants.java.in',
+]
+PP_FLAGS['AdjustConstants.java.in'] += ["--marker='//\#'"]
+PP_FLAGS['AppConstants.java.in'] += ["--marker='//\#'"]