]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
gsmopen: reporting git version of files in logging
authorGiovanni Maruzzelli <gmaruzz@gmail.com>
Fri, 20 Apr 2012 08:23:50 +0000 (10:23 +0200)
committerGiovanni Maruzzelli <gmaruzz@gmail.com>
Fri, 20 Apr 2012 08:23:50 +0000 (10:23 +0200)
src/mod/endpoints/mod_gsmopen/Makefile
src/mod/endpoints/mod_gsmopen/Makefile.am
src/mod/endpoints/mod_gsmopen/gsmopen.h

index bf1920aa6f5b607d12d58742c37242327c282082..18823eb4ca6929b00f1ebaad3424c41e17bd55d6 100644 (file)
@@ -1,6 +1,5 @@
 MODNAME=mod_gsmopen
-SVNDEF := -D'GSMOPEN_SVN_VERSION="$(shell svnversion -n .)"'
-LOCAL_CFLAGS += $(SVNDEF) -I../../../../libs/spandsp/src -I../../../..//libs/tiff-3.8.2/libtiff
+LOCAL_CFLAGS += -I../../../../libs/spandsp/src -I../../../..//libs/tiff-3.8.2/libtiff -DGSMOPEN_C_VER=\"`git log -1 --format="%h" gsmopen_protocol.cpp`\" -DMODGSMOPEN_C_VER=\"`git log -1 --format="%h" mod_gsmopen.cpp`\"
 LOCAL_LDFLAGS=-L../../../../libs/spandsp/src -lspandsp -lctb-0.16 -lgsmme
 LOCAL_OBJS=gsmopen_protocol.o
 include ../../../../build/modmake.rules
index cef21e9871ca8c387f02fb99c65225597e9feb5d..749d04896c5c9d6e5c021289f9f0649a8c59849f 100644 (file)
@@ -11,7 +11,7 @@ SPANDSP_LA=$(SPANDSP_BUILDDIR)/src/libspandsp.la
 
 mod_LTLIBRARIES = mod_gsmopen.la
 mod_gsmopen_la_SOURCES  = mod_gsmopen.cpp gsmopen_protocol.cpp 
-mod_gsmopen_la_CFLAGS   = $(AM_CFLAGS) -I$(SPANDSP_DIR)/src -I$(TIFF_DIR)/libtiff -I$(SPANDSP_BUILDDIR)/src -I$(TIFF_BUILDDIR)/libtiff -I. -DGSMOPEN_SVN_VERSION=\"`cat $(switch_builddir)/.version`\"
+mod_gsmopen_la_CFLAGS   = $(AM_CFLAGS) -I$(SPANDSP_DIR)/src -I$(TIFF_DIR)/libtiff -I$(SPANDSP_BUILDDIR)/src -I$(TIFF_BUILDDIR)/libtiff -I. -DGSMOPEN_C_VER=\"`git log -1 --format="%h" gsmopen_protocol.cpp`\" -DMODGSMOPEN_C_VER=\"`git log -1 --format="%h" mod_gsmopen.cpp`\"
 mod_gsmopen_la_LIBADD   = $(switch_builddir)/libfreeswitch.la $(SPANDSP_LA) $(TIFF_LA)
 mod_gsmopen_la_LDFLAGS  = -avoid-version -module -no-undefined -lctb-0.16 -lgsmme
 
index 1c959a57ecac595a2b3c8ff548382c6ecc102c70..c2e450147ff5aefa5e2e39038fdb5d54b7905aba 100644 (file)
 //#define SAMPLERATE_GSMOPEN 16000
 //#define SAMPLES_PER_FRAME SAMPLERATE_GSMOPEN/50
 
+#ifdef GSMOPEN_C_VER
+#ifdef MODGSMOPEN_C_VER
+#define GSMOPEN_SVN_VERSION MODGSMOPEN_C_VER"|"GSMOPEN_C_VER
+#endif
+#endif
+
 #ifndef GSMOPEN_SVN_VERSION
 #define GSMOPEN_SVN_VERSION SWITCH_VERSION_REVISION
 #endif /* GSMOPEN_SVN_VERSION */