[Title] build date logging
authorgiwoong.kim <giwoong.kim@samsung.com>
Tue, 3 Apr 2012 12:04:58 +0000 (21:04 +0900)
committergiwoong.kim <giwoong.kim@samsung.com>
Tue, 3 Apr 2012 14:37:00 +0000 (23:37 +0900)
[Type]
[Module]
[Priority]
[Jira#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

tizen/src/Makefile [changed mode: 0644->0755]
tizen/src/build_info.h [new file with mode: 0644]
tizen/src/emulator.c

old mode 100644 (file)
new mode 100755 (executable)
index 4576903..b7f4658
@@ -8,7 +8,7 @@ config-host.mak:
        @exit 1
 endif
 
-all: qemu skin_client
+all: qemu skin_client build_info
 qemu:
        cd ../../ && $(MAKE)
 skin_client:
@@ -23,6 +23,10 @@ ifdef CONFIG_DARWIN
 endif
 endif
 endif
+build_info:
+       @echo "/* Automatically generated by Makefile - do not modify! */" > build_info.h
+       @echo "const char build_date[] = \"`date +"%F %T %Z"`\";" >> build_info.h
+
 clean:
        cd ../../ && $(MAKE) clean
 distclean:
diff --git a/tizen/src/build_info.h b/tizen/src/build_info.h
new file mode 100644 (file)
index 0000000..35684ce
--- /dev/null
@@ -0,0 +1,2 @@
+/* Automatically generated by Makefile - do not modify! */
+const char build_date[] = "2012-04-03 21:02:38 KST";
index cbb446a..ca4f773 100644 (file)
@@ -43,6 +43,7 @@
 #include "option.h"
 #include "emul_state.h"
 #include "qemu_socket.h"
+#include "build_info.h"
 #include <glib.h>
 #include <glib/gstdio.h>
 
@@ -230,6 +231,7 @@ int main(int argc, char* argv[])
     INFO("Emulator start !!!\n");
 
     /* timestamp */
+    INFO("* Build date : %s\n", build_date);
     gettimeofday(&tval, NULL);
     tm_time = localtime(&(tval.tv_sec));
     strftime(timeinfo, sizeof(timeinfo), "%Y/%m/%d %H:%M:%S", tm_time);