1From 8b035de4867db4fb8da41298224d92bf5b18e86f Mon Sep 17 00:00:00 2001 2From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> 3Date: Wed, 10 Feb 2016 23:27:30 +0100 4Subject: [PATCH] Makefile: allow to override the version 5 6The mk-version script makes the assumption that the build process runs 7from a SVN checkout or a Git clone of the vpnc source code. However, 8this is not always the case, for example when you are building from a 9tarball, but inside a larger project that is versioned with Git. 10 11This is typically the case when building vpnc under a tool like 12Buildroot, or potentially other embedded Linux build system: the build 13system tool itself is versioned in Git, downloads tarballs of software 14components and builds them. 15 16In order to support such situations, this commit adjusts the Makefile 17to allow the VERSION variable to be overriden from the make command 18line. 19 20Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> 21--- 22 23 Makefile | 2 +- 24 1 file changed, 1 insertion(+), 1 deletion(-) 25 26diff --git a/Makefile b/Makefile 27index f9a6781..e80ef17 100644 28--- a/Makefile 29+++ b/Makefile 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) 37 38 CC ?= gcc 39-- 402.6.4 41 42