A file named klib/version.h will be generated every time make
generates a new system image. It will contain definitions for these
symbols:
OFF_VERSION, a string with the source code version
identifier (as reported by cvs).
OFF_COMPILE_DATE, a string with the date the compilation was
started.
OFF_COMPILE_TIME, a string with the time the compilation was
started.
OFF_COMPILE_BY, a string with the user name for the user who
started the compilation.
OFF_COMPILE_HOST, a string with the name of the host the
kernel was compiled in.
OFF_COMPILER a string with the name of the C++ compiler
used.
\item OFF_ARCHa string with the name of the architecture the
kernel was built for.
OFF_URL a string with the root of the web site where
literate sources for this kernel version are kept.
They will be kept in a static object containing those strings. Its intend is to keep them inside each system image.
<Version.h*>=
<Read the literate code instead warning. >
#ifndef __OFF_K_VERSION_H
#define __OFF_K_VERSION_H 1
#include <klib/version.h>
// Version information.
class off_Version {
public:
static const char *cvs_id; // CVS release ID.
static const char *version; // Official Version nb.
static const char *compile_date; // Compilation date.
static const char *compile_time; // Compilation time
static const char *compile_by; // Who started the compilation.
static const char *compile_host; // Where was this kernel compiled in.
static const char *compiler; // Which compiler has been used.
static const char *arch; // Architecture this was compiled for.
static const char *url; // URL with the literate source code for this
// kernel
};
#endif // __OFF_K_VERSION_H
Definesoff_Version(links are to index).
<Version.C*>= <Read the literate code instead warning. > #include <klib/Version.h> // Exported interface. const char *off_Version::cvs_id = " $Id: off.nw,v 1.10 1998/01/15 18:32:02 nemo Exp $ "; const char *off_Version::version = OFF_VERSION; const char *off_Version::compile_date = OFF_COMPILE_DATE; const char *off_Version::compile_time = OFF_COMPILE_TIME; const char *off_Version::compile_by = OFF_COMPILE_BY; const char *off_Version::compile_host = OFF_COMPILE_HOST; const char *off_Version::compiler = OFF_COMPILER; const char *off_Version::arch = OFF_ARCH; const char *off_Version::url = OFF_URL;