version stuff
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@299 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
df6e1cf2ba
commit
b93b22e318
11
Makefile.am
11
Makefile.am
|
@ -33,7 +33,7 @@ AM_CFLAGS += -DSWITCH_MOD_DIR=\"$(PREFIX)/mod\"
|
|||
AM_CFLAGS += -DSWITCH_PREFIX_DIR=\"$(PREFIX)\"
|
||||
AM_CFLAGS += -DSWITCH_CONF_DIR=\"$(PREFIX)/conf\"
|
||||
AM_CFLAGS += -DSWITCH_DB_DIR=\"$(PREFIX)/db\"
|
||||
AM_CFLAGS += -DSWITCH_SVN_VERSION=\"$(shell svnversion . -n || echo 'get svn' )\"
|
||||
|
||||
|
||||
libfreeswitch_la_SOURCES = \
|
||||
src/include/switch.h \
|
||||
|
@ -92,7 +92,16 @@ bin_PROGRAMS = freeswitch
|
|||
freeswitch_SOURCES = src/switch.c
|
||||
freeswitch_CFLAGS = $(AM_CFLAGS)
|
||||
freeswitch_LDFLAGS = -lfreeswitch
|
||||
nodist_freeswitch_SOURCES = src/include/switch_version.h
|
||||
BUILT_SOURCES = version
|
||||
CLEANFILES = src/include/switch_version.h
|
||||
|
||||
version: Makefile
|
||||
./checkversion.sh
|
||||
|
||||
newversion: Makefile
|
||||
./checkversion.sh force
|
||||
$(MAKE)
|
||||
|
||||
.nodepends:
|
||||
touch .nodepends
|
||||
|
|
32
Makefile.in
32
Makefile.in
|
@ -83,7 +83,9 @@ libfreeswitch_la_OBJECTS = $(am_libfreeswitch_la_OBJECTS)
|
|||
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
am_freeswitch_OBJECTS = freeswitch-switch.$(OBJEXT)
|
||||
freeswitch_OBJECTS = $(am_freeswitch_OBJECTS)
|
||||
nodist_freeswitch_OBJECTS =
|
||||
freeswitch_OBJECTS = $(am_freeswitch_OBJECTS) \
|
||||
$(nodist_freeswitch_OBJECTS)
|
||||
freeswitch_LDADD = $(LDADD)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/include
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
|
@ -96,7 +98,8 @@ LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
|
|||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(libfreeswitch_la_SOURCES) $(freeswitch_SOURCES)
|
||||
SOURCES = $(libfreeswitch_la_SOURCES) $(freeswitch_SOURCES) \
|
||||
$(nodist_freeswitch_SOURCES)
|
||||
DIST_SOURCES = $(libfreeswitch_la_SOURCES) $(freeswitch_SOURCES)
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
|
@ -236,9 +239,7 @@ AM_CFLAGS = $(shell $(APR_CONFIG) --cflags --cppflags --includes) \
|
|||
-I$(PREFIX)/include -DSWITCH_MOD_DIR=\"$(PREFIX)/mod\" \
|
||||
-DSWITCH_PREFIX_DIR=\"$(PREFIX)\" \
|
||||
-DSWITCH_CONF_DIR=\"$(PREFIX)/conf\" \
|
||||
-DSWITCH_DB_DIR=\"$(PREFIX)/db\" \
|
||||
-DSWITCH_SVN_VERSION=\"$(shell svnversion . -n || echo 'get \
|
||||
svn' )\"
|
||||
-DSWITCH_DB_DIR=\"$(PREFIX)/db\"
|
||||
AM_LDFLAGS = $(shell $(APR_CONFIG) --link-ld --libs ) $(shell \
|
||||
$(APU_CONFIG) --link-ld --libs ) -lsqlite3 -lresample -lm \
|
||||
$(am__append_1)
|
||||
|
@ -298,7 +299,11 @@ libfreeswitch_la_LDFLAGS = -version-info 1:0:0
|
|||
freeswitch_SOURCES = src/switch.c
|
||||
freeswitch_CFLAGS = $(AM_CFLAGS)
|
||||
freeswitch_LDFLAGS = -lfreeswitch
|
||||
all: all-recursive
|
||||
nodist_freeswitch_SOURCES = src/include/switch_version.h
|
||||
BUILT_SOURCES = version
|
||||
CLEANFILES = src/include/switch_version.h
|
||||
all: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
|
@ -848,7 +853,8 @@ distcleancheck: distclean
|
|||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
check: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) check-recursive
|
||||
all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS)
|
||||
install-binPROGRAMS: install-libLTLIBRARIES
|
||||
|
||||
|
@ -857,7 +863,8 @@ installdirs-am:
|
|||
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(library_includedir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-recursive
|
||||
install: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
@ -874,6 +881,7 @@ install-strip:
|
|||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
@ -881,6 +889,7 @@ distclean-generic:
|
|||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \
|
||||
|
@ -959,6 +968,13 @@ uninstall-info: uninstall-info-recursive
|
|||
uninstall-libLTLIBRARIES uninstall-library_includeHEADERS
|
||||
|
||||
|
||||
version: Makefile
|
||||
./checkversion.sh
|
||||
|
||||
newversion: Makefile
|
||||
./checkversion.sh force
|
||||
$(MAKE)
|
||||
|
||||
.nodepends:
|
||||
touch .nodepends
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@ extern "C" {
|
|||
|
||||
#include <assert.h>
|
||||
|
||||
#include <switch_version.h>
|
||||
#include <switch_platform.h>
|
||||
#include <switch_apr.h>
|
||||
#include <switch_sqlite.h>
|
||||
|
|
|
@ -37,10 +37,10 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define FREESWITCH_VERSION_MAJOR 1
|
||||
#define FREESWITCH_VERSION_MINOR 0
|
||||
#define FREESWITCH_VERSION_REVISION @SVN_VERSION@
|
||||
#define FREESWITCH_VERSION_FULL FREESWITCH_VERSION_MAJOR.FREESWITCH_VERSION_MINOR.FREESWITCH_VERSION_REVISION
|
||||
#define SWITCH_VERSION_MAJOR "1"
|
||||
#define SWITCH_VERSION_MINOR "0"
|
||||
#define SWITCH_VERSION_REVISION "@SVN_VERSION@"
|
||||
#define SWITCH_VERSION_FULL SWITCH_VERSION_MAJOR "." SWITCH_VERSION_MINOR "." SWITCH_VERSION_REVISION
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ int main(int argc, char *argv[]) {
|
|||
switch_event_fire(&event);
|
||||
}
|
||||
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "freeswitch Version %s Started\n\n", SWITCH_SVN_VERSION);
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "freeswitch Version %s Started\n\n", SWITCH_VERSION_FULL);
|
||||
|
||||
/* wait for console input */
|
||||
switch_console_loop();
|
||||
|
|
|
@ -46,10 +46,15 @@ static int switch_console_process(char *cmd)
|
|||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Bye!\n");
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(cmd, "version")) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Version %s\n", SWITCH_VERSION_FULL);
|
||||
return 1;
|
||||
}
|
||||
if (!strcmp(cmd, "help")) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE,
|
||||
"\n"
|
||||
"Valid Commands:\n\n"
|
||||
"version\n"
|
||||
"help - umm yeah..\n"
|
||||
"%sshutdown - stop the program\n\n",
|
||||
perlhelp
|
||||
|
|
Loading…
Reference in New Issue