modify how we build switch_version.h so we can better handle releases
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5610 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
3887a1813e
commit
8ef2aa54c0
13
Makefile.am
13
Makefile.am
|
@ -161,13 +161,20 @@ install-data-local:
|
|||
touch .version
|
||||
|
||||
src/include/switch_version.h: $(top_srcdir)/src/include/switch_version.h.in .version $(libfreeswitch_la_SOURCES) $(library_include_HEADERS)
|
||||
@force=0 ; \
|
||||
@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"` ; \
|
||||
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 ; \
|
||||
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:
|
||||
|
|
10
configure.in
10
configure.in
|
@ -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])
|
||||
|
|
|
@ -37,10 +37,10 @@
|
|||
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
|
|
@ -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"
|
||||
/>
|
||||
|
|
Loading…
Reference in New Issue