From 47349482ee7b737c3cd2a8a1acb18fc3d9b95b0a Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Mon, 23 Jan 2017 10:28:55 +0100 Subject: Provide scm version define. This can be used by code to provide a more exact definition than a release version. Signed-off-by: Ralf Baechle --- Makefile.am | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 55c5745..514f16d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,3 +11,14 @@ AM_CPPFLAGS = -DAX25_SYSCONFDIR=\""$(sysconfdir)/ax25/"\" \ AX25_SYSCONFDIR=@sysconfdir@/ax25/ AX25_LOCALSTATEDIR=@localstatedir@/ax25/ + +BUILT_SOURCES = scm-version.h + +.PHONY: scm-version.h +scm-version.h: + sed -e 's/@RELEASE_VER@/@VERSION@/' \ + -e 's/@SCM_VER@/'$$(./setlocalversion)'/' \ + scm-version.h.in > scm-version.h.tmp && \ + (cmp -s scm-version.h.tmp scm-version.h 2>/dev/zero || \ + mv scm-version.h.tmp scm-version.h) + rm scm-version.h.tmp -- cgit v1.2.3