]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
Include version.c from build dir in preference to source dir
authorDavid Woodhouse <David.Woodhouse@intel.com>
Thu, 8 Nov 2012 13:31:23 +0000 (13:31 +0000)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Thu, 8 Nov 2012 13:31:25 +0000 (13:31 +0000)
This should fix out-of-source-tree builds from a tarball, which
otherwise would use the autogenerated $(objdir)/version.c for building
the library, but the pre-packaged $(srcdir)/version.c for the
executable. This is because the latter was included directly from main.c
by #include "version.c". By changing to #include <main.c> instead, we get
to use the new auto-generated one instead if anything's been changed.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
main.c

diff --git a/main.c b/main.c
index 40da65197468680ad71d37c2072f712176e0dba0..258932fbc494c23795912a763e57b1a6b4308e78 100644 (file)
--- a/main.c
+++ b/main.c
@@ -72,7 +72,7 @@ static void init_stoken(struct openconnect_info *vpninfo,
 /* A sanity check that the openconnect executable is running against a
    library of the same version */
 #define openconnect_version_str openconnect_binary_version
-#include "version.c"
+#include <version.c>
 #undef openconnect_version_str
 
 int verbose = PRG_INFO;