stop recompiling cli.c on every 'make'

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6963 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2005-11-05 18:58:27 +00:00
parent c103bc7806
commit da0d0f975a
5 changed files with 82 additions and 44 deletions

16
cli.c
View File

@@ -47,11 +47,14 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "editline/readline/readline.h"
/* For module directory */
#include "asterisk/version.h"
#include "asterisk/build.h"
#define VERSION_INFO "Asterisk " ASTERISK_VERSION " built by " BUILD_USER "@" BUILD_HOSTNAME \
" on a " BUILD_MACHINE " running " BUILD_OS " on " BUILD_DATE
extern const char *ast_build_hostname;
extern const char *ast_build_kernel;
extern const char *ast_build_machine;
extern const char *ast_build_os;
extern const char *ast_build_date;
extern const char *ast_build_user;
extern unsigned long global_fin, global_fout;
void ast_cli(int fd, char *fmt, ...)
@@ -407,9 +410,12 @@ static int handle_version(int fd, int argc, char *argv[])
{
if (argc != 2)
return RESULT_SHOWUSAGE;
ast_cli(fd, "%s\n", VERSION_INFO);
ast_cli(fd, "Asterisk %s built by %s @ %s on a %s running %s on %s\n",
ASTERISK_VERSION, ast_build_user, ast_build_hostname,
ast_build_machine, ast_build_os, ast_build_date);
return RESULT_SUCCESS;
}
static int handle_chanlist(int fd, int argc, char *argv[])
{
#define FORMAT_STRING "%-20.20s %-20.20s %-7.7s %-30.30s\n"