diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2017-01-23 10:28:55 +0100 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2017-01-23 20:33:06 +0100 |
commit | 47349482ee7b737c3cd2a8a1acb18fc3d9b95b0a (patch) | |
tree | d4fb09d11b2998124032c7d1be70841cc42a9df1 /Makefile.am | |
parent | 31a21cc0187ceea70a826010476eb260823c5a45 (diff) |
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 <ralf@linux-mips.org>
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 11 |
1 files changed, 11 insertions, 0 deletions
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 |