Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Issue 11415152: build/java_cpp_template.gypi: new build rules. (Closed)

Created:
8 years ago by digit1
Modified:
8 years ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

build/java_cpp_template.gypi: new build rules. This patch adds a new .gypi file that allows one to generate Java source files by parsing template files with the host C pre-processor. The main use case is the ability to generate Java sources defining constants matching their C/C++ counterparts. This is actually a generalisation of the technique that was used in net/net.gyp to generate a NetError.java source mirroring the definitions found in net/base/net_error_list.h BUG=none Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=172041

Patch Set 1 #

Total comments: 6

Patch Set 2 : Fix indentation #

Patch Set 3 : use <(DEPTH) #

Total comments: 6

Patch Set 4 : Move to build/android/ and remove un-necessary flags. #

Total comments: 2

Patch Set 5 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+78 lines, -39 lines) Patch
A build/android/java_cpp_template.gypi View 1 2 3 4 1 chunk +71 lines, -0 lines 0 comments Download
A + net/android/java/NetError.template View 0 chunks +-1 lines, --1 lines 0 comments Download
D net/android/java/net_errors_java.template View 1 chunk +0 lines, -10 lines 0 comments Download
M net/net.gyp View 1 2 3 4 1 chunk +8 lines, -30 lines 2 comments Download

Messages

Total messages: 21 (0 generated)
digit1
This feature was asked during the code review of https://chromiumcodereview.appspot.com/11266008/. The plan is to use ...
8 years ago (2012-11-27 16:42:21 UTC) #1
bulach
thanks digit! one suggestion below: https://chromiumcodereview.appspot.com/11415152/diff/1/build/java_cpp_template.gypi File build/java_cpp_template.gypi (right): https://chromiumcodereview.appspot.com/11415152/diff/1/build/java_cpp_template.gypi#newcode50 build/java_cpp_template.gypi:50: 'rules': [{ my understanding ...
8 years ago (2012-11-27 17:57:11 UTC) #2
joth
Thanks for this. LG from my side (but I'm not a gypi expert) https://chromiumcodereview.appspot.com/11415152/diff/1/net/android/java/NetError.template File ...
8 years ago (2012-11-27 18:22:32 UTC) #3
digit1
https://chromiumcodereview.appspot.com/11415152/diff/1/build/java_cpp_template.gypi File build/java_cpp_template.gypi (right): https://chromiumcodereview.appspot.com/11415152/diff/1/build/java_cpp_template.gypi#newcode50 build/java_cpp_template.gypi:50: 'rules': [{ Hi Marcus, I think a 'rules' section ...
8 years ago (2012-11-27 22:29:07 UTC) #4
bulach
lgtm, thanks for the explanation and sorry about the confusion! :) https://codereview.chromium.org/11415152/diff/1/build/java_cpp_template.gypi File build/java_cpp_template.gypi (right): ...
8 years ago (2012-11-28 08:57:30 UTC) #5
digit1
https://codereview.chromium.org/11415152/diff/1/build/java_cpp_template.gypi File build/java_cpp_template.gypi (right): https://codereview.chromium.org/11415152/diff/1/build/java_cpp_template.gypi#newcode69 build/java_cpp_template.gypi:69: '-I', '..', # Add project top-level to include path ...
8 years ago (2012-11-28 10:58:48 UTC) #6
digit1
According to torne and joth, <(DEPTH) only needs to be used when the .gypi file ...
8 years ago (2012-11-28 22:39:39 UTC) #7
digit1
It turns out that using <(DEPTH) works very well, and is already heavily used in ...
8 years ago (2012-11-29 13:51:08 UTC) #8
Ryan Sleevi
https://codereview.chromium.org/11415152/diff/6012/build/java_cpp_template.gypi File build/java_cpp_template.gypi (right): https://codereview.chromium.org/11415152/diff/6012/build/java_cpp_template.gypi#newcode7 build/java_cpp_template.gypi:7: # through the host C pre-processor. This should be ...
8 years ago (2012-12-04 03:14:55 UTC) #9
digit1
https://chromiumcodereview.appspot.com/11415152/diff/6012/build/java_cpp_template.gypi File build/java_cpp_template.gypi (right): https://chromiumcodereview.appspot.com/11415152/diff/6012/build/java_cpp_template.gypi#newcode7 build/java_cpp_template.gypi:7: # through the host C pre-processor. On 2012/12/04 03:14:56, ...
8 years ago (2012-12-04 12:20:34 UTC) #10
digit1
Patch 4 moves the new file to build/android/ and also removes the hard_dependency and process_outputs_as_sources. ...
8 years ago (2012-12-04 14:16:53 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/digit@chromium.org/11415152/11001
8 years ago (2012-12-05 13:57:15 UTC) #12
commit-bot: I haz the power
Presubmit check for 11415152-11001 failed and returned exit status 1. Running presubmit commit checks ...
8 years ago (2012-12-05 13:57:19 UTC) #13
digit1
Aarf, Ryan, does everything looks good to you here? Thanks in advance.
8 years ago (2012-12-05 13:59:03 UTC) #14
Ryan Sleevi
There's still a bug here, below; https://chromiumcodereview.appspot.com/11415152/diff/11001/build/android/java_cpp_template.gypi File build/android/java_cpp_template.gypi (right): https://chromiumcodereview.appspot.com/11415152/diff/11001/build/android/java_cpp_template.gypi#newcode62 build/android/java_cpp_template.gypi:62: }, This doesn't ...
8 years ago (2012-12-05 17:44:52 UTC) #15
digit1
https://chromiumcodereview.appspot.com/11415152/diff/11001/build/android/java_cpp_template.gypi File build/android/java_cpp_template.gypi (right): https://chromiumcodereview.appspot.com/11415152/diff/11001/build/android/java_cpp_template.gypi#newcode62 build/android/java_cpp_template.gypi:62: }, I see. I've scanned all gyp files in ...
8 years ago (2012-12-06 14:16:29 UTC) #16
Ryan Sleevi
Mostly looks good, but there's still an area of confusion for me https://codereview.chromium.org/11415152/diff/19001/net/net.gyp File net/net.gyp ...
8 years ago (2012-12-07 03:20:09 UTC) #17
digit1
https://codereview.chromium.org/11415152/diff/19001/net/net.gyp File net/net.gyp (left): https://codereview.chromium.org/11415152/diff/19001/net/net.gyp#oldcode2287 net/net.gyp:2287: 'additional_input_paths': ['<(SHARED_INTERMEDIATE_DIR)/net/template/NetError.java'], On 2012/12/07 03:20:10, Ryan Sleevi wrote: > ...
8 years ago (2012-12-07 08:46:07 UTC) #18
Ryan Sleevi
On 2012/12/07 08:46:07, digit1 wrote: > https://codereview.chromium.org/11415152/diff/19001/net/net.gyp > File net/net.gyp (left): > > https://codereview.chromium.org/11415152/diff/19001/net/net.gyp#oldcode2287 > ...
8 years ago (2012-12-07 19:01:59 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/digit@chromium.org/11415152/19001
8 years ago (2012-12-10 09:45:48 UTC) #20
commit-bot: I haz the power
8 years ago (2012-12-10 12:38:29 UTC) #21
Message was sent while issue was closed.
Change committed as 172041

Powered by Google App Engine
This is Rietveld 408576698