File tree Expand file tree Collapse file tree 2 files changed +8
-18
lines changed Expand file tree Collapse file tree 2 files changed +8
-18
lines changed Original file line number Diff line number Diff line change @@ -110,15 +110,6 @@ AS_IF([test -x "$srcdir/guess-rev.sh"], [
110110] )
111111AC_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-
122113# Adapter drivers
123114# 1st column -- Basename for the configure option generated with AC_ARG_ENABLE.
124115# For example, "buspirate" generates options "--enable-buspirate[=yes/no]"
Original file line number Diff line number Diff line change @@ -22,23 +22,22 @@ 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
3125# banner output includes RELSTR appended to $VERSION from the configure script
3226# guess-rev.sh returns either a repository version ID or "-snapshot"
3327if RELEASE
3428%C%_libopenocd_la_CPPFLAGS += -DRELSTR=\"\"
3529%C%_libopenocd_la_CPPFLAGS += -DGITVERSION=\"\"
3630else
37- %C%_libopenocd_la_CPPFLAGS += -DRELSTR=\"` $( top_srcdir) /guess-rev.sh $( top_srcdir) ` \"
38- %C%_libopenocd_la_CPPFLAGS += -DGITVERSION=\"` cd $( top_srcdir) && git describe ` \"
31+ mpy_hints_path = $(top_builddir ) /makepy_hints.json
32+ get_version = "import json; print(json.load(open('$(mpy_hints_path ) '))['version'])"
33+ branch = $$(python -c $(get_version ) | cut -d'+' -f2- | tr -c '[:alnum:]\n' _ )
34+ revision = $$(git -C $(top_srcdir ) rev-parse HEAD | head -c 8 )
35+ maybe_dirty = $$([ -z "$$(git status --untracked-files=no --porcelain ) " ] || echo -dirty )
36+ %C%_libopenocd_la_CPPFLAGS += -DRELSTR=\"-$(branch ) -g$(revision )$(maybe_dirty ) \"
37+ riscv_base = $$(git -C $(top_srcdir ) merge-base origin/riscv HEAD | head -c 8 )
38+ %C%_libopenocd_la_CPPFLAGS += -DGITVERSION=\"riscv-upstream-$(riscv_base ) -cs-$(revision )$(maybe_dirty ) \"
3939%C%_libopenocd_la_CPPFLAGS += -DPKGBLDDATE=\"` date +%F-%R ` \"
4040endif
41- endif
4241
4342# add default CPPFLAGS
4443%C%_libopenocd_la_CPPFLAGS += $(AM_CPPFLAGS ) $(CPPFLAGS )
You can’t perform that action at this time.
0 commit comments