2

I am trying to get to run this simple command inside the Android.mk to create .cc and .hh files out of the comm.proto file given below, which is needed for my c++ library to be built.

$(shell $(LOCAL_PATH)/ext/bin/protoc 
        --proto_path=$(LOCAL_PATH)/comm 
        --cpp_out=$(LOCAL_PATH)/comm 
        $(LOCAL_PATH)/comm/comm.proto )

I have all the necessary files kept in the directory structure as mentioned in my command.

My Questions are:

1.Is it a valid way to run commands inside Android.mk?

2.Also, once this works is there a way I can make sure that this command is run only when comm.proto file has changed?(Any timestamp based approach)

sp497
  • 2,363
  • 7
  • 25
  • 43

0 Answers0