summaryrefslogtreecommitdiffstats
path: root/net/net.gyp
diff options
context:
space:
mode:
authoryusufo@chromium.org <yusufo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-10 19:22:50 +0000
committeryusufo@chromium.org <yusufo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-10 19:22:50 +0000
commit2fa3091a0aff683c4d0ab4f0bde847d85b9f4d14 (patch)
tree5ef5daa199cedcd364e80df5537b658dd0c19448 /net/net.gyp
parent2a8cd6d6b852a18ae7e7f5d7012ad4b6eacdae8b (diff)
downloadchromium_src-2fa3091a0aff683c4d0ab4f0bde847d85b9f4d14.zip
chromium_src-2fa3091a0aff683c4d0ab4f0bde847d85b9f4d14.tar.gz
chromium_src-2fa3091a0aff683c4d0ab4f0bde847d85b9f4d14.tar.bz2
Build NetError.java to use in java side tests by preprocessing net_errors.cc
Java side tests will be using a map to convert these error codes to platform specific ones. This generates a java file which can be used to refer to the errorcode. The included test just does a trivial check whether the java file can be included and used. BUG=137967 Review URL: https://chromiumcodereview.appspot.com/10912136 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155796 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/net.gyp')
-rw-r--r--net/net.gyp34
1 files changed, 34 insertions, 0 deletions
diff --git a/net/net.gyp b/net/net.gyp
index 33872dc..02ef211 100644
--- a/net/net.gyp
+++ b/net/net.gyp
@@ -2111,6 +2111,7 @@
},
'dependencies': [
'../base/base.gyp:base',
+ 'net_errors_java',
],
'export_dependent_settings': [
'../base/base.gyp:base',
@@ -2136,6 +2137,39 @@
],
'includes': [ '../build/java.gypi' ],
},
+ {
+ # This should be extracted to a gypi file and parameterized if
+ # we have more use cases of using the preprocessor to build java files.
+ 'target_name': 'net_errors_java',
+ 'type': 'none',
+ 'direct_dependent_settings': {
+ 'variables': {
+ 'additional_src_dirs': ['<(SHARED_INTERMEDIATE_DIR)/net/template/'],
+ },
+ },
+ 'actions': [
+ {
+ 'action_name': 'generate_net_errors_java',
+ 'inputs': [
+ 'android/java/net_errors_java.template',
+ ],
+ 'outputs': [
+ '<(SHARED_INTERMEDIATE_DIR)/net/template/NetError.java',
+ ],
+ 'action': [
+ 'gcc',
+ '-x', 'c-header',
+ '-E', '-P',
+ '-I', '..',
+ '-o',
+ '<@(_outputs)',
+ '<@(_inputs)',
+ ],
+ 'message': 'Preprocessing <(_inputs)',
+ 'process_outputs_as_sources': 1,
+ },
+ ],
+ },
],
}],
# Special target to wrap a gtest_target_type==shared_library