Archived
14
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
asterisk/build_tools/make_version_c
russell d5b06adda9 Rename version.h to ast_version.h. Next, I will be re-adding version.h as an
automatically generated file like it used to be.  This still needs to be there
for modules that have to check it to compile against multiple asterisk versions.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@104244 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-26 20:02:14 +00:00

34 lines
560 B
Bash
Executable file

#!/bin/sh
if [ ! -f ../.flavor ]; then
EXTRA=""
else
aadkver=`cat ../.version`
aadkflavor=`cat ../.flavor`
EXTRA=" (${aadkflavor} ${aadkver})"
fi
cat << END
/*
* version.c
* Automatically generated
*/
#include "asterisk.h"
#include "asterisk/ast_version.h"
static const char asterisk_version[] = "${ASTERISKVERSION}${EXTRA}";
static const char asterisk_version_num[] = "${ASTERISKVERSIONNUM}";
const char *ast_get_version(void)
{
return asterisk_version;
}
const char *ast_get_version_num(void)
{
return asterisk_version_num;
}
END