makefileandroid-make

Get Timestamp in mk file


I could like to append a timestamp to the build property value in Android.mk file.Is there a way to get the current timestamp (format "YYMMDD") in a Android make file?


Solution

  • I don't know if there is something specific with an Android make file, but the following works in GNUmake:

    DATE := $(shell date --utc +%Y%m%d)
    
    $(info Current UTC date is $(DATE))