mirror of
https://github.com/espressif/openthread.git
synced 2026-08-11 05:07:47 +00:00
[build] allow specify build date time (#6856)
This commit adds a macro for specifying OpenThread build date time, which can be empty so that this field can be omitted.
This commit is contained in:
@@ -45,8 +45,26 @@ check_targets()
|
||||
done
|
||||
}
|
||||
|
||||
check_datetime()
|
||||
{
|
||||
local datetime
|
||||
|
||||
datetime="$(date)"
|
||||
cat >openthread-config-datetime.h <<EOF
|
||||
#include <openthread-config-android.h>
|
||||
#define OPENTHREAD_BUILD_DATETIME "$datetime"
|
||||
EOF
|
||||
|
||||
OPENTHREAD_PROJECT_CFLAGS="-I$PWD -DOPENTHREAD_CONFIG_FILE=\\\"openthread-config-datetime.h\\\" \
|
||||
-DOPENTHREAD_PROJECT_CORE_CONFIG_FILE=\\\"openthread-core-posix-config.h\\\"" \
|
||||
make showcommands ot-cli
|
||||
grep "$datetime" -ao "out/target/product/generic/system/bin/ot-cli"
|
||||
make clean-ot-cli
|
||||
}
|
||||
|
||||
main()
|
||||
{
|
||||
OPENTHREAD_ENABLE_ANDROID_MK=1 ANDROID_NDK=1 check_datetime
|
||||
OPENTHREAD_ENABLE_ANDROID_MK=1 ANDROID_NDK=1 USE_OTBR_DAEMON=1 check_targets ot-cli ot-ctl
|
||||
OPENTHREAD_ENABLE_ANDROID_MK=1 ANDROID_NDK=1 check_targets ot-cli spi-hdlc-adapter
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user