adjust src-release following the renaming of gdb/common/ to gdb/gdbsupport/
authorJoel Brobecker <brobecker@adacore.com>
Sun, 14 Jul 2019 01:00:32 +0000 (18:00 -0700)
committerJoel Brobecker <brobecker@adacore.com>
Sun, 14 Jul 2019 01:00:32 +0000 (18:00 -0700)
A recent change renamed the common/ directory into gdbsupport/ in gdb.
This causes problems in the getver function in the src-release script
which doesn't find the create-version.sh script anymore. As a result,
it falls back on using the version.in file verbatim, meaning that
the "DATE" placeholder doesn't get replaced with the snapshot date,
and the "-git" suffix doesn't get stripped. More precisely, we get
snapshots called "gdb-8.3.50-DATE-git.tar" instead of (e.g.)
"gdb-8.3-20190712.tar".

This commit fixes the issue by adding support for this situation.
I left the support for $tool/common/create-version.sh, because
the sim still uses that directory structure.

ChangeLog:

        * src-release (getver): If $tool/gdbsupport/create-version.sh
        exists, use that to determine the version number.

ChangeLog
src-release.sh

index 1b7f8606279e3854bebf96dbb4cd993e469d0f17..52d97d5fb8b550128558fa041c9b5f708190d87a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2019-07-13  Joel Brobecker  <brobecker@adacore.com>
+
+       * src-release (getver): If $tool/gdbsupport/create-version.sh
+       exists, use that to determine the version number.
+
 2019-06-21  Andreas Schwab  <schwab@linux-m68k.org>
 
        * src-release.sh (GDB_SUPPORT_DIRS): Add gnulib.
index 1654656146f7986d48565555d42e0c9167d2b8c9..90d556896c9795ff714d2f059edf1ea9d4c554e7 100755 (executable)
@@ -61,6 +61,10 @@ getver()
        $tool/common/create-version.sh $tool 'dummy-host' 'dummy-target' VER.tmp
        cat VER.tmp | grep 'version\[\]' | sed 's/.*"\([^"]*\)".*/\1/' | sed 's/-git$//'
         rm -f VER.tmp
+    elif test -f $tool/gdbsupport/create-version.sh; then
+       $tool/gdbsupport/create-version.sh $tool 'dummy-host' 'dummy-target' VER.tmp
+       cat VER.tmp | grep 'version\[\]' | sed 's/.*"\([^"]*\)".*/\1/' | sed 's/-git$//'
+        rm -f VER.tmp
     elif test -f $tool/version.in; then
        head -1 $tool/version.in
     else
This page took 0.030982 seconds and 4 git commands to generate.