From ea35fdc675f77da1b4398d2c27b64c5c26886a88 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Sat, 27 Jan 2007 07:21:27 +0000 Subject: Dynamically derive __ __RTEMS_MAJOR__, __RTEMS_MINOR__, __RTEMS_REVISION__ from _RTEMS_VERSION. Add __RTEMS_MAJOR__, __RTEMS_MINOR__,__RTEMS_REVISION__ to cpuopt.h. --- cpukit/configure.ac | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'cpukit/configure.ac') diff --git a/cpukit/configure.ac b/cpukit/configure.ac index aacd441583..0e14f05521 100644 --- a/cpukit/configure.ac +++ b/cpukit/configure.ac @@ -103,6 +103,10 @@ typedef struct { ]) ]) +rtems_major=`echo _RTEMS_VERSION | sed "s/\..*//"` +rtems_minor=`echo _RTEMS_VERSION | sed "s/[[0-9]][[0-9]]*\.//;s/\..*//"` +rtems_revision=`echo _RTEMS_VERSION | sed "s/[[0-9]][[0-9]]*\.//;s/[[0-9]][[0-9]]*\.//;s/\..*//"` + cat >>cpuopts.tmp <<\_ACEOF /** * @file rtems/score/cpuopts.h @@ -173,6 +177,21 @@ RTEMS_CPUOPT([SIZEOF_CPU_CONTEXT], [$ac_cv_sizeof_CPU_CONTEXT], [The size of a 'CPU_CONTEXT', as computed by sizeof]) +RTEMS_CPUOPT([__RTEMS_MAJOR__], + [true], + [$rtems_major], + [major version portion of an RTEMS release]) + +RTEMS_CPUOPT([__RTEMS_MINOR__], + [true], + [$rtems_minor], + [minor version portion of an RTEMS release]) + +RTEMS_CPUOPT([__RTEMS_REVISION__], + [true], + [$rtems_revision], + [revision version portion of an RTEMS release]) + cat >>cpuopts.tmp <<\_ACEOF #endif /* _RTEMS_SCORE_CPUOPTS_H */ -- cgit v1.2.3