]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
modify how we build switch_version.h so we can better handle releases
authorMichael Jerris <mike@jerris.com>
Sun, 19 Aug 2007 05:01:08 +0000 (05:01 +0000)
committerMichael Jerris <mike@jerris.com>
Sun, 19 Aug 2007 05:01:08 +0000 (05:01 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5610 d0543943-73ff-0310-b7d9-9358b9ac24b2

Makefile.am
configure.in
src/include/switch_version.h.template [moved from src/include/switch_version.h.in with 85% similarity]
w32/Library/FreeSwitchCore.vcproj

index 79914e18ba5b5e86d55b51bc77eee43d055d8c96..4e40f63fb8cec176791d300a64bef71c2094942f 100644 (file)
@@ -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 ; \
-       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:
index adb6d80b70f69c3c712722c72223a513658b6837..c10f687d3077483ac934dd529912c48f69c9a32e 100644 (file)
@@ -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])
similarity index 85%
rename from src/include/switch_version.h.in
rename to src/include/switch_version.h.template
index b2ef7135858ef13a41735d0987017db97ce6e80b..c7511487d424a8452cc12fbc9cc7b7b4e37584d5 100644 (file)
 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
index f79719a8399d0b8958a1c1b929058abeb86fe99b..cdcf9ba837ff716b3167d721ab4354e5d08cb5e8 100644 (file)
                        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 &quot;$(ProjectDir)..\..\libs\win32\util.vbs&quot; Version  &quot;$(ProjectDir)&quot; &quot;$(ProjectDir)..\..\&quot; &quot;$(ProjectDir)..\..\src\include\switch_version.h.in&quot; &quot;$(ProjectDir)..\..\src\include\switch_version.h&quot;&#x0D;&#x0A;"\r
+                                               CommandLine="cscript /nologo &quot;$(ProjectDir)..\..\libs\win32\util.vbs&quot; Version  &quot;$(ProjectDir)&quot; &quot;$(ProjectDir)..\..\&quot; &quot;$(ProjectDir)..\..\src\include\switch_version.h.template&quot; &quot;$(ProjectDir)..\..\src\include\switch_version.h&quot;&#x0D;&#x0A;"\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 &quot;$(ProjectDir)..\..\libs\win32\util.vbs&quot; Version  &quot;$(ProjectDir)&quot; &quot;$(ProjectDir)..\..\&quot; &quot;$(ProjectDir)..\..\src\include\switch_version.h.in&quot; &quot;$(ProjectDir)..\..\src\include\switch_version.h&quot;&#x0D;&#x0A;"\r
+                                               CommandLine="cscript /nologo &quot;$(ProjectDir)..\..\libs\win32\util.vbs&quot; Version  &quot;$(ProjectDir)&quot; &quot;$(ProjectDir)..\..\&quot; &quot;$(ProjectDir)..\..\src\include\switch_version.h.template&quot; &quot;$(ProjectDir)..\..\src\include\switch_version.h&quot;&#x0D;&#x0A;"\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