0002-Makefile-allow-to-override-the-version.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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
  5. The mk-version script makes the assumption that the build process runs
  6. from a SVN checkout or a Git clone of the vpnc source code. However,
  7. this is not always the case, for example when you are building from a
  8. tarball, but inside a larger project that is versioned with Git.
  9. This is typically the case when building vpnc under a tool like
  10. Buildroot, or potentially other embedded Linux build system: the build
  11. system tool itself is versioned in Git, downloads tarballs of software
  12. components and builds them.
  13. In order to support such situations, this commit adjusts the Makefile
  14. to allow the VERSION variable to be overriden from the make command
  15. line.
  16. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  17. ---
  18. Makefile | 2 +-
  19. 1 file changed, 1 insertion(+), 1 deletion(-)
  20. diff --git a/Makefile b/Makefile
  21. index f9a6781..e80ef17 100644
  22. --- a/Makefile
  23. +++ b/Makefile
  24. @@ -57,7 +57,7 @@ OBJS = $(addsuffix .o,$(basename $(SRCS)))
  25. CRYPTO_OBJS = $(addsuffix .o,$(basename $(CRYPTO_SRCS)))
  26. BINOBJS = $(addsuffix .o,$(BINS))
  27. BINSRCS = $(addsuffix .c,$(BINS))
  28. -VERSION := $(shell sh mk-version)
  29. +VERSION ?= $(shell sh mk-version)
  30. RELEASE_VERSION := $(shell cat VERSION)
  31. CC ?= gcc
  32. --
  33. 2.6.4