From b9de9134c0c9fe25fa2e1face168c1ce58315265 Mon Sep 17 00:00:00 2001 From: bernie Date: Sat, 27 May 2006 22:42:02 +0000 Subject: [PATCH] Add verstag. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@647 38d2e660-2303-0410-9eaa-f027e97ec537 --- app/demo/demo.mk | 6 +++- app/demo/verstag.h | 69 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 1 deletion(-) create mode 100755 app/demo/verstag.h diff --git a/app/demo/demo.mk b/app/demo/demo.mk index 18a881da..bd76ba52 100755 --- a/app/demo/demo.mk +++ b/app/demo/demo.mk @@ -8,6 +8,9 @@ # Author: Bernardo Innocenti # # $Log$ +# Revision 1.5 2006/05/27 22:42:02 bernie +# Add verstag. +# # Revision 1.4 2006/05/27 17:16:38 bernie # Make demos a bit more interesting. # @@ -66,7 +69,8 @@ demo_CSRC = \ kern/proc.c \ kern/sem.c \ kern/signal.c \ - kern/monitor.c + kern/monitor.c \ + verstag.c demo_ASRC = \ kern/switch_x86_64.s diff --git a/app/demo/verstag.h b/app/demo/verstag.h new file mode 100755 index 00000000..5989123d --- /dev/null +++ b/app/demo/verstag.h @@ -0,0 +1,69 @@ +/** + * \file + * + * + * \version $Id$ + * + * \author Bernardo Innocenti + * + * \brief Declare application version strings + */ +#ifndef DEVLIB_VERSTAG_H +#define DEVLIB_VERSTAG_H + +#ifndef ARCH_CONFIG_H + #include "cfg/arch_config.h" +#endif + +#define APP_NAME "Devlib Demo" +#define APP_DESCRIPTION "DevLib Multidemo Application" +#define APP_AUTHOR "Develer" +#define APP_COPYRIGHT "Copyright 2006 Develer (http://www.develer.com/)" + +#define VERS_MAJOR 0 +#define VERS_MINOR 1 +#define VERS_REV 0 +#define VERS_LETTER "" + +/*! + * If _SNAPSHOT is defined, \c VERS_TAG contains the build date + * date instead of a numeric version string. + */ +#define _SNAPSHOT + +#ifdef _DEBUG + #define VERS_DBG "D" +#else + #define VERS_DBG "" +#endif + +#define __STRINGIZE(x) #x +#define _STRINGIZE(x) __STRINGIZE(x) + +/*! Build application version string (i.e.: "1.7.0") */ +#define MAKE_VERS(maj,min,rev) _STRINGIZE(maj) "." _STRINGIZE(min) "." _STRINGIZE(rev) VERS_LETTER VERS_DBG +#ifdef _SNAPSHOT + #define VERS_TAG "snapshot" " " __DATE__ " " __TIME__ " " VERS_LETTER " " VERS_DBG +#else + #define VERS_TAG MAKE_VERS(VERS_MAJOR,VERS_MINOR,VERS_REV) +#endif + +/*! Build application version string suitable for MS windows resource files (i.e.: "1, 7, 0, 1") */ +#define MAKE_RCVERS(maj,min,rev,bld) _STRINGIZE(maj) ", " _STRINGIZE(min) ", " _STRINGIZE(rev) ", " _STRINGIZE(bld) +#define RCVERSION_TAG MAKE_VERS(VERS_MAJOR,VERS_MINOR,VERS_REV) + +/*! The revision string (contains VERS_TAG) */ +extern const char vers_tag[]; + +/*! Sequential build number (contains VERS_BUILD) */ +extern const int vers_build_nr; +//extern const char vers_build_str[]; + +/*! Hostname of the machine used to build this binary (contains VERS_HOST) */ +extern const char vers_host[]; + +#endif /* DEVLIB_VERSTAG_H */ -- 2.25.1