1 #ifndef VERSION_H 2 #define VERSION_H 3 /** 4 * Copyright (c) 2019, The Linux Foundation. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: 9 * * Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * * Redistributions in binary form must reproduce the above 12 * copyright notice, this list of conditions and the following 13 * disclaimer in the documentation and/or other materials provided 14 * with the distribution. 15 * * Neither the name of The Linux Foundation nor the names of its 16 * contributors may be used to endorse or promote products derived 17 * from this software without specific prior written permission. 18 * 19 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 20 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 22 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 26 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 27 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 28 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 29 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 */ 31 32 #if !defined(VERSION_CL) 33 #define VERSION_CL "?" 34 #endif 35 36 #if !defined(VERSION_PROD) 37 #define VERSION_PROD "unknown" 38 #endif 39 40 #if !defined(VERSION_BRANCH) 41 #define VERSION_BRANCH "?" 42 #endif 43 44 #if !defined(VERSION_NUM) 45 #define VERSION_NUM "?.?.?.?" 46 #endif 47 48 #define VERSION_STRING \ 49 VERSION_PROD " " \ 50 VERSION_NUM " " \ 51 "(br=" VERSION_BRANCH "; cl=" VERSION_CL ")" 52 53 /* 54 ======================================================================= 55 MACROS DOCUMENTATION 56 ======================================================================= 57 58 VERSION_MAJOR 59 60 Description: 61 Defines the major release number of the version. 62 63 Comments: 64 It has to be a valid numerical value 65 ======================================================================= 66 67 VERSION_MINOR 68 69 Description: 70 Defines the minor release number of the version. 71 72 Comments: 73 It has to be a valid numerical value 74 ======================================================================= 75 76 VERSION_MAINT 77 78 Description: 79 Defines the maintenance release of the version. 80 81 Comments: 82 It has to be a valid numerical value 83 ======================================================================= 84 85 VERSION_BUILD 86 87 Description: 88 Defines the build ID of the version. 89 90 Comments: 91 It has to be a valid numerical value 92 ======================================================================= 93 94 VERSION_STRING 95 96 Description: 97 Defines the version string that specifies the version number. 98 99 Definition: 100 101 #define VERSION_STRING "a.b.c.d (name=value;name=value;...)" 102 where a=major release number 103 b=minor release number 104 c=maintenance release number 105 d=build number 106 107 name=value pair provides additional information about the build. 108 Example: 109 patch/feature=comma separated list of features/patches that have been installed. 110 br=p4 branch that was used for the build 111 cl=p4 change list number 112 machine=hostname of the machine that was used for the build. 113 114 Comments: 115 116 ======================================================================= 117 */ 118 119 #endif // VERSION_H 120