[commit] r5610 - in freeswitch/trunk: . src/include w32/Library
Author: mikej Date: Sun Aug 19 01:01:08 2007 New Revision: 5610 Added: freeswitch/trunk/src/include/switch_version.h.template Removed: freeswitch/trunk/src/include/switch_version.h.in Modified: freeswitch/trunk/Makefile.am freeswitch/trunk/configure.in freeswitch/trunk/w32/Library/FreeSwitchCore.vcproj Log: modify how we build switch_version.h so we can better handle releases Modified: freeswitch/trunk/Makefile.am ============================================================================== --- freeswitch/trunk/Makefile.am (original) +++ freeswitch/trunk/Makefile.am Sun Aug 19 01:01:08 2007 @@ -161,13 +161,20 @@ 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: Modified: freeswitch/trunk/configure.in ============================================================================== --- freeswitch/trunk/configure.in (original) +++ freeswitch/trunk/configure.in Sun Aug 19 01:01:08 2007 @@ -1,8 +1,16 @@ # -*- 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]) Added: freeswitch/trunk/src/include/switch_version.h.template ============================================================================== --- (empty file) +++ freeswitch/trunk/src/include/switch_version.h.template Sun Aug 19 01:01:08 2007 @@ -0,0 +1,50 @@ +/* + * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com> + * + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * + * The Initial Developer of the Original Code is + * Anthony Minessale II <anthmct@yahoo.com> + * Portions created by the Initial Developer are Copyright (C) + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Anthony Minessale II <anthmct@yahoo.com> + * Michael Jerris <mike@jerris.com> + * + * switch_version.h -- Version Number Header + * + */ + +#ifndef SWITCH_VERSION_H +#define SWITCH_VERSION_H + +#ifdef __cplusplus +extern "C" { +#endif + +#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 +} +#endif + +#endif Modified: freeswitch/trunk/w32/Library/FreeSwitchCore.vcproj ============================================================================== --- freeswitch/trunk/w32/Library/FreeSwitchCore.vcproj (original) +++ freeswitch/trunk/w32/Library/FreeSwitchCore.vcproj Sun Aug 19 01:01:08 2007 @@ -576,7 +576,7 @@ Name="Generated Header Files" > <File - RelativePath="..\..\src\include\switch_am_config.h.in" + RelativePath="..\..\src\include\switch_am_config.h.template" > <FileConfiguration Name="Debug|Win32" @@ -596,7 +596,7 @@ </FileConfiguration> </File> <File - RelativePath="..\..\src\include\switch_version.h.in" + RelativePath="..\..\src\include\switch_version.h.template" > <FileConfiguration Name="Debug|Win32" @@ -604,7 +604,7 @@ <Tool Name="VCCustomBuildTool" Description="Generating switch_version.h" - CommandLine="cscript /nologo "$(ProjectDir)..\..\libs\win32\util.vbs" Version "$(ProjectDir)" "$(ProjectDir)..\..\" "$(ProjectDir)..\..\src\include\switch_version.h.in" "$(ProjectDir)..\..\src\include\switch_version.h" " + CommandLine="cscript /nologo "$(ProjectDir)..\..\libs\win32\util.vbs" Version "$(ProjectDir)" "$(ProjectDir)..\..\" "$(ProjectDir)..\..\src\include\switch_version.h.template" "$(ProjectDir)..\..\src\include\switch_version.h" " 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" Outputs="..\..\src\include\switch_version.h;lastversion" /> @@ -615,7 +615,7 @@ <Tool Name="VCCustomBuildTool" Description="Generating switch_version.h" - CommandLine="cscript /nologo "$(ProjectDir)..\..\libs\win32\util.vbs" Version "$(ProjectDir)" "$(ProjectDir)..\..\" "$(ProjectDir)..\..\src\include\switch_version.h.in" "$(ProjectDir)..\..\src\include\switch_version.h" " + CommandLine="cscript /nologo "$(ProjectDir)..\..\libs\win32\util.vbs" Version "$(ProjectDir)" "$(ProjectDir)..\..\" "$(ProjectDir)..\..\src\include\switch_version.h.template" "$(ProjectDir)..\..\src\include\switch_version.h" " 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" Outputs="..\..\src\include\switch_version.h;lastversion" />
participants (1)
-
Freeswitch SVN