Skip to content

Commit

Permalink
Add macro for release version and version string
Browse files Browse the repository at this point in the history
  • Loading branch information
astrogeco authored and Gerardo E. Cruz-Ortiz committed Jul 13, 2020
1 parent 466756c commit 90cd360
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion elf2cfetbl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1287,7 +1287,7 @@ void OutputVersionInfo(void)
* printf("Version v%d.%d.%d.%d ", ELF2CFETBL_MAJOR_VERSION, ELF2CFETBL_MINOR_VERSION, ELF2CFETBL_REVISION, ELF2CFETBL_MISSION_REV);
*/

printf("DEVELOPMENT VERSION: %s-%d (v%s+dev%d))\n", ELF2CFETBL_CODENAME, ELF2CFETBL_BUILDNUMBER, ELF2CFETBL_BASELINE, ELF2CFETBL_BUILDNUMBER);
printf("%s\n", ELF2CFETBL_VERSION_STRING);
printf(" Built - %s %s\n\n", __DATE__, __TIME__);
}

Expand Down
20 changes: 17 additions & 3 deletions elf2cfetbl_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,27 @@
#define ELF2CFETBL_CODENAME "Bootes"
#define ELF2CFETBL_BASELINE "v3.1.0"
#define ELF2CFETBL_BUILDNUMBER 34

/*
* Version Macro Definitions
* ONLY APPLY if CFS_RELEASE_BUILD == TRUE
*/
#define ELF2CFETBL_MAJOR_VERSION 3
#define ELF2CFETBL_MINOR_VERSION 1
#define ELF2CFETBL_REVISION 5
#define ELF2CFETBL_MISSION_REV 0
#define ELF2CFETBL_REVISION 5
#define ELF2CFETBL_MISSION_REV 0

#ifdef ELF2CFETBL_RELEASE_BUILD

#define ELF2CFETBL_VERSION_STRING \
("elf2cfetbl version " ELF2CFETBL_MAJOR_VERSION "." ELF2CFETBL_MINOR_VERSION \
"." ELF2CFETBL_REVISION)

#else /* CFS_RELEASE_BUILD */

#define ELF2CFETBL_VERSION_STRING \
("elf2cfetbl DEVELOPMENT BUILD " ELF2CFETBL_BASELINE "+dev" ELF2CFETBL_BUILDNUMBER \
" " ELF2CFETBL_CODENAME)

#endif /* CFS_RELEASE_BUILD */

#endif /* ELF2CFETBL_VERSION_H */

0 comments on commit 90cd360

Please sign in to comment.