From 505d4633cd7a4e8623ef70932cd7edc9f22e71d4 Mon Sep 17 00:00:00 2001 From: Øyvind Harboe Date: Fri, 10 Sep 2010 13:16:13 +0200 Subject: version command: make it scriptable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit you can now set a variable in a script like set version [version]. Also version takes an optional argument "git" to show git version of source. If git is not installed during the build, then this will yield an error that is ignored during the build and "version git" returns an empty string. Signed-off-by: Øyvind Harboe --- src/Makefile.am | 1 + 1 file changed, 1 insertion(+) (limited to 'src/Makefile.am') diff --git a/src/Makefile.am b/src/Makefile.am index a566b4d4..56385f7e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -44,6 +44,7 @@ libopenocd_la_CPPFLAGS += -DRELSTR=\"\" else libopenocd_la_CPPFLAGS += -DRELSTR=\"`$(top_srcdir)/guess-rev.sh $(top_srcdir)`\" endif +libopenocd_la_CPPFLAGS += -DGITVERSION=\"`cd $(top_srcdir) && git describe`\" # add default CPPFLAGS libopenocd_la_CPPFLAGS += $(AM_CPPFLAGS) $(CPPFLAGS) -- cgit v1.2.3