diff options
| author | Richard Kistruck | 2006-12-13 15:41:53 +0000 |
|---|---|---|
| committer | Richard Kistruck | 2006-12-13 15:41:53 +0000 |
| commit | a5fb67c1e9b258948945283f1bbb26a534a45016 (patch) | |
| tree | 11ee3d4eba19f95ab7d7acd36438948bbc9fea1b /mps/code | |
| parent | 445b3e6f517aaa3b805847e35549bd96533f72b6 (diff) | |
| download | emacs-a5fb67c1e9b258948945283f1bbb26a534a45016.tar.gz emacs-a5fb67c1e9b258948945283f1bbb26a534a45016.zip | |
Mps config.h: make it easy to see which variety turns on which features.
The logic is now clear, but wrong. See job001545.
(Source-only change).
Copied from Perforce
Change: 161211
ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code')
| -rw-r--r-- | mps/code/config.h | 59 |
1 files changed, 40 insertions, 19 deletions
diff --git a/mps/code/config.h b/mps/code/config.h index 64f83b66c75..5607c4efd7d 100644 --- a/mps/code/config.h +++ b/mps/code/config.h | |||
| @@ -23,32 +23,52 @@ | |||
| 23 | 23 | ||
| 24 | /* First deal with old-style CONFIG_VAR_* build directives. These | 24 | /* First deal with old-style CONFIG_VAR_* build directives. These |
| 25 | * must be translated into the new directives CONFIG_ASSERT, | 25 | * must be translated into the new directives CONFIG_ASSERT, |
| 26 | * CONFIG_LOG, and CONFIG_DEBUG. | 26 | * CONFIG_DEBUG, and CONFIG_LOG. |
| 27 | * | 27 | * |
| 28 | * One day the old build system may be converted to use the new | 28 | * One day the old build system may be converted to use the new |
| 29 | * directives. | 29 | * directives. |
| 30 | */ | 30 | */ |
| 31 | 31 | ||
| 32 | #if defined(CONFIG_VAR_HI) || defined(CONFIG_VAR_HE) /* Hot varieties */ | 32 | #if defined(CONFIG_VAR_WI) || defined(CONFIG_VAR_WE) /* Hot varieties */ |
| 33 | #define CONFIG_DEBUG | 33 | /* no asserts */ |
| 34 | /* ... so CHECKLEVEL_INITIAL is irrelevant */ | ||
| 35 | /* no debug diagnostic statistic meters */ | ||
| 36 | /* no telemetry log events */ | ||
| 37 | |||
| 38 | #elif defined(CONFIG_VAR_HI) || defined(CONFIG_VAR_HE) /* Hot varieties */ | ||
| 39 | /* no asserts */ | ||
| 34 | #define CHECKLEVEL_INITIAL CheckLevelMINIMAL | 40 | #define CHECKLEVEL_INITIAL CheckLevelMINIMAL |
| 35 | #elif defined(CONFIG_VAR_CI) || defined(CONFIG_VAR_CE) /* Cool varieties */ | 41 | /* @@@@ no asserts, so setting CHECKLEVEL_INITIAL has no effect! */ |
| 36 | #define CONFIG_DEBUG | 42 | #define CONFIG_DEBUG |
| 43 | /* no telemetry log events */ | ||
| 44 | |||
| 45 | #elif defined(CONFIG_VAR_CI) || defined(CONFIG_VAR_CE) /* Cool varieties */ | ||
| 37 | #define CONFIG_ASSERT | 46 | #define CONFIG_ASSERT |
| 38 | #elif defined(CONFIG_VAR_TI) /* Telemetry, Internal; variety.ti */ | 47 | /* ... let PRODUCT determine CHECKLEVEL_INITIAL */ |
| 39 | #define CONFIG_DEBUG | 48 | #define CONFIG_DEBUG |
| 49 | /* no telemetry log events */ | ||
| 50 | |||
| 51 | #elif defined(CONFIG_VAR_TI) /* Telemetry, Internal; variety.ti */ | ||
| 40 | #define CONFIG_ASSERT | 52 | #define CONFIG_ASSERT |
| 53 | /* ... let PRODUCT determine CHECKLEVEL_INITIAL */ | ||
| 54 | #define CONFIG_DEBUG | ||
| 41 | #define CONFIG_LOG | 55 | #define CONFIG_LOG |
| 56 | |||
| 42 | #elif defined(CONFIG_VAR_II) /* Ice, Internal; variety.ii */ | 57 | #elif defined(CONFIG_VAR_II) /* Ice, Internal; variety.ii */ |
| 43 | #define CONFIG_LOG | 58 | /* no asserts */ |
| 44 | #define CONFIG_DEBUG | ||
| 45 | #define CHECKLEVEL_INITIAL CheckLevelMINIMAL | 59 | #define CHECKLEVEL_INITIAL CheckLevelMINIMAL |
| 46 | /* also CONFIG_VAR_WI and CONFIG_VAR_WE, for which all switches are off. */ | 60 | /* @@@@ no asserts, so setting CHECKLEVEL_INITIAL has no effect! */ |
| 61 | #define CONFIG_DEBUG | ||
| 62 | #define CONFIG_LOG | ||
| 47 | #endif | 63 | #endif |
| 48 | 64 | ||
| 49 | 65 | ||
| 66 | /* Build Features */ | ||
| 67 | |||
| 68 | |||
| 50 | #if defined(CONFIG_ASSERT) | 69 | #if defined(CONFIG_ASSERT) |
| 51 | /* AVER, AVERT, NOTREACHED, CHECKx */ | 70 | /* asserts: AVER, AVERT, NOTREACHED, CHECKx */ |
| 71 | /* note: a direct call to ASSERT() will *still* fire */ | ||
| 52 | #define AVER_AND_CHECK | 72 | #define AVER_AND_CHECK |
| 53 | #define MPS_ASSERT_STRING "asserted" | 73 | #define MPS_ASSERT_STRING "asserted" |
| 54 | #else | 74 | #else |
| @@ -57,16 +77,6 @@ | |||
| 57 | #endif | 77 | #endif |
| 58 | 78 | ||
| 59 | 79 | ||
| 60 | #if defined(CONFIG_LOG) | ||
| 61 | /* TELEMETRY = LOG = EVENTs */ | ||
| 62 | #define EVENT | ||
| 63 | #define MPS_LOG_STRING "logging" | ||
| 64 | #else | ||
| 65 | #define EVENT_NONE | ||
| 66 | #define MPS_LOG_STRING "nonlogging" | ||
| 67 | #endif | ||
| 68 | |||
| 69 | |||
| 70 | #if defined(CONFIG_DEBUG) | 80 | #if defined(CONFIG_DEBUG) |
| 71 | /* DEBUG = DIAGNOSTICS = STATISTICs = METERs */ | 81 | /* DEBUG = DIAGNOSTICS = STATISTICs = METERs */ |
| 72 | /* WARNING: this changes the size and fields of MPS structs */ | 82 | /* WARNING: this changes the size and fields of MPS structs */ |
| @@ -77,6 +87,17 @@ | |||
| 77 | #define MPS_DEBUG_STRING "nondebug" | 87 | #define MPS_DEBUG_STRING "nondebug" |
| 78 | #endif | 88 | #endif |
| 79 | 89 | ||
| 90 | |||
| 91 | #if defined(CONFIG_LOG) | ||
| 92 | /* TELEMETRY = LOG = EVENTs */ | ||
| 93 | #define EVENT | ||
| 94 | #define MPS_LOG_STRING "logging" | ||
| 95 | #else | ||
| 96 | #define EVENT_NONE | ||
| 97 | #define MPS_LOG_STRING "nonlogging" | ||
| 98 | #endif | ||
| 99 | |||
| 100 | |||
| 80 | #define MPS_VARIETY_STRING \ | 101 | #define MPS_VARIETY_STRING \ |
| 81 | MPS_ASSERT_STRING "." MPS_LOG_STRING "." MPS_DEBUG_STRING | 102 | MPS_ASSERT_STRING "." MPS_LOG_STRING "." MPS_DEBUG_STRING |
| 82 | 103 | ||