【发布时间】:2014-05-21 16:00:10
【问题描述】:
我想将二进制的纪元时间转换为十六进制。我可以通过以下命令在命令行中执行此操作
# epoxy time in decimal
me@bof:/auto/homes$ date +%s
1400687648
# epoxy time in hex
me@bof:/auto/homes$ printf "%x\n" $(date +%s)
537ccc3b
现在我想在 Makefiles 中执行上述操作,我正在尝试使用 $(shell) 命令,但我遗漏了一些东西。
identifier:
$(shell date +%s)
$(shell printf "%x\n" $(date +%s))
有人可以帮我解决上述问题吗? 谢谢
【问题讨论】:
-
为什么标记为 C?
标签: c makefile type-conversion