summaryrefslogtreecommitdiff
path: root/src/Makefile.am
diff options
context:
space:
mode:
authorØyvind Harboe <oyvind.harboe@zylin.com>2010-09-10 13:16:13 +0200
committerØyvind Harboe <oyvind.harboe@zylin.com>2010-09-11 11:42:44 +0200
commit505d4633cd7a4e8623ef70932cd7edc9f22e71d4 (patch)
treedba9ab3b67afb313437c7995eb8a18973b4bcde6 /src/Makefile.am
parentac86f4ccba49a671034a7607a7e14bc4b5e86ac6 (diff)
downloadopenocd+libswd-505d4633cd7a4e8623ef70932cd7edc9f22e71d4.tar.gz
openocd+libswd-505d4633cd7a4e8623ef70932cd7edc9f22e71d4.tar.bz2
openocd+libswd-505d4633cd7a4e8623ef70932cd7edc9f22e71d4.tar.xz
openocd+libswd-505d4633cd7a4e8623ef70932cd7edc9f22e71d4.zip
version command: make it scriptable
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 <oyvind.harboe@zylin.com>
Diffstat (limited to 'src/Makefile.am')
-rw-r--r--src/Makefile.am1
1 files changed, 1 insertions, 0 deletions
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)