THRIFT-1438: lib/cpp/src/windows/config.h should read version from configure.ac rathe...
authorJake Farrell <jfarrell@apache.org>
Fri, 22 Jun 2012 03:51:38 +0000 (03:51 +0000)
committerJake Farrell <jfarrell@apache.org>
Fri, 22 Jun 2012 03:51:38 +0000 (03:51 +0000)
Client: compiler
Patch: Jake Farrell

Converts compiler/cpp/src/windows/version.h to a template and automates uses of configure.ac version rather than a random #define version string.

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1352767 13f79535-47bb-0310-9956-ffa450edef68

compiler/cpp/Makefile.am
compiler/cpp/src/windows/version.h.in [moved from compiler/cpp/src/windows/version.h with 96% similarity]
configure.ac

index b7d1b50..391f35d 100644 (file)
@@ -105,6 +105,6 @@ EXTRA_DIST = \
              $(WINDOWS_DIST)
 
 clean-local:
-       $(RM) thriftl.cc thrifty.cc thrifty.h version.h
+       $(RM) thriftl.cc thrifty.cc thrifty.h version.h windows/version.h
 
 src/main.cc: version.h
similarity index 96%
rename from compiler/cpp/src/windows/version.h
rename to compiler/cpp/src/windows/version.h.in
index 9e681d5..94b7c56 100644 (file)
@@ -29,7 +29,7 @@
 #endif
 
 #define PATH_MAX MAX_PATH
-#define THRIFT_VERSION "0.9.0-dev"
+#define THRIFT_VERSION "@PACKAGE_VERSION@"
 
 #ifndef S_ISDIR
 #define S_ISDIR(mode)  (((mode) & S_IFMT) == S_IFDIR)
index 6855f35..e595447 100755 (executable)
@@ -574,6 +574,7 @@ AC_CONFIG_FILES([
   Makefile
   compiler/cpp/Makefile
   compiler/cpp/version.h
+  compiler/cpp/src/windows/version.h
   lib/Makefile
   lib/cpp/Makefile
   lib/cpp/test/Makefile