Skip to content

Commit 7135fb9

Browse files
aap-scen-sc
authored andcommitted
[syntacore] do not use guess-rev.sh to determine the version
Change-Id: I42ea6424af326e3ef2a5a7dc590eee3557746ad2
1 parent 4bd05ed commit 7135fb9

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

configure.ac

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,15 @@ AS_IF([test -x "$srcdir/guess-rev.sh"], [
110110
])
111111
AC_MSG_RESULT([$build_release])
112112

113+
# Syntacore has it's own rules for release processing
114+
AC_MSG_CHECKING([whether to build a release for Syntacore])
115+
AS_IF([test -r "$srcdir/__sc_version.txt"], [
116+
build_syntacore_release=yes
117+
], [
118+
build_syntacore_release=no
119+
])
120+
AC_MSG_RESULT([$build_syntacore_release])
121+
113122
# Adapter drivers
114123
# 1st column -- Basename for the configure option generated with AC_ARG_ENABLE.
115124
# For example, "buspirate" generates options "--enable-buspirate[=yes/no]"
@@ -746,6 +755,7 @@ AS_IF([test "x$enable_esp_usb_jtag" != "xno"], [
746755
])
747756

748757
AM_CONDITIONAL([RELEASE], [test "x$build_release" = "xyes"])
758+
AM_CONDITIONAL([SYNTACORE_RELEASE], [test "x$build_syntacore_release" = "xyes"])
749759
AM_CONDITIONAL([PARPORT], [test "x$build_parport" = "xyes"])
750760
AM_CONDITIONAL([GIVEIO], [test "x$parport_use_giveio" = "xyes"])
751761
AM_CONDITIONAL([EP93XX], [test "x$build_ep93xx" = "xyes"])

src/Makefile.am

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ endif
2222

2323
%C%_libopenocd_la_CPPFLAGS =
2424

25+
# this is Syntacore-specific code
26+
if SYNTACORE_RELEASE
27+
%C%_libopenocd_la_CPPFLAGS += -DRELSTR=\"-`head -1 $(top_srcdir)/__sc_version.txt`\"
28+
%C%_libopenocd_la_CPPFLAGS += -DGITVERSION=\"`tail -1 $(top_srcdir)/__sc_version.txt`\"
29+
%C%_libopenocd_la_CPPFLAGS += -DPKGBLDDATE=\"`date +%F-%R`\"
30+
else
2531
# banner output includes RELSTR appended to $VERSION from the configure script
2632
# guess-rev.sh returns either a repository version ID or "-snapshot"
2733
if RELEASE
@@ -32,6 +38,7 @@ else
3238
%C%_libopenocd_la_CPPFLAGS += -DGITVERSION=\"`cd $(top_srcdir) && git describe`\"
3339
%C%_libopenocd_la_CPPFLAGS += -DPKGBLDDATE=\"`date +%F-%R`\"
3440
endif
41+
endif
3542

3643
# add default CPPFLAGS
3744
%C%_libopenocd_la_CPPFLAGS += $(AM_CPPFLAGS) $(CPPFLAGS)

0 commit comments

Comments
 (0)