Hello, everyone.
I'm trying to convert a makefile to a .bp file for Android Q and i'm facing 
some issues.

1) I'm not sure how to define a release version.
Previosly in makefile i would just write something along the lines of:

MY_RELEASE_VERSION := $(shell cd $(LOCAL_PATH); git describe --always 
--dirty)
DSW_VERSION= \"$(MY_RELEASE_VERSION)\" , which would be defined as a string 
like for example.  DSW_VERSION="project_specific_3_0"

Now i am able to use a cppflag in .bp with the DSW_VERSION , but i found no 
way to make the value of it to be taken like in the makefile. 
Something like:
MY_RELEASE_VERSION = ["__builtin_func:shell cd <'LOCAL_PATH' unset>; git 
describe --always --dirty"]
CPPFLAGS = [
 "DSW_VERSION = "\"MY_RELEASE_VERSION"\",
]
Does not work.


Secondly i'm facing issues in defining a config variant, which in turn 
would devine a variable from the source code.
Something like this in .mk files:
LOCAL_CPPFLAGS +=$(TARGET_CONFIG)
With a ifdefine in the code that looks like this:
#if defined (TARGET_ONE)
    static const VAR   = 1;
#elif defined (TARGET_TWO)
    static const VAR     = 2; 

i tried in .bp appendind to the cppflags, something like : cppflags: 
MY_CPPFLAGS + TARGET_CONFIG, where MY_CPPFLAGS is a variable defined with 
all the flags needed.


Anyone can help me with those?

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/8c6705bb-c215-467d-a43b-462257a2a3d4%40googlegroups.com.

Reply via email to