From 16b764196fcd3d01831c4c5bee75c899b4c25c6c Mon Sep 17 00:00:00 2001 From: Jake Farrell Date: Fri, 22 Jun 2012 03:51:38 +0000 Subject: [PATCH] THRIFT-1438: lib/cpp/src/windows/config.h should read version from configure.ac rather than a #define 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 | 2 +- compiler/cpp/src/windows/{version.h => version.h.in} | 2 +- configure.ac | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) rename compiler/cpp/src/windows/{version.h => version.h.in} (96%) diff --git a/compiler/cpp/Makefile.am b/compiler/cpp/Makefile.am index b7d1b504..391f35dd 100644 --- a/compiler/cpp/Makefile.am +++ b/compiler/cpp/Makefile.am @@ -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 diff --git a/compiler/cpp/src/windows/version.h b/compiler/cpp/src/windows/version.h.in similarity index 96% rename from compiler/cpp/src/windows/version.h rename to compiler/cpp/src/windows/version.h.in index 9e681d58..94b7c568 100644 --- a/compiler/cpp/src/windows/version.h +++ b/compiler/cpp/src/windows/version.h.in @@ -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) diff --git a/configure.ac b/configure.ac index 6855f35a..e595447d 100755 --- a/configure.ac +++ b/configure.ac @@ -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 -- 2.17.1