1 From 8b035de4867db4fb8da41298224d92bf5b18e86f Mon Sep 17 00:00:00 2001
2 From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 Date: Wed, 10 Feb 2016 23:27:30 +0100
4 Subject: [PATCH] Makefile: allow to override the version
6 The mk-version script makes the assumption that the build process runs
7 from a SVN checkout or a Git clone of the vpnc source code. However,
8 this is not always the case, for example when you are building from a
9 tarball, but inside a larger project that is versioned with Git.
11 This is typically the case when building vpnc under a tool like
12 Buildroot, or potentially other embedded Linux build system: the build
13 system tool itself is versioned in Git, downloads tarballs of software
14 components and builds them.
16 In order to support such situations, this commit adjusts the Makefile
17 to allow the VERSION variable to be overriden from the make command
20 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
24 1 file changed, 1 insertion(+), 1 deletion(-)
26 diff --git a/Makefile b/Makefile
27 index f9a6781..e80ef17 100644
30 @@ -57,7 +57,7 @@ OBJS = $(addsuffix .o,$(basename $(SRCS)))
31 CRYPTO_OBJS = $(addsuffix .o,$(basename $(CRYPTO_SRCS)))
32 BINOBJS = $(addsuffix .o,$(BINS))
33 BINSRCS = $(addsuffix .c,$(BINS))
34 -VERSION := $(shell sh mk-version)
35 +VERSION ?= $(shell sh mk-version)
36 RELEASE_VERSION := $(shell cat VERSION)