xref: /OK3568_Linux_fs/buildroot/package/vpnc/0002-Makefile-allow-to-override-the-version.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunFrom 8b035de4867db4fb8da41298224d92bf5b18e86f Mon Sep 17 00:00:00 2001
2*4882a593SmuzhiyunFrom: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3*4882a593SmuzhiyunDate: Wed, 10 Feb 2016 23:27:30 +0100
4*4882a593SmuzhiyunSubject: [PATCH] Makefile: allow to override the version
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunThe mk-version script makes the assumption that the build process runs
7*4882a593Smuzhiyunfrom a SVN checkout or a Git clone of the vpnc source code. However,
8*4882a593Smuzhiyunthis is not always the case, for example when you are building from a
9*4882a593Smuzhiyuntarball, but inside a larger project that is versioned with Git.
10*4882a593Smuzhiyun
11*4882a593SmuzhiyunThis is typically the case when building vpnc under a tool like
12*4882a593SmuzhiyunBuildroot, or potentially other embedded Linux build system: the build
13*4882a593Smuzhiyunsystem tool itself is versioned in Git, downloads tarballs of software
14*4882a593Smuzhiyuncomponents and builds them.
15*4882a593Smuzhiyun
16*4882a593SmuzhiyunIn order to support such situations, this commit adjusts the Makefile
17*4882a593Smuzhiyunto allow the VERSION variable to be overriden from the make command
18*4882a593Smuzhiyunline.
19*4882a593Smuzhiyun
20*4882a593SmuzhiyunSigned-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
21*4882a593Smuzhiyun---
22*4882a593Smuzhiyun
23*4882a593Smuzhiyun Makefile | 2 +-
24*4882a593Smuzhiyun 1 file changed, 1 insertion(+), 1 deletion(-)
25*4882a593Smuzhiyun
26*4882a593Smuzhiyundiff --git a/Makefile b/Makefile
27*4882a593Smuzhiyunindex f9a6781..e80ef17 100644
28*4882a593Smuzhiyun--- a/Makefile
29*4882a593Smuzhiyun+++ b/Makefile
30*4882a593Smuzhiyun@@ -57,7 +57,7 @@ OBJS = $(addsuffix .o,$(basename $(SRCS)))
31*4882a593Smuzhiyun CRYPTO_OBJS = $(addsuffix .o,$(basename $(CRYPTO_SRCS)))
32*4882a593Smuzhiyun BINOBJS = $(addsuffix .o,$(BINS))
33*4882a593Smuzhiyun BINSRCS = $(addsuffix .c,$(BINS))
34*4882a593Smuzhiyun-VERSION := $(shell sh mk-version)
35*4882a593Smuzhiyun+VERSION ?= $(shell sh mk-version)
36*4882a593Smuzhiyun RELEASE_VERSION := $(shell cat VERSION)
37*4882a593Smuzhiyun
38*4882a593Smuzhiyun CC ?= gcc
39*4882a593Smuzhiyun--
40*4882a593Smuzhiyun2.6.4
41*4882a593Smuzhiyun
42