touch .version
src/include/switch_version.h: $(top_srcdir)/src/include/switch_version.h.in .version $(libfreeswitch_la_SOURCES) $(library_include_HEADERS)
- @force=0 ; \
- version=`svnversion . -n || echo hacked` ; \
- oldversion=`cat .version 2>/dev/null || echo "0"` ; \
- test ! -f src/include/switch_version.h || grep "@SVN_VERSION@" src/include/switch_version.h && force=1 ; \
- if test "$$oldversion" != "$$version" || test $$force = 1 ; then \
- cat src/include/switch_version.h.in | sed "s/@SVN_VERSION@/$$version/g" > src/include/switch_version.h ; \
- echo $$version > .version ; \
+ @have_version=1 ; \
+ force=0 ; \
+ grep "@SWITCH_VERSION_REVISION@" src/include/switch_version.h.in > /dev/null && have_version=0 ; \
+ test ! -f src/include/switch_version.h || grep "@SWITCH_VERSION_REVISION@" src/include/switch_version.h > /dev/null && force=1 ; \
+ if test $$have_version = 1 ; then \
+ cat src/include/switch_version.h.in > src/include/switch_version.h ; \
+ touch .version ; \
+ else \
+ version=`svnversion . -n || echo hacked` ; \
+ oldversion=`cat .version 2>/dev/null || echo "0"` ; \
+ if test "$$oldversion" != "$$version" || test $$force = 1 ; then \
+ cat src/include/switch_version.h.in | sed "s/@SWITCH_VERSION_REVISION@/$$version/g" > src/include/switch_version.h ; \
+ echo $$version > .version ; \
+ fi ; \
fi ;
update:
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
+# Must change all of the below together
+# For a release, set revision for that tagged release as well and uncomment
+AC_INIT([freeswitch], [1.0.pre1], BUG-REPORT-ADDRESS)
+AC_SUBST(SWITCH_VERSION_MAJOR, [1])
+AC_SUBST(SWITCH_VERSION_MINOR, [0])
+AC_SUBST(SWITCH_VERSION_MICRO, [pre1])
+#AC_SUBST(SWITCH_VERSION_REVISION, [svn-revision-here])
+
+AC_CONFIG_FILES([src/include/switch_version.h.in:src/include/switch_version.h.template])
-AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
AC_CONFIG_AUX_DIR(build/config)
AM_INIT_AUTOMAKE(libfreeswitch,0.1)
AC_CONFIG_SRCDIR([src/switch.c])
extern "C" {
#endif
-#define SWITCH_VERSION_MAJOR "1"
-#define SWITCH_VERSION_MINOR "0"
-#define SWITCH_VERSION_MICRO "pre1"
-#define SWITCH_VERSION_REVISION "@SVN_VERSION@"
+#define SWITCH_VERSION_MAJOR "@SWITCH_VERSION_MAJOR@"
+#define SWITCH_VERSION_MINOR "@SWITCH_VERSION_MINOR@"
+#define SWITCH_VERSION_MICRO "@SWITCH_VERSION_MICRO@"
+#define SWITCH_VERSION_REVISION "@SWITCH_VERSION_REVISION@"
#define SWITCH_VERSION_FULL SWITCH_VERSION_MAJOR "." SWITCH_VERSION_MINOR "." SWITCH_VERSION_MICRO " (" SWITCH_VERSION_REVISION ")"
#ifdef __cplusplus
Name="Generated Header Files"\r
>\r
<File\r
- RelativePath="..\..\src\include\switch_am_config.h.in"\r
+ RelativePath="..\..\src\include\switch_am_config.h.template"\r
>\r
<FileConfiguration\r
Name="Debug|Win32"\r
</FileConfiguration>\r
</File>\r
<File\r
- RelativePath="..\..\src\include\switch_version.h.in"\r
+ RelativePath="..\..\src\include\switch_version.h.template"\r
>\r
<FileConfiguration\r
Name="Debug|Win32"\r
<Tool\r
Name="VCCustomBuildTool"\r
Description="Generating switch_version.h"\r
- CommandLine="cscript /nologo "$(ProjectDir)..\..\libs\win32\util.vbs" Version "$(ProjectDir)" "$(ProjectDir)..\..\" "$(ProjectDir)..\..\src\include\switch_version.h.in" "$(ProjectDir)..\..\src\include\switch_version.h"
"\r
+ CommandLine="cscript /nologo "$(ProjectDir)..\..\libs\win32\util.vbs" Version "$(ProjectDir)" "$(ProjectDir)..\..\" "$(ProjectDir)..\..\src\include\switch_version.h.template" "$(ProjectDir)..\..\src\include\switch_version.h"
"\r
AdditionalDependencies="..\..\src\include\switch.h;..\..\src\include\switch_apr.h;..\..\src\include\switch_buffer.h;..\..\src\include\switch_caller.h;..\..\src\include\switch_channel.h;..\..\src\include\switch_console.h;..\..\src\include\switch_core.h;..\..\src\include\switch_event.h;..\..\src\include\switch_frame.h;..\..\src\include\switch_ivr.h;..\..\src\include\switch_loadable_module.h;..\..\src\include\switch_log.h;..\..\src\include\switch_module_interfaces.h;..\..\src\include\switch_platform.h;..\..\src\include\switch_resample.h;..\..\src\include\switch_rtp.h;..\..\src\include\switch_sqlite.h;..\..\src\include\switch_stun.h;..\..\src\include\switch_types.h;..\..\src\include\switch_utils.h;..\..\src\include\switch_xml.h;..\..\src\switch_buffer.c;..\..\src\switch_caller.c;..\..\src\switch_channel.c;..\..\src\switch_config.c;..\..\src\switch_console.c;..\..\src\switch_core.c;..\..\src\switch_event.c;..\..\src\switch_ivr.c;..\..\src\switch_loadable_module.c;..\..\src\switch_log.c;..\..\src\switch_resample.c;..\..\src\switch_rtp.c;..\..\src\switch_stun.c;..\..\src\switch_utils.c;..\..\src\switch_xml.c"\r
Outputs="..\..\src\include\switch_version.h;lastversion"\r
/>\r
<Tool\r
Name="VCCustomBuildTool"\r
Description="Generating switch_version.h"\r
- CommandLine="cscript /nologo "$(ProjectDir)..\..\libs\win32\util.vbs" Version "$(ProjectDir)" "$(ProjectDir)..\..\" "$(ProjectDir)..\..\src\include\switch_version.h.in" "$(ProjectDir)..\..\src\include\switch_version.h"
"\r
+ CommandLine="cscript /nologo "$(ProjectDir)..\..\libs\win32\util.vbs" Version "$(ProjectDir)" "$(ProjectDir)..\..\" "$(ProjectDir)..\..\src\include\switch_version.h.template" "$(ProjectDir)..\..\src\include\switch_version.h"
"\r
AdditionalDependencies="..\..\src\include\switch.h;..\..\src\include\switch_apr.h;..\..\src\include\switch_buffer.h;..\..\src\include\switch_caller.h;..\..\src\include\switch_channel.h;..\..\src\include\switch_console.h;..\..\src\include\switch_core.h;..\..\src\include\switch_event.h;..\..\src\include\switch_frame.h;..\..\src\include\switch_ivr.h;..\..\src\include\switch_loadable_module.h;..\..\src\include\switch_log.h;..\..\src\include\switch_module_interfaces.h;..\..\src\include\switch_platform.h;..\..\src\include\switch_resample.h;..\..\src\include\switch_rtp.h;..\..\src\include\switch_sqlite.h;..\..\src\include\switch_stun.h;..\..\src\include\switch_types.h;..\..\src\include\switch_utils.h;..\..\src\include\switch_xml.h;..\..\src\switch_buffer.c;..\..\src\switch_caller.c;..\..\src\switch_channel.c;..\..\src\switch_config.c;..\..\src\switch_console.c;..\..\src\switch_core.c;..\..\src\switch_event.c;..\..\src\switch_ivr.c;..\..\src\switch_loadable_module.c;..\..\src\switch_log.c;..\..\src\switch_resample.c;..\..\src\switch_rtp.c;..\..\src\switch_stun.c;..\..\src\switch_utils.c;..\..\src\switch_xml.c"\r
Outputs="..\..\src\include\switch_version.h;lastversion"\r
/>\r