Commit graph

14 commits

Author SHA1 Message Date
Dan Willemsen
3a4045d3b1 androidbp: Refactor Target/Device duplication to mutation
This is just another mutation in soong, implement it as a mutation in
androidbp as well.

Change-Id: Id72cba58db8603cace9d8ae5d8fbbd08167867cd
2015-06-29 22:06:55 +00:00
Dan Willemsen
49f50454c1 Support 'cc_library' in androidbp
Change-Id: I0a0ee48aac786a422e68e14ba14fc6186296214d
2015-06-29 22:03:26 +00:00
Colin Cross
eb05083e27 Fix more androidbp bugs
Don't insert a space when concatentating strings.  Lists will already have
a separator, and strings may need to be a single word.
Use valueToString to print individual elements in a list to pick up the
same expression fix from a previous patch.
"static_executable" converts to LOCAL_FORCE_STATIC_EXECUTABLE, not "static".
Add "no_default_compiler_flags" to LOCAL_NO_DEFAULT_COMPILER_FLAGS.

Change-Id: I45c7eb8355ee1b40d7949e1560cc11cc959764b3
2015-06-22 17:26:12 -07:00
Dan Willemsen
d7b11dd232 androidbp: Compile fix
Change-Id: I6db343c4d6426ffa6d76db7c6d94a54a5e94f712
2015-06-22 16:25:39 -07:00
Dan Willemsen
1d9f279a80 androidbp: Add static_executable, fix suffix
Add a conversion for static_executable -> LOCAL_FORCE_STATIC_EXECUTABLE

In androidmk, LOCAL_MODULE_STEM values are converted to 'suffix' values
if it is in the form $(LOCAL_MODULE)<suffix>. Do the opposite in
androidbp.

Change-Id: Ia645cf21c0def3d055188ab5b021344bb50aa58e
2015-06-22 16:00:08 -07:00
Colin Cross
ff3b795eff Fix Android.bp to Android.mk conversion bugs
Support + operators in Android.bp files
Remove trailing \n from list values in case they are part of an
expression
Replace manual $(LOCAL_PATH) prefixing in prependLocalPath with
a call to $(addprefix $(LOCAL_PATH),...) so it works on expressions.

Change-Id: I68a62b64381b7616fb7dc27fb064b1ffd3b4542a
2015-06-22 15:41:15 -07:00
Dan Willemsen
c2666e664f androidbp: Add LOCAL_MODULE_MAKEFILE
We're hardcoding LOCAL_PATH instead of using the my-dir macro.
LOCAL_MODULE_MAKEFILE is the other variable set up by this macro, used
to ensure that changes to the makefile rebuilds the objects defined in
the makefile.

Change-Id: I994b72ab9053d5a057eb3e35a8710038800432eb
2015-06-19 21:30:44 +00:00
Dan Willemsen
68fdfccd2f androidbp: Improve target conditionals when host_supported
Properties need to be parsed twice to support different conditionals for
target and host modules. Then add 'android' target support that will
just be selected for target modules.

Change-Id: I8970d5a0d132324ac7e2a7fffc2b07e7c0da33c0
2015-06-19 13:16:38 -07:00
Dan Willemsen
57ad08c15d androidbp: Handle local_include_dirs and fix export_include_dirs
The androidmk->androidbp translation strips $(LOCAL_PATH), add it back
in the reverse path.

Change-Id: I64ff213511c7dd6da0259746ea97677140ee5bf5
2015-06-19 12:51:09 -07:00
Dan Willemsen
360a39c0f1 androidbp: Defer local path printing
This will defer printing the local path until the first module or
definition. Usually, there's a copyright comment at the top of the file
that will be now be printed first, then the LOCAL_PATH.

Change-Id: I349f7e30eaa99dcfdc73e96248774927a13be8cb
2015-06-11 18:26:25 -07:00
Ying Wang
3828490eef Allow to specify the output Android.mk file path.
- Allow to specify the output Android.mk file path.
  We need this to generate Android.mk into the out diretory.
- Makefile strings don't need quotes.
- Return non-zero exit code if it fails.
- Other trivial format changes.

Change-Id: I460083f6e0a2707cd4a6fe0bef3f8ae7562e9edb
2015-06-03 11:14:13 -07:00
Andres Morales
8ae47de451 [androidbp] address comments aosp/149217
Change-Id: I8b4bbbeef6c2c11080a4bc30820b2200ba78b7e9
2015-05-11 17:54:50 -07:00
Andres Morales
af11df1538 androidbp: handle suffix props, conditionals, map assignments
Change-Id: I6aec388e72d960d80943620024c2d16d51a0b095
2015-05-08 15:43:24 -07:00
Andres Morales
da8706fed8 Initial androidbp translator.
Translates Android.bp files back to Android.mk

Change-Id: Ib4bd1e0abc58ab514a7dd4a01008af645d6a3d13
2015-04-30 18:51:10 -07:00