Skip to content

Commit

Permalink
Include version.c from build dir in preference to source dir
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Nov 8, 2012
1 parent fa5760a commit 3db71d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.c
Expand Up @@ -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;
Expand Down

0 comments on commit 3db71d9

Please sign in to comment.