* [PATCH v5] don't keep a gdb-specific date
@ 2013-06-21 17:33 Tom Tromey
2013-06-21 18:00 ` Pedro Alves
` (2 more replies)
0 siblings, 3 replies; 39+ messages in thread
From: Tom Tromey @ 2013-06-21 17:33 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
Right now there are two nightly commits to update a file in the tree
with the current date. One commit is for BFD, one is for gdb.
It seems unnecessary to me to do this twice. We can make do with a
single such commit.
This patch changes gdb in a minimal way to reuse the BFD date -- it
extracts it from bfd/version.h and changes version.in to use the
placeholder string "DATE" for those times when a date is wanted.
I propose removing the cron job that updates the version on trunk, and
then check in this patch.
For release branches, we can keep the cron job, but just tell it to
rewrite bfd/version.h. I believe this is a simple change in the
crontab -- the script will work just fine on this file.
This also moves version.in and version.h into common/, to reflect
their shared status; and updates gdbserver to use version.h besides.
* common/create-version.sh: New file.
* Makefile.in (version.c): Use bfd/version.h, common/version.in,
create-version.sh.
(HFILES_NO_SRCDIR): Use common/version.h.
* version.in: Move to ...
* common/version.in: ... here. Replace date with "DATE".
* version.h: Move to ...
* common/version.h: ... here.
gdbserver:
* Makefile.in (version.c): Use bfd/version.h, common/version.in,
create-version.sh.
(version.o): Remove.
* gdbreplay.c: Include version.h.
(version, host_name): Don't declare.
* server.h: Include version.h.
(version, host_name): Don't declare.
doc:
* Makefile.in (POD2MAN1, POD2MAN5): Use version.subst.
(GDBvn.texi): Use version.subst.
(version.subst): New target.
(mostlyclean): Remove version.subst.
---
gdb/Makefile.in | 12 ++++--------
gdb/common/create-version.sh | 38 ++++++++++++++++++++++++++++++++++++++
gdb/common/version.h | 31 +++++++++++++++++++++++++++++++
gdb/common/version.in | 1 +
gdb/doc/Makefile.in | 15 ++++++++++-----
gdb/gdbserver/Makefile.in | 10 +++-------
gdb/gdbserver/gdbreplay.c | 5 +----
gdb/gdbserver/server.h | 5 +----
gdb/version.h | 31 -------------------------------
gdb/version.in | 1 -
10 files changed, 89 insertions(+), 60 deletions(-)
create mode 100755 gdb/common/create-version.sh
create mode 100644 gdb/common/version.h
create mode 100644 gdb/common/version.in
delete mode 100644 gdb/version.h
delete mode 100644 gdb/version.in
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index a6336a2..048b962 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -791,7 +791,7 @@ i386bsd-nat.h xml-support.h xml-tdesc.h alphabsd-tdep.h gdb_obstack.h \
ia64-tdep.h ada-lang.h ada-varobj.h varobj.h frv-tdep.h nto-tdep.h serial.h \
c-lang.h d-lang.h go-lang.h frame.h event-loop.h block.h cli/cli-setshow.h \
cli/cli-decode.h cli/cli-cmds.h cli/cli-dump.h cli/cli-utils.h \
-cli/cli-script.h macrotab.h symtab.h version.h \
+cli/cli-script.h macrotab.h symtab.h common/version.h \
gnulib/import/string.in.h gnulib/import/str-two-way.h \
gnulib/import/stdint.in.h remote.h remote-notif.h gdb.h sparc-nat.h \
gdbthread.h dwarf2-frame.h dwarf2-frame-tailcall.h nbsd-nat.h dcache.h \
@@ -1420,13 +1420,9 @@ $(srcdir)/copying.c: @MAINTAINER_MODE_TRUE@ $(srcdir)/../COPYING3 $(srcdir)/copy
< $(srcdir)/../COPYING3 > $(srcdir)/copying.tmp
mv $(srcdir)/copying.tmp $(srcdir)/copying.c
-version.c: Makefile version.in
- rm -f version.c-tmp version.c
- echo '#include "version.h"' >> version.c-tmp
- echo 'const char version[] = "'"`sed q ${srcdir}/version.in`"'";' >> version.c-tmp
- echo 'const char host_name[] = "$(host_alias)";' >> version.c-tmp
- echo 'const char target_name[] = "$(target_alias)";' >> version.c-tmp
- mv version.c-tmp version.c
+version.c: Makefile common/version.in $(srcdir)/../bfd/version.h $(srcdir)/common/create-version.sh
+ $(SHELL) $(srcdir)/common/create-version.sh $(srcdir) \
+ $(host_alias) $(target_alias) version.c
observer.h: observer.sh doc/observer.texi
${srcdir}/observer.sh h ${srcdir}/doc/observer.texi observer.h
diff --git a/gdb/common/create-version.sh b/gdb/common/create-version.sh
new file mode 100755
index 0000000..2d2bc74
--- /dev/null
+++ b/gdb/common/create-version.sh
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+# Copyright (C) 1989-2013 Free Software Foundation, Inc.
+
+# This file is part of GDB.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Create version.c from version.in.
+# Usage:
+# create-version.sh PATH-TO-GDB-SRCDIR HOST_ALIAS \
+# TARGET_ALIAS OUTPUT-FILE-NAME
+
+srcdir="$1"
+host_alias="$2"
+target_alias="$3"
+output="$4"
+
+rm -f version.c-tmp $output version.tmp
+date=`sed -n -e 's/^.* BFD_VERSION_DATE \(.*\)$$/\1/p' $srcdir/../bfd/version.h`
+sed -e "s/DATE/$date/" < $srcdir/common/version.in > version.tmp
+echo '#include "version.h"' >> version.c-tmp
+echo 'const char version[] = "'"`sed q version.tmp`"'";' >> version.c-tmp
+echo 'const char host_name[] = "$host_alias";' >> version.c-tmp
+echo 'const char target_name[] = "$target_alias";' >> version.c-tmp
+mv version.c-tmp $output
+rm -f version.tmp
diff --git a/gdb/common/version.h b/gdb/common/version.h
new file mode 100644
index 0000000..94b577c
--- /dev/null
+++ b/gdb/common/version.h
@@ -0,0 +1,31 @@
+/* Version information for GDB.
+ Copyright (C) 1999-2013 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef VERSION_H
+#define VERSION_H
+
+/* Version number of GDB, as a string. */
+extern const char version[];
+
+/* Canonical host name as a string. */
+extern const char host_name[];
+
+/* Canonical target name as a string. */
+extern const char target_name[];
+
+#endif /* #ifndef VERSION_H */
diff --git a/gdb/common/version.in b/gdb/common/version.in
new file mode 100644
index 0000000..99adaca
--- /dev/null
+++ b/gdb/common/version.in
@@ -0,0 +1 @@
+7.6.50.DATE-cvs
diff --git a/gdb/doc/Makefile.in b/gdb/doc/Makefile.in
index fdd57d6..d4ab738 100644
--- a/gdb/doc/Makefile.in
+++ b/gdb/doc/Makefile.in
@@ -172,9 +172,9 @@ TEXI2POD = perl $(srcdir)/../../etc/texi2pod.pl \
$(MAKEINFOFLAGS) $(MAKEINFO_EXTRA_FLAGS)
POD2MAN1 = pod2man --center="GNU Development Tools" \
- --release="gdb-`sed q $(srcdir)/../version.in`" --section=1
+ --release="gdb-`sed q version.subst`" --section=1
POD2MAN5 = pod2man --center="GNU Development Tools" \
- --release="gdb-`sed q $(srcdir)/../version.in`" --section=5
+ --release="gdb-`sed q version.subst`" --section=5
# List of man pages generated from gdb.texi
MAN1S = gdb.1 gdbserver.1 gcore.1
@@ -378,9 +378,9 @@ refcard.pdf : refcard.tex $(REFEDITS)
mv sedref.pdf refcard.pdf
rm -f sedref.log sedref.tex tmp.sed
-# File to record current GDB version number (copied from main dir version.in)
-GDBvn.texi : ${gdbdir}/version.in
- echo "@set GDBVN `sed q $(srcdir)/../version.in`" > ./GDBvn.new
+# File to record current GDB version number.
+GDBvn.texi : version.subst
+ echo "@set GDBVN `sed q version.subst`" > ./GDBvn.new
if [ -n "$(PKGVERSION)" ]; then \
echo "@set VERSION_PACKAGE $(PKGVERSION)" >> ./GDBvn.new; \
fi
@@ -396,6 +396,10 @@ GDBvn.texi : ${gdbdir}/version.in
fi
mv GDBvn.new GDBvn.texi
+version.subst: $(gdbdir)/common/version.in $(gdbdir)/../bfd/version.h
+ date=`sed -n -e 's/^.* BFD_VERSION_DATE \(.*\)$$/\1/p' $(gdbdir)/../bfd/version.h`; \
+ sed -e "s/DATE/$$date/" < $(gdbdir)/common/version.in > version.subst
+
# Updated atomically
.PRECIOUS: GDBvn.texi
@@ -649,6 +653,7 @@ mostlyclean:
rm -f $(STABS_TEX_TMPS)
rm -f $(ANNOTATE_TEX_TMPS)
rm -f sedref.dvi sedref.tex tmp.sed
+ rm -f version.subst
clean: mostlyclean
rm -f gdb-cfg.texi GDBvn.texi
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index e8470a8..e5ecdd3 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -389,13 +389,9 @@ am--refresh:
force:
-version.c: Makefile $(srcdir)/../version.in
- rm -f version.c-tmp version.c
- echo '#include "server.h"' >> version.c-tmp
- echo 'const char version[] = "'"`sed q ${srcdir}/../version.in`"'";' >> version.c-tmp
- echo 'const char host_name[] = "$(host_alias)";' >> version.c-tmp
- mv version.c-tmp version.c
-version.o: version.c $(server_h)
+version.c: Makefile $(srcdir)/../common/version.in $(srcdir)/../../bfd/version.h $(srcdir)/../common/create-version.sh
+ $(SHELL) $(srcdir)/../common/create-version.sh $(srcdir)/.. \
+ $(host_alias) $(target_alias) version.c
xml-builtin.c: stamp-xml; @true
stamp-xml: $(XML_DIR)/feature_to_c.sh Makefile $(XML_FILES)
diff --git a/gdb/gdbserver/gdbreplay.c b/gdb/gdbserver/gdbreplay.c
index 0aa52d8..c0d0c8f 100644
--- a/gdb/gdbserver/gdbreplay.c
+++ b/gdb/gdbserver/gdbreplay.c
@@ -19,6 +19,7 @@
#include "config.h"
#include "build-gnulib-gdbserver/config.h"
+#include "version.h"
#include <stdio.h>
#if HAVE_SYS_FILE_H
@@ -72,10 +73,6 @@ typedef int socklen_t;
/* Sort of a hack... */
#define EOL (EOF - 1)
-/* Version information, from version.c. */
-extern const char version[];
-extern const char host_name[];
-
static int remote_desc;
#ifdef __MINGW32CE__
diff --git a/gdb/gdbserver/server.h b/gdb/gdbserver/server.h
index 18d060c..c68c651 100644
--- a/gdb/gdbserver/server.h
+++ b/gdb/gdbserver/server.h
@@ -28,6 +28,7 @@
#include "libiberty.h"
#include "ansidecl.h"
+#include "version.h"
#include <stdarg.h>
#include <stdio.h>
@@ -531,8 +532,4 @@ CORE_ADDR get_set_tsv_func_addr (void);
extern CORE_ADDR current_insn_ptr;
extern int emit_error;
-/* Version information, from version.c. */
-extern const char version[];
-extern const char host_name[];
-
#endif /* SERVER_H */
diff --git a/gdb/version.h b/gdb/version.h
deleted file mode 100644
index 94b577c..0000000
--- a/gdb/version.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Version information for GDB.
- Copyright (C) 1999-2013 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-#ifndef VERSION_H
-#define VERSION_H
-
-/* Version number of GDB, as a string. */
-extern const char version[];
-
-/* Canonical host name as a string. */
-extern const char host_name[];
-
-/* Canonical target name as a string. */
-extern const char target_name[];
-
-#endif /* #ifndef VERSION_H */
diff --git a/gdb/version.in b/gdb/version.in
deleted file mode 100644
index 5af97ee..0000000
--- a/gdb/version.in
+++ /dev/null
@@ -1 +0,0 @@
-7.6.50.20130619-cvs
--
1.8.1.4
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH v5] don't keep a gdb-specific date
2013-06-21 17:33 [PATCH v5] don't keep a gdb-specific date Tom Tromey
@ 2013-06-21 18:00 ` Pedro Alves
2013-06-24 14:56 ` Tom Tromey
2013-06-26 2:45 ` Yao Qi
2 siblings, 0 replies; 39+ messages in thread
From: Pedro Alves @ 2013-06-21 18:00 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches
On 06/21/2013 06:31 PM, Tom Tromey wrote:
> * common/create-version.sh: New file.
> * Makefile.in (version.c): Use bfd/version.h, common/version.in,
> create-version.sh.
> (HFILES_NO_SRCDIR): Use common/version.h.
> * version.in: Move to ...
> * common/version.in: ... here. Replace date with "DATE".
> * version.h: Move to ...
> * common/version.h: ... here.
> gdbserver:
> * Makefile.in (version.c): Use bfd/version.h, common/version.in,
> create-version.sh.
> (version.o): Remove.
> * gdbreplay.c: Include version.h.
> (version, host_name): Don't declare.
> * server.h: Include version.h.
> (version, host_name): Don't declare.
> doc:
> * Makefile.in (POD2MAN1, POD2MAN5): Use version.subst.
> (GDBvn.texi): Use version.subst.
> (version.subst): New target.
> (mostlyclean): Remove version.subst.
Thanks Tom. This version looks flawless to me.
--
Pedro Alves
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH v5] don't keep a gdb-specific date
2013-06-21 17:33 [PATCH v5] don't keep a gdb-specific date Tom Tromey
2013-06-21 18:00 ` Pedro Alves
@ 2013-06-24 14:56 ` Tom Tromey
2013-06-24 19:22 ` Joel Brobecker
` (2 more replies)
2013-06-26 2:45 ` Yao Qi
2 siblings, 3 replies; 39+ messages in thread
From: Tom Tromey @ 2013-06-24 14:56 UTC (permalink / raw)
To: gdb-patches
>>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:
Tom> Right now there are two nightly commits to update a file in the tree
Tom> with the current date. One commit is for BFD, one is for gdb.
Tom> It seems unnecessary to me to do this twice. We can make do with a
Tom> single such commit.
I'm checking this in now.
Joel gave his approval on irc and said he will take care of the gdbadmin
side of things. Thanks, Joel.
Tom
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH v5] don't keep a gdb-specific date
2013-06-24 14:56 ` Tom Tromey
@ 2013-06-24 19:22 ` Joel Brobecker
2013-06-24 22:41 ` [commit] Fix host_name and target_name generation by common/create-version.sh Joel Brobecker
2013-06-24 22:59 ` [PATCH v5] don't keep a gdb-specific date Joel Brobecker
2 siblings, 0 replies; 39+ messages in thread
From: Joel Brobecker @ 2013-06-24 19:22 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches
> I'm checking this in now.
> Joel gave his approval on irc and said he will take care of the gdbadmin
> side of things. Thanks, Joel.
Thanks, Tom.
I've finished making the changes. I tried testing them as best as I
could, but for technical reasons, this seems to be difficult (I think
it's related to taking the sources at a specific date/time, maybe).
I'll just let the scripts run tonight, and will fix any error tomorrow.
--
Joel
^ permalink raw reply [flat|nested] 39+ messages in thread
* [commit] Fix host_name and target_name generation by common/create-version.sh.
2013-06-24 14:56 ` Tom Tromey
2013-06-24 19:22 ` Joel Brobecker
@ 2013-06-24 22:41 ` Joel Brobecker
2013-06-24 22:59 ` [PATCH v5] don't keep a gdb-specific date Joel Brobecker
2 siblings, 0 replies; 39+ messages in thread
From: Joel Brobecker @ 2013-06-24 22:41 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
Hello,
there was a small snafoo in this new script, which prevented the $host_alias
and $target_alias from being expanded during the generation of the
version.c file. As a result, the version info yields:
This GDB was configured as "--host=$host_alias --target=$target_alias".
^^^^^^^^^^^ ^^^^^^^^^^^^^
This patch fixes this issue.
gdb/ChangeLog:
* common/create-version.sh: Fix expansion of $host_alias
and $target_alias in generation of HOST_NAME and TARGET_NAME
(resp.).
Tested by rebuilding GDB native and cross on x86_64-linux.
Checked in.
---
gdb/ChangeLog | 6 ++++++
gdb/common/create-version.sh | 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0b81e33..adaf463 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2013-06-24 Joel Brobecker <brobecker@adacore.com>
+
+ * common/create-version.sh: Fix expansion of $host_alias
+ and $target_alias in generation of HOST_NAME and TARGET_NAME
+ (resp.).
+
2013-06-24 Tom Tromey <tromey@redhat.com>
* common/create-version.sh: New file.
diff --git a/gdb/common/create-version.sh b/gdb/common/create-version.sh
index 2d2bc74..56871bf 100755
--- a/gdb/common/create-version.sh
+++ b/gdb/common/create-version.sh
@@ -32,7 +32,7 @@ date=`sed -n -e 's/^.* BFD_VERSION_DATE \(.*\)$$/\1/p' $srcdir/../bfd/version.h`
sed -e "s/DATE/$date/" < $srcdir/common/version.in > version.tmp
echo '#include "version.h"' >> version.c-tmp
echo 'const char version[] = "'"`sed q version.tmp`"'";' >> version.c-tmp
-echo 'const char host_name[] = "$host_alias";' >> version.c-tmp
-echo 'const char target_name[] = "$target_alias";' >> version.c-tmp
+echo 'const char host_name[] = "'"$host_alias"'";' >> version.c-tmp
+echo 'const char target_name[] = "'"$target_alias"'";' >> version.c-tmp
mv version.c-tmp $output
rm -f version.tmp
--
1.7.10.4
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH v5] don't keep a gdb-specific date
2013-06-24 14:56 ` Tom Tromey
2013-06-24 19:22 ` Joel Brobecker
2013-06-24 22:41 ` [commit] Fix host_name and target_name generation by common/create-version.sh Joel Brobecker
@ 2013-06-24 22:59 ` Joel Brobecker
2013-06-24 23:58 ` [commit] Adapt sim to new version number & date locations Joel Brobecker
2013-06-25 1:08 ` [PATCH v5] don't keep a gdb-specific date Hans-Peter Nilsson
2 siblings, 2 replies; 39+ messages in thread
From: Joel Brobecker @ 2013-06-24 22:59 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches
> Tom> Right now there are two nightly commits to update a file in the tree
> Tom> with the current date. One commit is for BFD, one is for gdb.
>
> Tom> It seems unnecessary to me to do this twice. We can make do with a
> Tom> single such commit.
>
> I'm checking this in now.
Just to avoid multiple people working on this, it's also breaking the
sim, and I'm working on it.
--
Joel
^ permalink raw reply [flat|nested] 39+ messages in thread
* [commit] Adapt sim to new version number & date locations.
2013-06-24 22:59 ` [PATCH v5] don't keep a gdb-specific date Joel Brobecker
@ 2013-06-24 23:58 ` Joel Brobecker
2013-06-25 0:52 ` Mike Frysinger
2013-06-25 15:28 ` Tom Tromey
2013-06-25 1:08 ` [PATCH v5] don't keep a gdb-specific date Hans-Peter Nilsson
1 sibling, 2 replies; 39+ messages in thread
From: Joel Brobecker @ 2013-06-24 23:58 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey, Mike Frysinger, Anthony Green
Hello,
This change is required now that gdb/version.in has been moved to
gdb/common/version.in and now that the date needs to be fetched
from bfd/version.h.
The common and ppc parts were easy to fix, by just doing a reduced
version of what we do for GDB and GDBserver. Moxie, on the other
hand, needs the version info for different reasons, and I prefered
not touching it.
sim/common/ChangeLog:
* create-version.sh: New script. Adapted from
gdb/commong/create-version.sh.
* Make-common.in (version.c): Update rule dependencies,
and re-implement using create-version.sh.
sim/ppc/ChangeLog:
* Makefile.in (srccom): New variable.
(version.c): Update rule dependencies, and re-implement using
sim/common/create-version.sh.
Tested by rebuilding the simulators, and by visually inspecting
the output (version.c file).
Checked in.
--
Joel
---
sim/common/ChangeLog | 7 +++++++
sim/common/Make-common.in | 8 ++------
sim/common/create-version.sh | 33 +++++++++++++++++++++++++++++++++
sim/ppc/ChangeLog | 6 ++++++
sim/ppc/Makefile.in | 8 +++-----
5 files changed, 51 insertions(+), 11 deletions(-)
create mode 100755 sim/common/create-version.sh
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 445a4c0..cc0e9aa 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,10 @@
+2013-06-24 Joel Brobecker <brobecker@adacore.com>
+
+ * create-version.sh: New script. Adapted from
+ gdb/commong/create-version.sh.
+ * Make-common.in (version.c): Update rule dependencies,
+ and re-implement using create-version.sh.
+
2013-06-21 Nick Clifton <nickc@redhat.com>
* gennltvals.sh: Add msp430 support.
diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in
index af73c30..769f782 100644
--- a/sim/common/Make-common.in
+++ b/sim/common/Make-common.in
@@ -300,12 +300,8 @@ stamp-tvals: gentmap
$(SHELL) $(srcroot)/move-if-change tmp-tmap.c targ-map.c
touch stamp-tvals
-version.c: Makefile ../../gdb/version.in
- rm -f version.c-tmp version.c
- echo '#include "version.h"' >> version.c-tmp
- echo 'const char version[] = "'"`sed q ${srcdir}/../../gdb/version.in`"'";' >> version.c-tmp
- mv version.c-tmp version.c
-
+version.c: Makefile $(srccom)/create-version.sh ../../bfd/version.h ../../gdb/common/version.in
+ $(SHELL) $(srccom)/create-version.sh $(srccom) version.c
#
# Rules for building sim-* components. Triggered by listing the corresponding
diff --git a/sim/common/create-version.sh b/sim/common/create-version.sh
new file mode 100755
index 0000000..aaf2ab3
--- /dev/null
+++ b/sim/common/create-version.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Copyright (C) 1989-2013 Free Software Foundation, Inc.
+
+# This file is part of GDB.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Create version.c from version.in.
+# Usage:
+# create-version.sh PATH-TO-COMMON-SIM-SRCDIR OUTPUT-FILE-NAME
+
+srcdir="$1"
+output="$2"
+
+rm -f version.c-tmp $output version.tmp
+date=`sed -n -e 's/^.* BFD_VERSION_DATE \(.*\)$/\1/p' $srcdir/../../bfd/version.h`
+sed -e "s/DATE/$date/" < $srcdir/../../gdb/common/version.in > version.tmp
+echo '#include "version.h"' >> version.c-tmp
+echo 'const char version[] = "'"`sed q version.tmp`"'";' >> version.c-tmp
+mv version.c-tmp $output
+rm -f version.tmp
diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog
index 4734587..2f7da02 100644
--- a/sim/ppc/ChangeLog
+++ b/sim/ppc/ChangeLog
@@ -1,3 +1,9 @@
+2013-06-24 Joel Brobecker <brobecker@adacore.com>
+
+ * Makefile.in (srccom): New variable.
+ (version.c): Update rule dependencies, and re-implement using
+ sim/common/create-version.sh.
+
2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
revert:
diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in
index d7d6689..1652b24 100644
--- a/sim/ppc/Makefile.in
+++ b/sim/ppc/Makefile.in
@@ -21,6 +21,7 @@ default: all
VPATH = @srcdir@
srcdir = @srcdir@
+srccom = $(srcdir)/../common
srcroot = $(srcdir)/../..
prefix = @prefix@
@@ -562,11 +563,8 @@ $(TARGETLIB): tmp-igen tmp-dgen tmp-hw tmp-pk tmp-defines $(LIB_OBJ) $(GDB_OBJ)
$(AR) $(AR_FLAGS) $(TARGETLIB) $(LIB_OBJ) $(GDB_OBJ)
$(RANLIB) $(TARGETLIB)
-version.c: Makefile ../../gdb/version.in
- rm -f version.c-tmp version.c
- echo '#include "version.h"' >> version.c-tmp
- echo 'const char version[] = "'"`sed q ${srcdir}/../../gdb/version.in`"'";' >> version.c-tmp
- mv version.c-tmp version.c
+version.c: Makefile $(srccom)/create-version.sh ../../bfd/version.h ../../gdb/common/version.in
+ $(SHELL) $(srccom)/create-version.sh $(srccom) version.c
version.o: version.c $(version_h)
psim.o: psim.c $(CPU_H) $(IDECODE_H) $(OPTIONS_H) $(TREE_H) $(BFD_H)
--
1.7.10.4
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [commit] Adapt sim to new version number & date locations.
2013-06-24 23:58 ` [commit] Adapt sim to new version number & date locations Joel Brobecker
@ 2013-06-25 0:52 ` Mike Frysinger
2013-06-25 1:53 ` Joel Brobecker
2013-06-25 15:46 ` Tom Tromey
2013-06-25 15:28 ` Tom Tromey
1 sibling, 2 replies; 39+ messages in thread
From: Mike Frysinger @ 2013-06-25 0:52 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches, Tom Tromey, Anthony Green
[-- Attachment #1: Type: Text/Plain, Size: 642 bytes --]
On Monday 24 June 2013 19:45:46 Joel Brobecker wrote:
> This change is required now that gdb/version.in has been moved to
> gdb/common/version.in and now that the date needs to be fetched
> from bfd/version.h.
looks like gdb/doc/gdbint.texinfo needs updating too ? it talks about
gdb/version.in in many places ...
> The common and ppc parts were easy to fix, by just doing a reduced
> version of what we do for GDB and GDBserver. Moxie, on the other
> hand, needs the version info for different reasons, and I prefered
> not touching it.
seems like it'd be straight forward to fix though by just updating the path ?
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH v5] don't keep a gdb-specific date
2013-06-24 22:59 ` [PATCH v5] don't keep a gdb-specific date Joel Brobecker
2013-06-24 23:58 ` [commit] Adapt sim to new version number & date locations Joel Brobecker
@ 2013-06-25 1:08 ` Hans-Peter Nilsson
2013-06-25 14:16 ` Tom Tromey
1 sibling, 1 reply; 39+ messages in thread
From: Hans-Peter Nilsson @ 2013-06-25 1:08 UTC (permalink / raw)
To: Joel Brobecker; +Cc: Tom Tromey, gdb-patches
On Mon, 24 Jun 2013, Joel Brobecker wrote:
> > Tom> Right now there are two nightly commits to update a file in the tree
> > Tom> with the current date. One commit is for BFD, one is for gdb.
> >
> > Tom> It seems unnecessary to me to do this twice. We can make do with a
> > Tom> single such commit.
> >
> > I'm checking this in now.
>
> Just to avoid multiple people working on this, it's also breaking the
> sim, and I'm working on it.
Ok, I saw that. :)
The "sim" CVS module explicitly mentions (includes)
gdb/version.in: that needs to be tweaked too, so "sim" can
(continue to) be checked out without gdb and then built on its own.
(Hopefully not a surprise?) Thanks.
brgds, H-P
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [commit] Adapt sim to new version number & date locations.
2013-06-25 0:52 ` Mike Frysinger
@ 2013-06-25 1:53 ` Joel Brobecker
2013-06-25 15:51 ` Tom Tromey
2013-06-25 15:46 ` Tom Tromey
1 sibling, 1 reply; 39+ messages in thread
From: Joel Brobecker @ 2013-06-25 1:53 UTC (permalink / raw)
To: Mike Frysinger; +Cc: gdb-patches, Tom Tromey, Anthony Green
> > This change is required now that gdb/version.in has been moved to
> > gdb/common/version.in and now that the date needs to be fetched
> > from bfd/version.h.
>
> looks like gdb/doc/gdbint.texinfo needs updating too ? it talks about
> gdb/version.in in many places ...
Thanks for pointing this one out. Looks like we're going to have
to grep the entire repo, just to chase all these references down.
This is proving to be a lot more involved than I thought!
> > The common and ppc parts were easy to fix, by just doing a reduced
> > version of what we do for GDB and GDBserver. Moxie, on the other
> > hand, needs the version info for different reasons, and I prefered
> > not touching it.
>
> seems like it'd be straight forward to fix though by just updating the
> path ?
Not quite, I think, because the "DATE" marker needs to be replaced
with the date from bfd/version.h. Otherwise, I think we'll have
a path where the version number is 7.6.50.DATE-cvs. I think! (and
hence the no-touchy)
--
Joel
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH v5] don't keep a gdb-specific date
2013-06-25 1:08 ` [PATCH v5] don't keep a gdb-specific date Hans-Peter Nilsson
@ 2013-06-25 14:16 ` Tom Tromey
2013-06-25 14:25 ` Joel Brobecker
2013-06-25 14:50 ` [PATCH v5] don't keep a gdb-specific date Pedro Alves
0 siblings, 2 replies; 39+ messages in thread
From: Tom Tromey @ 2013-06-25 14:16 UTC (permalink / raw)
To: Hans-Peter Nilsson; +Cc: Joel Brobecker, gdb-patches
H-P> The "sim" CVS module explicitly mentions (includes)
H-P> gdb/version.in: that needs to be tweaked too, so "sim" can
H-P> (continue to) be checked out without gdb and then built on its own.
H-P> (Hopefully not a surprise?) Thanks.
I think rather we have to back out the patch.
IIRC you can't really change the definition of modules like that.
sim using this file in gdb is an error, IMO, but not one I think is
worth a lot of effort to fix.
I'll prepare a reversion patch shortly.
sorry about the mess,
Tom
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH v5] don't keep a gdb-specific date
2013-06-25 14:16 ` Tom Tromey
@ 2013-06-25 14:25 ` Joel Brobecker
2013-06-25 14:43 ` Tom Tromey
2013-06-25 14:50 ` [PATCH v5] don't keep a gdb-specific date Pedro Alves
1 sibling, 1 reply; 39+ messages in thread
From: Joel Brobecker @ 2013-06-25 14:25 UTC (permalink / raw)
To: Tom Tromey; +Cc: Hans-Peter Nilsson, gdb-patches
> I think rather we have to back out the patch.
> IIRC you can't really change the definition of modules like that.
> sim using this file in gdb is an error, IMO, but not one I think is
> worth a lot of effort to fix.
> I'll prepare a reversion patch shortly.
How about duplicating version.in instead? The version number would
only need to be updated after creating the branch, and one extra file
every 3 months is not going to kill me.
I think having a common version.in and using BFD's date was a step
in the right direction. It would be a shame to lose all the efforts
we've made just because of some CVS module interdependency. This is
especially true if we ever want to move to another version-control
system where GDB and the sim would be one repository.
--
Joel
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH v5] don't keep a gdb-specific date
2013-06-25 14:25 ` Joel Brobecker
@ 2013-06-25 14:43 ` Tom Tromey
2013-06-25 15:27 ` Tom Tromey
0 siblings, 1 reply; 39+ messages in thread
From: Tom Tromey @ 2013-06-25 14:43 UTC (permalink / raw)
To: Joel Brobecker; +Cc: Hans-Peter Nilsson, gdb-patches
>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:
Tom> I think rather we have to back out the patch.
Tom> IIRC you can't really change the definition of modules like that.
Tom> sim using this file in gdb is an error, IMO, but not one I think is
Tom> worth a lot of effort to fix.
Tom> I'll prepare a reversion patch shortly.
Joel> How about duplicating version.in instead? The version number would
Joel> only need to be updated after creating the branch, and one extra file
Joel> every 3 months is not going to kill me.
I wonder what would happen if we added gdb/common/version.in to the sim
module definition. Maybe checkouts on old branches would just get a
warning instead of an error.
A quick experiment with an explicit checkout seems to confirm this.
So maybe this is salvageable after all.
I'm going to try updating CVSROOT/modules and then check out some old
branches, and see what happens. Please bear with me. I'll revert that
change if it causes a problem.
Tom
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH v5] don't keep a gdb-specific date
2013-06-25 14:16 ` Tom Tromey
2013-06-25 14:25 ` Joel Brobecker
@ 2013-06-25 14:50 ` Pedro Alves
2013-06-25 14:53 ` Joel Brobecker
2013-06-25 15:01 ` Tom Tromey
1 sibling, 2 replies; 39+ messages in thread
From: Pedro Alves @ 2013-06-25 14:50 UTC (permalink / raw)
To: Tom Tromey; +Cc: Hans-Peter Nilsson, Joel Brobecker, gdb-patches
On 06/25/2013 03:06 PM, Tom Tromey wrote:
> H-P> The "sim" CVS module explicitly mentions (includes)
> H-P> gdb/version.in: that needs to be tweaked too, so "sim" can
> H-P> (continue to) be checked out without gdb and then built on its own.
> H-P> (Hopefully not a surprise?) Thanks.
>
> I think rather we have to back out the patch.
> IIRC you can't really change the definition of modules like that.
> sim using this file in gdb is an error, IMO, but not one I think is
> worth a lot of effort to fix.
> I'll prepare a reversion patch shortly.
IMO, it'd make sense to push a very light/simple "VERSION" file
that only has the date and nothing else, like
$ cat src/VERSION
20130625
$
to the top level. Then any project in the tree could source that
single file any way it saw fit.
--
Pedro Alves
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH v5] don't keep a gdb-specific date
2013-06-25 14:50 ` [PATCH v5] don't keep a gdb-specific date Pedro Alves
@ 2013-06-25 14:53 ` Joel Brobecker
2013-06-25 15:01 ` Tom Tromey
1 sibling, 0 replies; 39+ messages in thread
From: Joel Brobecker @ 2013-06-25 14:53 UTC (permalink / raw)
To: Pedro Alves; +Cc: Tom Tromey, Hans-Peter Nilsson, gdb-patches
> IMO, it'd make sense to push a very light/simple "VERSION" file
> that only has the date and nothing else, like
>
> $ cat src/VERSION
> 20130625
> $
>
> to the top level. Then any project in the tree could source that
> single file any way it saw fit.
That would work for me. We would need to check if this is going
to cause synchronization problems with GCC (I think there is a
script somewhere that sends emails, which we'd want to adapt in
order to exclude this file).
--
Joel
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH v5] don't keep a gdb-specific date
2013-06-25 14:50 ` [PATCH v5] don't keep a gdb-specific date Pedro Alves
2013-06-25 14:53 ` Joel Brobecker
@ 2013-06-25 15:01 ` Tom Tromey
2013-06-25 15:14 ` Pedro Alves
1 sibling, 1 reply; 39+ messages in thread
From: Tom Tromey @ 2013-06-25 15:01 UTC (permalink / raw)
To: Pedro Alves; +Cc: Hans-Peter Nilsson, Joel Brobecker, gdb-patches
Pedro> IMO, it'd make sense to push a very light/simple "VERSION" file
Pedro> that only has the date and nothing else, like
Pedro> $ cat src/VERSION
Pedro> 20130625
Pedro> $
Pedro> to the top level. Then any project in the tree could source that
Pedro> single file any way it saw fit.
sim would still need the gdb copy to get the same version numbers it has
now. The BFD dependency isn't a problem as sim already depends on BFD.
The problem is the gdb-specific stuff like "7.6"
Tom
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH v5] don't keep a gdb-specific date
2013-06-25 15:01 ` Tom Tromey
@ 2013-06-25 15:14 ` Pedro Alves
0 siblings, 0 replies; 39+ messages in thread
From: Pedro Alves @ 2013-06-25 15:14 UTC (permalink / raw)
To: Tom Tromey; +Cc: Hans-Peter Nilsson, Joel Brobecker, gdb-patches
On 06/25/2013 03:53 PM, Tom Tromey wrote:
> Pedro> IMO, it'd make sense to push a very light/simple "VERSION" file
> Pedro> that only has the date and nothing else, like
>
> Pedro> $ cat src/VERSION
> Pedro> 20130625
> Pedro> $
>
> Pedro> to the top level. Then any project in the tree could source that
> Pedro> single file any way it saw fit.
>
> sim would still need the gdb copy to get the same version numbers it has
> now. The BFD dependency isn't a problem as sim already depends on BFD.
> The problem is the gdb-specific stuff like "7.6"
Ah well. For a rainy day then.
--
Pedro Alves
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH v5] don't keep a gdb-specific date
2013-06-25 14:43 ` Tom Tromey
@ 2013-06-25 15:27 ` Tom Tromey
2013-06-26 11:23 ` sim checkout broken (was: [PATCH v5] don't keep a gdb-specific date) Hans-Peter Nilsson
0 siblings, 1 reply; 39+ messages in thread
From: Tom Tromey @ 2013-06-25 15:27 UTC (permalink / raw)
To: Joel Brobecker; +Cc: Hans-Peter Nilsson, gdb-patches
>>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:
Tom> I'm going to try updating CVSROOT/modules and then check out some old
Tom> branches, and see what happens. Please bear with me. I'll revert that
Tom> change if it causes a problem.
As far as I can tell, this works ok.
You get one more non-fatal warning when checking out an old branch of "sim".
However, seeing that there are already such warnings in a sim checkout,
I don't think this is a problem.
Tom
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [commit] Adapt sim to new version number & date locations.
2013-06-24 23:58 ` [commit] Adapt sim to new version number & date locations Joel Brobecker
2013-06-25 0:52 ` Mike Frysinger
@ 2013-06-25 15:28 ` Tom Tromey
2013-06-25 16:41 ` Mike Frysinger
1 sibling, 1 reply; 39+ messages in thread
From: Tom Tromey @ 2013-06-25 15:28 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches, Mike Frysinger, Anthony Green
>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:
Joel> The common and ppc parts were easy to fix, by just doing a reduced
Joel> version of what we do for GDB and GDBserver. Moxie, on the other
Joel> hand, needs the version info for different reasons, and I prefered
Joel> not touching it.
I looked at this a bit.
Right now the code there is a bit broken. If you update your source
tree, rebuild, and reinstall, then you can end up in a situation where
the moxie sim reads an outdated moxie-gdb.dtb file.
This can happen due to missing dependencies: the version number is built
into the sim via a -D option, but interp.o doesn't depend on the version
file.
I think that since we don't generally support versioned installs in gdb,
it is simplest to just drop the version number here. This fixes the bug
and also avoids using gdb's version.in.
Ok?
Tom
2013-06-25 Tom Tromey <tromey@redhat.com>
* Makefile.in (dtbdir): Don't use gdb's version.in.
diff --git a/sim/moxie/Makefile.in b/sim/moxie/Makefile.in
index 884d277..3be637b 100644
--- a/sim/moxie/Makefile.in
+++ b/sim/moxie/Makefile.in
@@ -17,7 +17,7 @@
## COMMON_PRE_CONFIG_FRAG
-dtbdir = @datadir@/gdb-`sed q ${srcdir}/../../gdb/version.in`/dtb
+dtbdir = @datadir@/gdb/dtb
SIM_OBJS = interp.o sim-load.o sim-io.o sim-config.o sim-utils.o \
sim-options.o sim-module.o sim-core.o sim-endian.o sim-trace.o \
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [commit] Adapt sim to new version number & date locations.
2013-06-25 0:52 ` Mike Frysinger
2013-06-25 1:53 ` Joel Brobecker
@ 2013-06-25 15:46 ` Tom Tromey
2013-06-25 16:01 ` Eli Zaretskii
1 sibling, 1 reply; 39+ messages in thread
From: Tom Tromey @ 2013-06-25 15:46 UTC (permalink / raw)
To: Mike Frysinger; +Cc: Joel Brobecker, gdb-patches, Anthony Green
>>>>> "Mike" == Mike Frysinger <vapier@gentoo.org> writes:
Mike> looks like gdb/doc/gdbint.texinfo needs updating too ? it talks about
Mike> gdb/version.in in many places ...
Sure, that's the one thing that is documented extensively.
Sigh.
How about this?
Tom
2013-06-25 Tom Tromey <tromey@redhat.com>
* gdbint.texinfo (Versions and Branches): Use common/version.in.
Update.
(Releasing GDB): Likewise.
diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo
index e7caabe..0d26798 100644
--- a/gdb/doc/gdbint.texinfo
+++ b/gdb/doc/gdbint.texinfo
@@ -6632,21 +6632,21 @@ Specific Information, gdb, Debugging with @value{GDBN}}).
@section Versions
@value{GDBN}'s version is determined by the file
-@file{gdb/version.in} and takes one of the following forms:
+@file{gdb/common/version.in} and takes one of the following forms:
@table @asis
@item @var{major}.@var{minor}
@itemx @var{major}.@var{minor}.@var{patchlevel}
an official release (e.g., 6.2 or 6.2.1)
-@item @var{major}.@var{minor}.@var{patchlevel}.@var{YYYY}@var{MM}@var{DD}
-a snapshot taken at @var{YYYY}-@var{MM}-@var{DD}-gmt (e.g.,
-6.1.50.20020302, 6.1.90.20020304, or 6.1.0.20020308)
-@item @var{major}.@var{minor}.@var{patchlevel}.@var{YYYY}@var{MM}@var{DD}-cvs
-a @sc{cvs} check out drawn on @var{YYYY}-@var{MM}-@var{DD} (e.g.,
-6.1.50.20020302-cvs, 6.1.90.20020304-cvs, or 6.1.0.20020308-cvs)
-@item @var{major}.@var{minor}.@var{patchlevel}.@var{YYYY}@var{MM}@var{DD} (@var{vendor})
+@item @var{major}.@var{minor}.@var{patchlevel}.DATE
+a snapshot; the string @samp{DATE} is replace with the date from
+@file{bfd/version.h}
+@item @var{major}.@var{minor}.@var{patchlevel}.DATE-cvs
+a @sc{cvs} check out; the string @samp{DATE} is replace with the date from
+@file{bfd/version.h}
+@item @var{major}.@var{minor}.@var{patchlevel}.DATE (@var{vendor})
a vendor specific release of @value{GDBN}, that while based on@*
-@var{major}.@var{minor}.@var{patchlevel}.@var{YYYY}@var{MM}@var{DD},
+@var{major}.@var{minor}.@var{patchlevel}.DATE,
may include additional changes
@end table
@@ -6736,7 +6736,7 @@ branch tag, denoting the head of the branch, does not need this.}
@cindex vendor branches
To avoid version conflicts, vendors are expected to modify the file
-@file{gdb/version.in} to include a vendor unique alphabetic identifier
+@file{gdb/common/version.in} to include a vendor unique alphabetic identifier
(an official @value{GDBN} release never uses alphabetic characters in
its version identifier). E.g., @samp{6.2widgit2}, or @samp{6.2 (Widgit
Inc Patch 2)}.
@@ -6785,7 +6785,7 @@ The @value{GDBN} module @code{gdb} should be specified when creating a
branch (branches of individual files should be avoided). @xref{Tags}.
@item a branch shall be branded using @file{version.in}
-The file @file{gdb/version.in} shall be modified so that it identifies
+The file @file{gdb/common/version.in} shall be modified so that it identifies
the branch @var{owner} and branch @var{name}, e.g.,
@samp{6.2.50.20030303_owner_name} or @samp{6.2 (Owner Name)}.
@@ -7063,22 +7063,22 @@ $ echo $u $v$V
5.1 5_2
$ cd /tmp
$ echo cvs -f -d :ext:sourceware.org:/cvs/src co \
--r gdb_$V-branch src/gdb/version.in
+-r gdb_$V-branch src/gdb/common/version.in
cvs -f -d :ext:sourceware.org:/cvs/src co
- -r gdb_5_2-branch src/gdb/version.in
+ -r gdb_5_2-branch src/gdb/common/version.in
$ ^echo ^^
-U src/gdb/version.in
+U src/gdb/common/version.in
$ cd src/gdb
-$ echo $u.90-0000-00-00-cvs > version.in
-$ cat version.in
-5.1.90-0000-00-00-cvs
-$ cvs -f commit version.in
+$ echo $u.90-DATE-cvs > common/version.in
+$ cat common/version.in
+5.1.90-DATE-cvs
+$ cvs -f commit common/version.in
@end smallexample
@itemize @bullet
@item
-@file{0000-00-00} is used as a date to pump prime the version.in update
-mechanism.
+The string @samp{DATE} is used to substitute the checkout date at
+build time; the date comes from @file{bfd/version.h}.
@item
@file{.90} and the previous branch version are used as fairly arbitrary
initial branch version number.
@@ -7096,7 +7096,7 @@ This file needs to be updated so that:
@itemize @bullet
@item
-A daily timestamp is added to the file @file{version.in}.
+A daily timestamp is added to the file @file{bfd/version.h}.
@item
The new branch is included in the snapshot process.
@end itemize
@@ -7272,18 +7272,18 @@ to get it updated.}
@file{INSTALL} from the core documentation. This might be worth
pursuing.}
-@item gdb/version.in
+@item gdb/common/version.in
@smallexample
-$ echo $v > gdb/src/gdb/version.in
-$ cat gdb/src/gdb/version.in
+$ echo $v > gdb/src/gdb/common/version.in
+$ cat gdb/src/gdb/common/version.in
5.2
-$ emacs gdb/src/gdb/version.in
+$ emacs gdb/src/gdb/common/version.in
...
c-x 4 a
... Bump to version ...
c-x c-s c-x c-c
-$ cp gdb/src/gdb/version.in insight/src/gdb/version.in
+$ cp gdb/src/gdb/common/version.in insight/src/gdb/common/version.in
$ cp gdb/src/gdb/ChangeLog insight/src/gdb/ChangeLog
@end smallexample
@@ -7313,8 +7313,7 @@ done
@subsubheading Check the source files
You're looking for files that have mysteriously disappeared.
-@kbd{distclean} has the habit of deleting files it shouldn't. Watch out
-for the @file{version.in} update @kbd{cronjob}.
+@kbd{distclean} has the habit of deleting files it shouldn't.
@smallexample
$ ( cd gdb/src && cvs -f -q -n update )
@@ -7325,7 +7324,6 @@ M djunpack.bat
M gdb/ChangeLog
M gdb/NEWS
M gdb/README
-M gdb/version.in
@dots{} lots of generated files @dots{}
$
@end smallexample
@@ -7396,7 +7394,7 @@ If this is a release candidate then the only remaining steps are:
Commit @file{version.in} and @file{ChangeLog}
@item
Tweak @file{version.in} (and @file{ChangeLog} to read
-@var{L}.@var{M}.@var{N}-0000-00-00-cvs so that the version update
+@var{L}.@var{M}.@var{N}-DATE-cvs so that the version substitution
process can restart.
@item
Make the release candidate available in
@@ -7530,7 +7528,7 @@ In particular you'll need to commit any changes to:
@item
@file{gdb/ChangeLog}
@item
-@file{gdb/version.in}
+@file{gdb/common/version.in}
@item
@file{gdb/NEWS}
@item
@@ -7557,13 +7555,12 @@ Insight is used since that contains more of the release than
Just put something in the @file{ChangeLog} so that the trunk also
indicates when the release was made.
-@subsubheading Restart @file{gdb/version.in}
+@subsubheading Restart @file{gdb/common/version.in}
-If @file{gdb/version.in} does not contain an ISO date such as
-@kbd{2002-01-24} then the daily @code{cronjob} won't update it. Having
-committed all the release changes it can be set to
-@file{5.2.0_0000-00-00-cvs} which will restart things (yes the @kbd{_}
-is important - it affects the snapshot process).
+If @file{gdb/common/version.in} does not the string @samp{DATE} then
+builds will not include the checkout date in their resulting version.
+Having committed all the release changes it can be set to
+@file{5.2.0_DATE-cvs} which will restart things.
Don't forget the @file{ChangeLog}.
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [commit] Adapt sim to new version number & date locations.
2013-06-25 1:53 ` Joel Brobecker
@ 2013-06-25 15:51 ` Tom Tromey
2013-06-25 15:57 ` Tom Tromey
0 siblings, 1 reply; 39+ messages in thread
From: Tom Tromey @ 2013-06-25 15:51 UTC (permalink / raw)
To: Joel Brobecker; +Cc: Mike Frysinger, gdb-patches, Anthony Green
Joel> Thanks for pointing this one out. Looks like we're going to have
Joel> to grep the entire repo, just to chase all these references down.
Joel> This is proving to be a lot more involved than I thought!
Yes, what a nightmare. For me anyhow.
I did the grep and found:
./gdb/contrib/ari/update-web-ari.sh: version_in=${srcdir}/${module}/version.in
./gdb/contrib/ari/update-web-ari.sh: version_in=${srcdir}/gdb/version.in
./src-release: elif test -f $(TOOL)/version.in; then \
./src-release: head -1 $(TOOL)/version.in; \
Do we use src-release?
I'm working on update-web-ari.sh.
Tom
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [commit] Adapt sim to new version number & date locations.
2013-06-25 15:51 ` Tom Tromey
@ 2013-06-25 15:57 ` Tom Tromey
0 siblings, 0 replies; 39+ messages in thread
From: Tom Tromey @ 2013-06-25 15:57 UTC (permalink / raw)
To: Joel Brobecker; +Cc: Mike Frysinger, gdb-patches, Anthony Green, Pierre Muller
Tom> I'm working on update-web-ari.sh.
Here it is.
Let me know what you think.
Tom
2013-06-25 Tom Tromey <tromey@redhat.com>
* contrib/ari/update-web-ari.sh: Update for version.in change.
diff --git a/gdb/contrib/ari/update-web-ari.sh b/gdb/contrib/ari/update-web-ari.sh
index ee331e4..f64c168 100644
--- a/gdb/contrib/ari/update-web-ari.sh
+++ b/gdb/contrib/ari/update-web-ari.sh
@@ -102,7 +102,7 @@ then
aridir=${srcdir}/${module}/contrib/ari
unpack_source_p=false
delete_source_p=false
- version_in=${srcdir}/${module}/version.in
+ version_in=${srcdir}/${module}/common/version.in
else
# unpack the tar-ball
if ${unpack_source_p}
@@ -132,7 +132,7 @@ else
module=`basename ${module} .tar`
srcdir=`echo ${tmpdir}/${module}*`
aridir=${HOME}/ss
- version_in=${srcdir}/gdb/version.in
+ version_in=${srcdir}/gdb/common/version.in
fi
if [ ! -r ${version_in} ]
@@ -140,8 +140,9 @@ then
echo ERROR: missing version file 1>&2
exit 1
fi
-version=`cat ${version_in}`
+bfdver=`sed -n -e 's/^.* BFD_VERSION_DATE \(.*\)$/\1/p' $srcdir/bfd/version.h`
+version=`sed -e "s/DATE/$date/" < ${version_in}`
# THIS HAS SUFFERED BIT ROT
if ${check_warning_p} && test -d "${srcdir}"
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [commit] Adapt sim to new version number & date locations.
2013-06-25 15:46 ` Tom Tromey
@ 2013-06-25 16:01 ` Eli Zaretskii
0 siblings, 0 replies; 39+ messages in thread
From: Eli Zaretskii @ 2013-06-25 16:01 UTC (permalink / raw)
To: Tom Tromey; +Cc: vapier, brobecker, gdb-patches, green
> From: Tom Tromey <tromey@redhat.com>
> Cc: Joel Brobecker <brobecker@adacore.com>, gdb-patches@sourceware.org, Anthony Green <green@moxielogic.com>
> Date: Tue, 25 Jun 2013 09:43:32 -0600
>
> >>>>> "Mike" == Mike Frysinger <vapier@gentoo.org> writes:
>
> Mike> looks like gdb/doc/gdbint.texinfo needs updating too ? it talks about
> Mike> gdb/version.in in many places ...
>
> Sure, that's the one thing that is documented extensively.
> Sigh.
>
> How about this?
Thanks.
> -@subsubheading Restart @file{gdb/version.in}
> +@subsubheading Restart @file{gdb/common/version.in}
>
> -If @file{gdb/version.in} does not contain an ISO date such as
> -@kbd{2002-01-24} then the daily @code{cronjob} won't update it. Having
> -committed all the release changes it can be set to
> -@file{5.2.0_0000-00-00-cvs} which will restart things (yes the @kbd{_}
> -is important - it affects the snapshot process).
> +If @file{gdb/common/version.in} does not the string @samp{DATE} then
^^^^^^^^^^^^^^^^^^^
"have" is missing here.
> +builds will not include the checkout date in their resulting version.
> +Having committed all the release changes it can be set to
> +@file{5.2.0_DATE-cvs} which will restart things.
>
> Don't forget the @file{ChangeLog}.
OK with that change.
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [commit] Adapt sim to new version number & date locations.
2013-06-25 15:28 ` Tom Tromey
@ 2013-06-25 16:41 ` Mike Frysinger
0 siblings, 0 replies; 39+ messages in thread
From: Mike Frysinger @ 2013-06-25 16:41 UTC (permalink / raw)
To: Tom Tromey; +Cc: Joel Brobecker, gdb-patches, Anthony Green
[-- Attachment #1: Type: Text/Plain, Size: 994 bytes --]
On Tuesday 25 June 2013 11:27:33 Tom Tromey wrote:
> >>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:
> Joel> The common and ppc parts were easy to fix, by just doing a reduced
> Joel> version of what we do for GDB and GDBserver. Moxie, on the other
> Joel> hand, needs the version info for different reasons, and I prefered
> Joel> not touching it.
>
> I looked at this a bit.
>
> Right now the code there is a bit broken. If you update your source
> tree, rebuild, and reinstall, then you can end up in a situation where
> the moxie sim reads an outdated moxie-gdb.dtb file.
>
> This can happen due to missing dependencies: the version number is built
> into the sim via a -D option, but interp.o doesn't depend on the version
> file.
>
> I think that since we don't generally support versioned installs in gdb,
> it is simplest to just drop the version number here. This fixes the bug
> and also avoids using gdb's version.in.
>
> Ok?
OK
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH v5] don't keep a gdb-specific date
2013-06-21 17:33 [PATCH v5] don't keep a gdb-specific date Tom Tromey
2013-06-21 18:00 ` Pedro Alves
2013-06-24 14:56 ` Tom Tromey
@ 2013-06-26 2:45 ` Yao Qi
2013-06-26 16:06 ` Tom Tromey
2 siblings, 1 reply; 39+ messages in thread
From: Yao Qi @ 2013-06-26 2:45 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches
On 06/22/2013 01:31 AM, Tom Tromey wrote:
> +# Create version.c from version.in.
> +# Usage:
> +# create-version.sh PATH-TO-GDB-SRCDIR HOST_ALIAS \
> +# TARGET_ALIAS OUTPUT-FILE-NAME
> +
> +srcdir="$1"
> +host_alias="$2"
> +target_alias="$3"
> +output="$4"
> +
> +rm -f version.c-tmp $output version.tmp
> +date=`sed -n -e 's/^.* BFD_VERSION_DATE \(.*\)$$/\1/p' $srcdir/../bfd/version.h`
> +sed -e "s/DATE/$date/" < $srcdir/common/version.in > version.tmp
> +echo '#include "version.h"' >> version.c-tmp
> +echo 'const char version[] = "'"`sed q version.tmp`"'";' >> version.c-tmp
> +echo 'const char host_name[] = "$host_alias";' >> version.c-tmp
> +echo 'const char target_name[] = "$target_alias";' >> version.c-tmp
> +mv version.c-tmp $output
> +rm -f version.tmp
This script breaks the build of GDBServer,
/bin/sh ../../git/gdb/gdbserver/../common/create-version.sh
../../git/gdb/gdbserver/.. \
mips-linux version.c
mv: missing destination file operand after `version.c-tmp'
Try `mv --help' for more information.
mips-linux-gnu-gcc -g -O2 -I. -I../../git/gdb/gdbserver
-I../../git/gdb/gdbserver/../common -I../../git/gdb/gdbserver/../regformats
-I../../git/gdb/gdbserver/../../include -I../../git/gdb/gdbserver/../gnulib/import
-Ibuild-gnulib-gdbserver/import -Wall -Wdeclaration-after-statement
-Wpointer-arith -Wformat-nonliteral -Wno-char-subscripts -Wempty-body
-Werror -DGDBSERVER -c -o version.o -MT version.o -MMD -MP -MF
.deps/version.Tpo version.c
mips-linux-gnu-gcc: error: version.c: No such file or directory
the gdbserver is configured as
../../git/gdb/gdbserver/configure --host=mips-linux
the target_alias is empty. The doc of autoconf says
"The variables âbuild_aliasâ, âhost_aliasâ, and âtarget_aliasâ are
always exactly the arguments of --build, --host, and --target; in
particular, they are left empty if the user did not use them, even if
the corresponding AC_CANONICAL macro was run.", so target_alias can be
empty.
> diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
> index e8470a8..e5ecdd3 100644
> --- a/gdb/gdbserver/Makefile.in
> +++ b/gdb/gdbserver/Makefile.in
> @@ -389,13 +389,9 @@ am--refresh:
>
> force:
>
> -version.c: Makefile $(srcdir)/../version.in
> - rm -f version.c-tmp version.c
> - echo '#include "server.h"' >> version.c-tmp
> - echo 'const char version[] = "'"`sed q ${srcdir}/../version.in`"'";' >> version.c-tmp
> - echo 'const char host_name[] = "$(host_alias)";' >> version.c-tmp
> - mv version.c-tmp version.c
> -version.o: version.c $(server_h)
> +version.c: Makefile $(srcdir)/../common/version.in $(srcdir)/../../bfd/version.h $(srcdir)/../common/create-version.sh
> + $(SHELL) $(srcdir)/../common/create-version.sh $(srcdir)/.. \
> + $(host_alias) $(target_alias) version.c
On the other hand, original code here only echo 'host_alias'
to version.c.
This patch is to handle the case that 'target_alias' is empty, and
unbreak the gdbserver build.
--
Yao (é½å°§)
gdb:
2013-06-26 Yao Qi <yao@codesourcery.com>
* common/create-version.sh: Update comments. Handle the case
that TARGET_ALIAS is empty.
---
gdb/common/create-version.sh | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/gdb/common/create-version.sh b/gdb/common/create-version.sh
index 2bf1a9b..53d6173 100755
--- a/gdb/common/create-version.sh
+++ b/gdb/common/create-version.sh
@@ -20,12 +20,17 @@
# Create version.c from version.in.
# Usage:
# create-version.sh PATH-TO-GDB-SRCDIR HOST_ALIAS \
-# TARGET_ALIAS OUTPUT-FILE-NAME
+# [TARGET_ALIAS] OUTPUT-FILE-NAME
srcdir="$1"
host_alias="$2"
-target_alias="$3"
-output="$4"
+
+if [ "$#" = "4" ]; then
+ target_alias="$3"
+ output="$4"
+else
+ output="$3"
+fi
rm -f version.c-tmp $output version.tmp
date=`sed -n -e 's/^.* BFD_VERSION_DATE \(.*\)$/\1/p' $srcdir/../bfd/version.h`
@@ -33,6 +38,10 @@ sed -e "s/DATE/$date/" < $srcdir/common/version.in > version.tmp
echo '#include "version.h"' >> version.c-tmp
echo 'const char version[] = "'"`sed q version.tmp`"'";' >> version.c-tmp
echo 'const char host_name[] = "'"$host_alias"'";' >> version.c-tmp
-echo 'const char target_name[] = "'"$target_alias"'";' >> version.c-tmp
+
+if [ "$#" = "4" ]; then
+ echo 'const char target_name[] = "'"$target_alias"'";' >> version.c-tmp
+fi
+
mv version.c-tmp $output
rm -f version.tmp
--
1.7.7.6
^ permalink raw reply [flat|nested] 39+ messages in thread
* sim checkout broken (was: [PATCH v5] don't keep a gdb-specific date)
2013-06-25 15:27 ` Tom Tromey
@ 2013-06-26 11:23 ` Hans-Peter Nilsson
2013-06-26 16:52 ` sim checkout broken Tom Tromey
0 siblings, 1 reply; 39+ messages in thread
From: Hans-Peter Nilsson @ 2013-06-26 11:23 UTC (permalink / raw)
To: Tom Tromey; +Cc: Joel Brobecker, gdb-patches
On Tue, 25 Jun 2013, Tom Tromey wrote:
> >>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:
>
> Tom> I'm going to try updating CVSROOT/modules and then check out some old
> Tom> branches, and see what happens. Please bear with me. I'll revert that
> Tom> change if it causes a problem.
>
> As far as I can tell, this works ok.
> You get one more non-fatal warning when checking out an old branch of "sim".
> However, seeing that there are already such warnings in a sim checkout,
> I don't think this is a problem.
There was talk about doing something with the CVS modules making
up sim, and it looks like someone did: something CVS-specific
has been done resulting in sim checkout now broken (at least for
the admittedly old 1.11.5), whereas checkout (as such) before
that wasn't broken.
Last time a checkout worked was 2013-06-25-00:13:53 UTC, like
so, with the last lines of the output being:
... (more "U"s elided)
U src/include/elf/mips.h
cvs checkout: warning: src/config.if is not (any longer) pertinent
cvs checkout: warning: src/configure.in is not (any longer) pertinent
cvs checkout: warning: src/gettext.m4 is not (any longer) pertinent
cvs checkout: warning: src/ltcf-c.sh is not (any longer) pertinent
cvs checkout: warning: src/ltcf-cxx.sh is not (any longer) pertinent
cvs checkout: warning: src/ltcf-gcj.sh is not (any longer) pertinent
cvs checkout: warning: src/ltconfig is not (any longer) pertinent
cvs checkout: warning: src/gdb/version.in is not (any longer) pertinent
(Though the cvs exit value 0 and fine.)
Then at 2013-06-25-18:03:41 UTC:
... (even more "U"s elided)
U src/include/opcode/mips.h
cvs checkout: warning: src/config.if is not (any longer) pertinent
cvs checkout: warning: src/configure.in is not (any longer) pertinent
cvs checkout: warning: src/gettext.m4 is not (any longer) pertinent
cvs checkout: warning: src/ltcf-c.sh is not (any longer) pertinent
cvs checkout: warning: src/ltcf-cxx.sh is not (any longer) pertinent
cvs checkout: warning: src/ltcf-gcj.sh is not (any longer) pertinent
cvs checkout: warning: src/ltconfig is not (any longer) pertinent
cvs checkout: existing repository /cvs/src/CVSROOT/Emptydir does not match /cvs/src/src/gdb
cvs checkout: ignoring module src/gdb/version.in
(Here, the cvs exit value is indicating badness, as in
make: *** [update] Error 1
)
Can the action causing that Emptydir please be reverted?
And/or explained, maybe with a line indicating "better
switch to CVS-N.M".
Sorry for implicating you guys, but it's likely you know what
might have happened. At least more so than I, at the moment. :)
brgds, H-P
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH v5] don't keep a gdb-specific date
2013-06-26 2:45 ` Yao Qi
@ 2013-06-26 16:06 ` Tom Tromey
2013-06-27 2:11 ` Yao Qi
0 siblings, 1 reply; 39+ messages in thread
From: Tom Tromey @ 2013-06-26 16:06 UTC (permalink / raw)
To: Yao Qi; +Cc: gdb-patches
>>>>> "Yao" == Yao Qi <yao@codesourcery.com> writes:
Yao> 2013-06-26 Yao Qi <yao@codesourcery.com>
Yao> * common/create-version.sh: Update comments. Handle the case
Yao> that TARGET_ALIAS is empty.
Ok.
Tom
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: sim checkout broken
2013-06-26 11:23 ` sim checkout broken (was: [PATCH v5] don't keep a gdb-specific date) Hans-Peter Nilsson
@ 2013-06-26 16:52 ` Tom Tromey
2013-06-26 17:58 ` Hans-Peter Nilsson
0 siblings, 1 reply; 39+ messages in thread
From: Tom Tromey @ 2013-06-26 16:52 UTC (permalink / raw)
To: Hans-Peter Nilsson; +Cc: Joel Brobecker, gdb-patches
H-P> There was talk about doing something with the CVS modules making
H-P> up sim, and it looks like someone did: something CVS-specific
H-P> has been done resulting in sim checkout now broken (at least for
H-P> the admittedly old 1.11.5), whereas checkout (as such) before
H-P> that wasn't broken.
H-P> ... (even more "U"s elided)
H-P> U src/include/opcode/mips.h
H-P> cvs checkout: warning: src/config.if is not (any longer) pertinent
H-P> cvs checkout: warning: src/configure.in is not (any longer) pertinent
H-P> cvs checkout: warning: src/gettext.m4 is not (any longer) pertinent
H-P> cvs checkout: warning: src/ltcf-c.sh is not (any longer) pertinent
H-P> cvs checkout: warning: src/ltcf-cxx.sh is not (any longer) pertinent
H-P> cvs checkout: warning: src/ltcf-gcj.sh is not (any longer) pertinent
H-P> cvs checkout: warning: src/ltconfig is not (any longer) pertinent
H-P> cvs checkout: existing repository /cvs/src/CVSROOT/Emptydir does not
H-P> match /cvs/src/src/gdb
H-P> cvs checkout: ignoring module src/gdb/version.in
H-P> Can the action causing that Emptydir please be reverted?
H-P> And/or explained, maybe with a line indicating "better
H-P> switch to CVS-N.M".
Could you say exactly what you are doing? Did you do a fresh checkout?
Or check out into an existing source tree? If the latter, was that tree
populated using a different module previously?
Indeed, if I run the same "cvs co sim" command twice, the second time I
get:
cvs checkout: existing repository /cvs/src/CVSROOT/Emptydir does not match /cvs/src/src/gdb
... but cvs still exits with status 0 for me.
I'm using cvs 1.11.23. I suppose you could try upgrading, but I don't
know whether that would help or not.
Maybe I can reproduce the exit failure with more information.
Not sure what else to do.
Maybe have sim not depend on this file of gdb's.
Tom
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: sim checkout broken
2013-06-26 16:52 ` sim checkout broken Tom Tromey
@ 2013-06-26 17:58 ` Hans-Peter Nilsson
2013-06-27 3:22 ` Tom Tromey
0 siblings, 1 reply; 39+ messages in thread
From: Hans-Peter Nilsson @ 2013-06-26 17:58 UTC (permalink / raw)
To: Tom Tromey; +Cc: Joel Brobecker, gdb-patches
On Wed, 26 Jun 2013, Tom Tromey wrote:
> H-P> cvs checkout: ignoring module src/gdb/version.in
>
> H-P> Can the action causing that Emptydir please be reverted?
> H-P> And/or explained, maybe with a line indicating "better
> H-P> switch to CVS-N.M".
>
> Could you say exactly what you are doing?
Oh my, seems I'm a victim of the reproducibility-ignorance-demon
despite extensive training. Sorry about that. Hubris, I guess. :/
> Did you do a fresh checkout?
Nope, not that time, but below I just did.
> Or check out into an existing source tree?
Yes: a tree checked out prior to the recent changes.
(Exactly when is hopefully unimportant - decades ago.)
> If the latter, was that tree
> populated using a different module previously?
Just the same "sim" module as before the changes.
And apparently even that detail doesn't matter:
> Indeed, if I run the same "cvs co sim" command twice, the second time I
> get:
>
> cvs checkout: existing repository /cvs/src/CVSROOT/Emptydir does not match /cvs/src/src/gdb
>
> ... but cvs still exits with status 0 for me.
Odd; it being 1 for me doesn't seem version-dependent.
Starting from scratch, at a second "cvs -d
:pserver:anoncvs@sourceware.org:/cvs/src co sim" I get:
cvs checkout: warning: src/config.if is not (any longer) pertinent
cvs checkout: warning: src/configure.in is not (any longer) pertinent
cvs checkout: warning: src/gettext.m4 is not (any longer) pertinent
cvs checkout: warning: src/ltcf-c.sh is not (any longer) pertinent
cvs checkout: warning: src/ltcf-cxx.sh is not (any longer) pertinent
cvs checkout: warning: src/ltcf-gcj.sh is not (any longer) pertinent
cvs checkout: warning: src/ltconfig is not (any longer) pertinent
cvs checkout: existing repository /cvs/src/CVSROOT/Emptydir does not match /cvs/src/src/gdb
cvs checkout: ignoring module src/gdb/version.in
and then exit value 1 (cvs 1.11.5).
> I'm using cvs 1.11.23. I suppose you could try upgrading, but I don't
> know whether that would help or not.
I don't think it would. On another machine, at the second
checkout (with the first identical command populating the tree)
with a CVS version apparently matching yours, the same thing
happens:
[hp@derp sim]$ cvs -d :pserver:anoncvs@sourceware.org:/cvs/src co sim
cvs checkout: warning: src/config.if is not (any longer) pertinent
cvs checkout: warning: src/configure.in is not (any longer) pertinent
cvs checkout: warning: src/gettext.m4 is not (any longer) pertinent
cvs checkout: warning: src/ltcf-c.sh is not (any longer) pertinent
cvs checkout: warning: src/ltcf-cxx.sh is not (any longer) pertinent
cvs checkout: warning: src/ltcf-gcj.sh is not (any longer) pertinent
cvs checkout: warning: src/ltconfig is not (any longer) pertinent
cvs checkout: existing repository /cvs/src/CVSROOT/Emptydir does not match /cvs/src/src/gdb
cvs checkout: ignoring module src/gdb/version.in
[hp@derp sim]$ echo $?
1
[hp@derp sim]$ rpm -q cvs
cvs-1.11.23-25.fc17.x86_64
> Maybe I can reproduce the exit failure with more information.
>
>
> Not sure what else to do.
But what is the cause of the error? Can't we just remove that
Emptydir or revert what was done? The message above seems to
indicate an operational error in whatever was done.
Thanks for your efforts.
brgds, H-P
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH v5] don't keep a gdb-specific date
2013-06-26 16:06 ` Tom Tromey
@ 2013-06-27 2:11 ` Yao Qi
0 siblings, 0 replies; 39+ messages in thread
From: Yao Qi @ 2013-06-27 2:11 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches
On 06/26/2013 11:40 PM, Tom Tromey wrote:
>>>>>> "Yao" == Yao Qi <yao@codesourcery.com> writes:
>
> Yao> 2013-06-26 Yao Qi <yao@codesourcery.com>
>
> Yao> * common/create-version.sh: Update comments. Handle the case
> Yao> that TARGET_ALIAS is empty.
>
> Ok.
>
Patch is committed.
--
Yao (é½å°§)
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: sim checkout broken
2013-06-26 17:58 ` Hans-Peter Nilsson
@ 2013-06-27 3:22 ` Tom Tromey
2013-06-27 4:05 ` Hans-Peter Nilsson
2013-06-27 8:19 ` Andreas Schwab
0 siblings, 2 replies; 39+ messages in thread
From: Tom Tromey @ 2013-06-27 3:22 UTC (permalink / raw)
To: Hans-Peter Nilsson; +Cc: Joel Brobecker, gdb-patches
Tom> Could you say exactly what you are doing?
H-P> Oh my, seems I'm a victim of the reproducibility-ignorance-demon
H-P> despite extensive training. Sorry about that. Hubris, I guess. :/
Don't worry about it.
Tom> Indeed, if I run the same "cvs co sim" command twice, the second time I
Tom> get:
Tom>
Tom> cvs checkout: existing repository /cvs/src/CVSROOT/Emptydir does not
Tom> match /cvs/src/src/gdb
Tom>
Tom> ... but cvs still exits with status 0 for me.
H-P> Odd; it being 1 for me doesn't seem version-dependent.
Ugh.
H-P> cvs checkout: existing repository /cvs/src/CVSROOT/Emptydir does not
H-P> match /cvs/src/src/gdb
H-P> I don't think it would. On another machine, at the second
H-P> checkout (with the first identical command populating the tree)
H-P> with a CVS version apparently matching yours, the same thing
H-P> happens:
H-P> cvs checkout: existing repository /cvs/src/CVSROOT/Emptydir does not
H-P> match /cvs/src/src/gdb
H-P> cvs checkout: ignoring module src/gdb/version.in
H-P> [hp@derp sim]$ echo $?
H-P> 1
H-P> [hp@derp sim]$ rpm -q cvs
H-P> cvs-1.11.23-25.fc17.x86_64
There must be some difference since:
barimba. cvs -d :pserver:anoncvs@sourceware.org:/cvs/src co sim
[...]
cvs checkout: Updating src/intl
cvs checkout: existing repository /cvs/src/CVSROOT/Emptydir does not match /cvs/src/src/gdb
cvs checkout: ignoring module src/gdb/version.in
barimba. echo $?
0
I have:
barimba. rpm -q cvs
cvs-1.11.23-29.fc18.x86_64
Based on "rpm -q --changelog" it is hard to believe that anything
between -25 and -29 changed this.
H-P> But what is the cause of the error? Can't we just remove that
H-P> Emptydir or revert what was done? The message above seems to
H-P> indicate an operational error in whatever was done.
Based on my searches it seems to be a CVS issue.
CVS, IIUC, puts "Emptydir" into the Repository file of some directories
in some situations. This later confuses it.
I don't really understand this, though, since no Repository file in my
checkout actually has this.
Maybe we should just give up on part of this patch and move the
version.in file back out of "common".
sim really should not be using this file.
Tom
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: sim checkout broken
2013-06-27 3:22 ` Tom Tromey
@ 2013-06-27 4:05 ` Hans-Peter Nilsson
2013-06-27 15:22 ` Tom Tromey
2013-06-27 8:19 ` Andreas Schwab
1 sibling, 1 reply; 39+ messages in thread
From: Hans-Peter Nilsson @ 2013-06-27 4:05 UTC (permalink / raw)
To: Tom Tromey; +Cc: Joel Brobecker, gdb-patches
On Wed, 26 Jun 2013, Tom Tromey wrote:
> barimba. cvs -d :pserver:anoncvs@sourceware.org:/cvs/src co sim
> [...]
> cvs checkout: Updating src/intl
> cvs checkout: existing repository /cvs/src/CVSROOT/Emptydir does not match /cvs/src/src/gdb
> cvs checkout: ignoring module src/gdb/version.in
> barimba. echo $?
> 0
>
> I have:
>
> barimba. rpm -q cvs
> cvs-1.11.23-29.fc18.x86_64
>
> Based on "rpm -q --changelog" it is hard to believe that anything
> between -25 and -29 changed this.
What about ~/.cvsrc?
I just have a single line:
cvs -z3
(I also had a "-q" there before, but removed it to try to match
your output and the last three lines are now the same. Still
does exit(1) on the update, though. Also still exit(0) for the
original checkout. I also tried adding a "checkout -P" there,
no change.)
> H-P> But what is the cause of the error? Can't we just remove that
> H-P> Emptydir or revert what was done? The message above seems to
> H-P> indicate an operational error in whatever was done.
>
> Based on my searches it seems to be a CVS issue.
> CVS, IIUC, puts "Emptydir" into the Repository file of some directories
> in some situations. This later confuses it.
> I don't really understand this, though, since no Repository file in my
> checkout actually has this.
Bah.
> Maybe we should just give up on part of this patch and move the
> version.in file back out of "common".
Give up? What's that? :P
> sim really should not be using this file.
Yeah well maybe, but gdb/version.in (or somesuch) was necessary
to build at the time and adding it to the sim module was the
pragmatic solution at the time. I didn't do it myself, but I
did suggest it or at least agreed to it, IIRC. :}
brgds, H-P
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: sim checkout broken
2013-06-27 3:22 ` Tom Tromey
2013-06-27 4:05 ` Hans-Peter Nilsson
@ 2013-06-27 8:19 ` Andreas Schwab
1 sibling, 0 replies; 39+ messages in thread
From: Andreas Schwab @ 2013-06-27 8:19 UTC (permalink / raw)
To: Tom Tromey; +Cc: Hans-Peter Nilsson, Joel Brobecker, gdb-patches
Tom Tromey <tromey@redhat.com> writes:
> H-P> But what is the cause of the error? Can't we just remove that
> H-P> Emptydir or revert what was done? The message above seems to
> H-P> indicate an operational error in whatever was done.
>
> Based on my searches it seems to be a CVS issue.
I think the issue is that src/gdb/version.in no longer exists and
additionally is in a directory that itself is not part of the module.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: sim checkout broken
2013-06-27 4:05 ` Hans-Peter Nilsson
@ 2013-06-27 15:22 ` Tom Tromey
2013-06-27 16:30 ` Tom Tromey
0 siblings, 1 reply; 39+ messages in thread
From: Tom Tromey @ 2013-06-27 15:22 UTC (permalink / raw)
To: Hans-Peter Nilsson; +Cc: Joel Brobecker, gdb-patches
H-P> What about ~/.cvsrc?
H-P> I just have a single line:
H-P> cvs -z3
Yeah, good point. I didn't try that.
The reason it works for me is this line from .cvsrc:
checkout -P
Hopefully you don't mind adding this, and we can consider the problem
closed, or at least worked around.
Tom> sim really should not be using this file.
H-P> Yeah well maybe, but gdb/version.in (or somesuch) was necessary
H-P> to build at the time and adding it to the sim module was the
H-P> pragmatic solution at the time. I didn't do it myself, but I
H-P> did suggest it or at least agreed to it, IIRC. :}
I feel like I was a bit too harsh here. I'm sorry.
Tom
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: sim checkout broken
2013-06-27 15:22 ` Tom Tromey
@ 2013-06-27 16:30 ` Tom Tromey
2013-06-27 17:09 ` RFC: move common/version.in to gdb/ (Was: sim checkout broken) Tom Tromey
2013-06-27 17:27 ` sim checkout broken Hans-Peter Nilsson
0 siblings, 2 replies; 39+ messages in thread
From: Tom Tromey @ 2013-06-27 16:30 UTC (permalink / raw)
To: Hans-Peter Nilsson; +Cc: Joel Brobecker, gdb-patches
Tom> Yeah, good point. I didn't try that.
Tom> The reason it works for me is this line from .cvsrc:
Tom> checkout -P
Well, that works for the initial checkout, but now I can't make it work
at all for subsequent checkouts. I don't get it, since I know this was
working yesterday.
I think moving the file out of 'common' should help.
Tom
^ permalink raw reply [flat|nested] 39+ messages in thread
* RFC: move common/version.in to gdb/ (Was: sim checkout broken)
2013-06-27 16:30 ` Tom Tromey
@ 2013-06-27 17:09 ` Tom Tromey
2013-06-28 3:18 ` Hans-Peter Nilsson
2013-06-27 17:27 ` sim checkout broken Hans-Peter Nilsson
1 sibling, 1 reply; 39+ messages in thread
From: Tom Tromey @ 2013-06-27 17:09 UTC (permalink / raw)
To: Hans-Peter Nilsson; +Cc: Joel Brobecker, gdb-patches
Tom> I think moving the file out of 'common' should help.
Here's the patch.
Let me know what you think.
Once it goes in I will update the modules file.
I also have updated versions of my ARI and src-release patches that I
will send.
Tom
gdb
* Makefile.in (version.c): Use version.in, not
common/version.in.
* common/create-version.sh: Likewise.
* common/version.in: Move...
* version.in: ...here.
gdb/doc
* Makefile.in (version.subst): Use version.in, not
common/version.in.
* gdbint.texinfo (Versions and Branches, Releasing GDB):
Likewise.
gdb/gdbserver
* Makefile.in (version.c): Use version.in, not
common/version.in.
sim/common
* Make-common.in (version.c): Use version.in, not
common/version.in.
* create-version.sh: Likewise.
sim/ppc:
* Make-common.in (version.c): Use version.in, not
common/version.in.
---
gdb/Makefile.in | 2 +-
gdb/common/create-version.sh | 2 +-
gdb/common/version.in | 1 -
gdb/doc/Makefile.in | 4 ++--
gdb/doc/gdbint.texinfo | 34 +++++++++++++++++-----------------
gdb/gdbserver/Makefile.in | 2 +-
gdb/version.in | 1 +
sim/common/Make-common.in | 2 +-
sim/common/create-version.sh | 2 +-
sim/ppc/Makefile.in | 2 +-
10 files changed, 26 insertions(+), 26 deletions(-)
delete mode 100644 gdb/common/version.in
create mode 100644 gdb/version.in
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index c27c03a..aca5dbf 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1421,7 +1421,7 @@ $(srcdir)/copying.c: @MAINTAINER_MODE_TRUE@ $(srcdir)/../COPYING3 $(srcdir)/copy
< $(srcdir)/../COPYING3 > $(srcdir)/copying.tmp
mv $(srcdir)/copying.tmp $(srcdir)/copying.c
-version.c: Makefile common/version.in $(srcdir)/../bfd/version.h $(srcdir)/common/create-version.sh
+version.c: Makefile version.in $(srcdir)/../bfd/version.h $(srcdir)/common/create-version.sh
$(SHELL) $(srcdir)/common/create-version.sh $(srcdir) \
$(host_alias) $(target_alias) version.c
diff --git a/gdb/common/create-version.sh b/gdb/common/create-version.sh
index 53d6173..0bdd0fd 100755
--- a/gdb/common/create-version.sh
+++ b/gdb/common/create-version.sh
@@ -34,7 +34,7 @@ fi
rm -f version.c-tmp $output version.tmp
date=`sed -n -e 's/^.* BFD_VERSION_DATE \(.*\)$/\1/p' $srcdir/../bfd/version.h`
-sed -e "s/DATE/$date/" < $srcdir/common/version.in > version.tmp
+sed -e "s/DATE/$date/" < $srcdir/version.in > version.tmp
echo '#include "version.h"' >> version.c-tmp
echo 'const char version[] = "'"`sed q version.tmp`"'";' >> version.c-tmp
echo 'const char host_name[] = "'"$host_alias"'";' >> version.c-tmp
diff --git a/gdb/common/version.in b/gdb/common/version.in
deleted file mode 100644
index 99adaca..0000000
--- a/gdb/common/version.in
+++ /dev/null
@@ -1 +0,0 @@
-7.6.50.DATE-cvs
diff --git a/gdb/doc/Makefile.in b/gdb/doc/Makefile.in
index d4ab738..ba8dd39 100644
--- a/gdb/doc/Makefile.in
+++ b/gdb/doc/Makefile.in
@@ -396,9 +396,9 @@ GDBvn.texi : version.subst
fi
mv GDBvn.new GDBvn.texi
-version.subst: $(gdbdir)/common/version.in $(gdbdir)/../bfd/version.h
+version.subst: $(gdbdir)/version.in $(gdbdir)/../bfd/version.h
date=`sed -n -e 's/^.* BFD_VERSION_DATE \(.*\)$$/\1/p' $(gdbdir)/../bfd/version.h`; \
- sed -e "s/DATE/$$date/" < $(gdbdir)/common/version.in > version.subst
+ sed -e "s/DATE/$$date/" < $(gdbdir)/version.in > version.subst
# Updated atomically
.PRECIOUS: GDBvn.texi
diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo
index 8f82611..5aed3b3 100644
--- a/gdb/doc/gdbint.texinfo
+++ b/gdb/doc/gdbint.texinfo
@@ -6632,7 +6632,7 @@ Specific Information, gdb, Debugging with @value{GDBN}}).
@section Versions
@value{GDBN}'s version is determined by the file
-@file{gdb/common/version.in} and takes one of the following forms:
+@file{gdb/version.in} and takes one of the following forms:
@table @asis
@item @var{major}.@var{minor}
@@ -6736,7 +6736,7 @@ branch tag, denoting the head of the branch, does not need this.}
@cindex vendor branches
To avoid version conflicts, vendors are expected to modify the file
-@file{gdb/common/version.in} to include a vendor unique alphabetic identifier
+@file{gdb/version.in} to include a vendor unique alphabetic identifier
(an official @value{GDBN} release never uses alphabetic characters in
its version identifier). E.g., @samp{6.2widgit2}, or @samp{6.2 (Widgit
Inc Patch 2)}.
@@ -6785,7 +6785,7 @@ The @value{GDBN} module @code{gdb} should be specified when creating a
branch (branches of individual files should be avoided). @xref{Tags}.
@item a branch shall be branded using @file{version.in}
-The file @file{gdb/common/version.in} shall be modified so that it identifies
+The file @file{gdb/version.in} shall be modified so that it identifies
the branch @var{owner} and branch @var{name}, e.g.,
@samp{6.2.50.20030303_owner_name} or @samp{6.2 (Owner Name)}.
@@ -7063,16 +7063,16 @@ $ echo $u $v$V
5.1 5_2
$ cd /tmp
$ echo cvs -f -d :ext:sourceware.org:/cvs/src co \
--r gdb_$V-branch src/gdb/common/version.in
+-r gdb_$V-branch src/gdb/version.in
cvs -f -d :ext:sourceware.org:/cvs/src co
- -r gdb_5_2-branch src/gdb/common/version.in
+ -r gdb_5_2-branch src/gdb/version.in
$ ^echo ^^
-U src/gdb/common/version.in
+U src/gdb/version.in
$ cd src/gdb
-$ echo $u.90-DATE-cvs > common/version.in
-$ cat common/version.in
+$ echo $u.90-DATE-cvs > version.in
+$ cat version.in
5.1.90-DATE-cvs
-$ cvs -f commit common/version.in
+$ cvs -f commit version.in
@end smallexample
@itemize @bullet
@@ -7272,18 +7272,18 @@ to get it updated.}
@file{INSTALL} from the core documentation. This might be worth
pursuing.}
-@item gdb/common/version.in
+@item gdb/version.in
@smallexample
-$ echo $v > gdb/src/gdb/common/version.in
-$ cat gdb/src/gdb/common/version.in
+$ echo $v > gdb/src/gdb/version.in
+$ cat gdb/src/gdb/version.in
5.2
-$ emacs gdb/src/gdb/common/version.in
+$ emacs gdb/src/gdb/version.in
...
c-x 4 a
... Bump to version ...
c-x c-s c-x c-c
-$ cp gdb/src/gdb/common/version.in insight/src/gdb/common/version.in
+$ cp gdb/src/gdb/version.in insight/src/gdb/version.in
$ cp gdb/src/gdb/ChangeLog insight/src/gdb/ChangeLog
@end smallexample
@@ -7528,7 +7528,7 @@ In particular you'll need to commit any changes to:
@item
@file{gdb/ChangeLog}
@item
-@file{gdb/common/version.in}
+@file{gdb/version.in}
@item
@file{gdb/NEWS}
@item
@@ -7555,9 +7555,9 @@ Insight is used since that contains more of the release than
Just put something in the @file{ChangeLog} so that the trunk also
indicates when the release was made.
-@subsubheading Restart @file{gdb/common/version.in}
+@subsubheading Restart @file{gdb/version.in}
-If @file{gdb/common/version.in} does not have the string @samp{DATE} then
+If @file{gdb/version.in} does not have the string @samp{DATE} then
builds will not include the checkout date in their resulting version.
Having committed all the release changes it can be set to
@file{5.2.0_DATE-cvs} which will restart things.
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index e5ecdd3..d6c3ea8 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -389,7 +389,7 @@ am--refresh:
force:
-version.c: Makefile $(srcdir)/../common/version.in $(srcdir)/../../bfd/version.h $(srcdir)/../common/create-version.sh
+version.c: Makefile $(srcdir)/../version.in $(srcdir)/../../bfd/version.h $(srcdir)/../common/create-version.sh
$(SHELL) $(srcdir)/../common/create-version.sh $(srcdir)/.. \
$(host_alias) $(target_alias) version.c
diff --git a/gdb/version.in b/gdb/version.in
new file mode 100644
index 0000000..99adaca
--- /dev/null
+++ b/gdb/version.in
@@ -0,0 +1 @@
+7.6.50.DATE-cvs
diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in
index 769f782..afa3894 100644
--- a/sim/common/Make-common.in
+++ b/sim/common/Make-common.in
@@ -300,7 +300,7 @@ stamp-tvals: gentmap
$(SHELL) $(srcroot)/move-if-change tmp-tmap.c targ-map.c
touch stamp-tvals
-version.c: Makefile $(srccom)/create-version.sh ../../bfd/version.h ../../gdb/common/version.in
+version.c: Makefile $(srccom)/create-version.sh ../../bfd/version.h ../../gdb/version.in
$(SHELL) $(srccom)/create-version.sh $(srccom) version.c
#
diff --git a/sim/common/create-version.sh b/sim/common/create-version.sh
index aaf2ab3..7464277 100755
--- a/sim/common/create-version.sh
+++ b/sim/common/create-version.sh
@@ -26,7 +26,7 @@ output="$2"
rm -f version.c-tmp $output version.tmp
date=`sed -n -e 's/^.* BFD_VERSION_DATE \(.*\)$/\1/p' $srcdir/../../bfd/version.h`
-sed -e "s/DATE/$date/" < $srcdir/../../gdb/common/version.in > version.tmp
+sed -e "s/DATE/$date/" < $srcdir/../../gdb/version.in > version.tmp
echo '#include "version.h"' >> version.c-tmp
echo 'const char version[] = "'"`sed q version.tmp`"'";' >> version.c-tmp
mv version.c-tmp $output
diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in
index 1652b24..75bb9c3 100644
--- a/sim/ppc/Makefile.in
+++ b/sim/ppc/Makefile.in
@@ -563,7 +563,7 @@ $(TARGETLIB): tmp-igen tmp-dgen tmp-hw tmp-pk tmp-defines $(LIB_OBJ) $(GDB_OBJ)
$(AR) $(AR_FLAGS) $(TARGETLIB) $(LIB_OBJ) $(GDB_OBJ)
$(RANLIB) $(TARGETLIB)
-version.c: Makefile $(srccom)/create-version.sh ../../bfd/version.h ../../gdb/common/version.in
+version.c: Makefile $(srccom)/create-version.sh ../../bfd/version.h ../../gdb/version.in
$(SHELL) $(srccom)/create-version.sh $(srccom) version.c
version.o: version.c $(version_h)
--
1.8.1.4
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: sim checkout broken
2013-06-27 16:30 ` Tom Tromey
2013-06-27 17:09 ` RFC: move common/version.in to gdb/ (Was: sim checkout broken) Tom Tromey
@ 2013-06-27 17:27 ` Hans-Peter Nilsson
1 sibling, 0 replies; 39+ messages in thread
From: Hans-Peter Nilsson @ 2013-06-27 17:27 UTC (permalink / raw)
To: Tom Tromey; +Cc: Joel Brobecker, gdb-patches
On Thu, 27 Jun 2013, Tom Tromey wrote:
> Tom> Yeah, good point. I didn't try that.
> Tom> The reason it works for me is this line from .cvsrc:
>
> Tom> checkout -P
>
> Well, that works for the initial checkout, but now I can't make it work
> at all for subsequent checkouts. I don't get it, since I know this was
> working yesterday.
It probably stopped working when you read that I'd tried that
too! 8] On the bright side, it looks like you've repeated my
observation. Or maybe not really brighter but at least a
change in illumination.
I copied the entire src repo out of sourceware (~5GiB, a
445025730 tarball, so I could experiment with different
solutions - and luckily no-one checked in something
significant while I copied).
After a necessary adjustment (changing LockDir in
CVSROOT/config) checking out locally, with -d /path/to/cvsfiles
works (i.e. complains but exits 0). Weirdness. It's not the
pserver method because I get the same behavior using ssh; i.e.
-d :ext:hp@sourc...
For the record, the ~/.cvsrc trying ssh was:
diff -N -p -u
cvs -z3 -q
checkout -P
update -Pd
Luckily I get the same exit(1) behavior using the ssh method
with my copy of the repo, so I'll try some semi-random ideas.
(And I welcome any hunch.)
> I think moving the file out of 'common' should help.
Maybe. I'm not so sure but I'll try it locally.
By the way, I re-noticed the CVSROOT/history file, with about
1532526399 bytes of useless information (AFAIK). It even has a
history.old 2147487356 bytes long. Time for a history.old2
early next year? Ok, I'm digressing. Can't we just switch to
git? :D
brgds, H-P
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: RFC: move common/version.in to gdb/ (Was: sim checkout broken)
2013-06-27 17:09 ` RFC: move common/version.in to gdb/ (Was: sim checkout broken) Tom Tromey
@ 2013-06-28 3:18 ` Hans-Peter Nilsson
2013-06-28 18:17 ` RFC: move common/version.in to gdb/ Tom Tromey
0 siblings, 1 reply; 39+ messages in thread
From: Hans-Peter Nilsson @ 2013-06-28 3:18 UTC (permalink / raw)
To: Tom Tromey; +Cc: Joel Brobecker, gdb-patches
On Thu, 27 Jun 2013, Tom Tromey wrote:
> Tom> I think moving the file out of 'common' should help.
>
> Here's the patch.
>
> Let me know what you think.
Thanks! It works, but it's sad to be forced to keep
src/gdb/version.in.
Though, I admit I didn't try much when I saw your patch, but at
least I checked and it doesn't help moving the gdb-version-files
to their own module alias. That's odd, because the src-support
module alias *also* mentions non-pertinent (long gone) files; it
seemed just the same as for the attempted gdb-version module
below, except for gdb-version mentioning a file one directory
deeper. So, I'm still somewhat lost as to what the reason is
for that "Emptydir"-complaint and exit(1). I guess I could
debug cvs, but I'm not really that deeply interested. Here's
what I tried. Before that, as you probably imagine, I tried
having gdb-version at the end of the sim module alias. Again:
*DO NOT APPLY* the following patch; it's wrong; it doesn't make
a difference:
Index: modules
===================================================================
RCS file: /home/hp/derp/srccvs/cvsfiles/CVSROOT/modules,v
retrieving revision 1.79
retrieving revision 1.80
diff -p -u -r1.79 -r1.80
--- modules 25 Jun 2013 15:01:34 -0000 1.79
+++ modules 27 Jun 2013 22:27:52 -0000 1.80
@@ -135,11 +135,18 @@ dejagnu -a naked-dejagnu naked-expect n
naked-texinfo naked-libiberty naked-include \
src/djunpack.bat
+# This module, gdb-version, must not be mentioned last in any using
+# module due to either file expected to be missing, or else CVS exits
+# with non-zero value on subsequent checkouts, which is the required
+# update method as "cvs update" "updates" by checking out the *rest* of
+# the src tree.
+gdb-version -a src/gdb/version.in \
+ src/gdb/common/version.in
+
naked-sim -a src/sim
sim -a naked-sim naked-bfd naked-opcodes \
naked-libiberty naked-include \
- src-support naked-intl src/gdb/version.in \
- src/gdb/common/version.in
+ src-support gdb-version naked-intl
# OLD-GDB contains everything that ever was in GDB. It can be used to
# check out out old GDB branches and as an approximation for an old
*DO NOT APPLY* the patch above.
> Once it goes in I will update the modules file.
Not really necessary, but for the record, I verified that
nothing bad happened (could still checkout**2 with exit 0) with
the patch below in the local repo copy:
Index: modules
===================================================================
RCS file: /home/hp/derp/srccvs/cvsfiles/CVSROOT/modules,v
retrieving revision 1.79
diff -p -u -r1.79 modules
--- modules 25 Jun 2013 15:01:34 -0000 1.79
+++ modules 27 Jun 2013 23:02:42 -0000
@@ -138,8 +138,7 @@ dejagnu -a naked-dejagnu naked-expect n
naked-sim -a src/sim
sim -a naked-sim naked-bfd naked-opcodes \
naked-libiberty naked-include \
- src-support naked-intl src/gdb/version.in \
- src/gdb/common/version.in
+ src-support naked-intl src/gdb/version.in
# OLD-GDB contains everything that ever was in GDB. It can be used to
# check out out old GDB branches and as an approximation for an old
Thank you for your efforts. If you want to try something else
module-wise, I'll hang on to the repo copy for a little while
longer, or maybe you want it uploaded to try something yourself
(need to tweak config, commitinfo and loginfo to comment-out the
sourceware-specific script calls). I think that'd take a few
hours though, (the usual) asymmetric network speed factors apply
here.
brgds, H-P
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: RFC: move common/version.in to gdb/
2013-06-28 3:18 ` Hans-Peter Nilsson
@ 2013-06-28 18:17 ` Tom Tromey
0 siblings, 0 replies; 39+ messages in thread
From: Tom Tromey @ 2013-06-28 18:17 UTC (permalink / raw)
To: Hans-Peter Nilsson; +Cc: Joel Brobecker, gdb-patches
>>>>> "H-P" == Hans-Peter Nilsson <hp@bitrange.com> writes:
H-P> Thanks! It works, but it's sad to be forced to keep
H-P> src/gdb/version.in.
Yeah. It's unfortunate. I consider it penance for still using CVS.
I'm going to check it in now.
Tom
^ permalink raw reply [flat|nested] 39+ messages in thread
end of thread, other threads:[~2013-06-28 18:11 UTC | newest]
Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-21 17:33 [PATCH v5] don't keep a gdb-specific date Tom Tromey
2013-06-21 18:00 ` Pedro Alves
2013-06-24 14:56 ` Tom Tromey
2013-06-24 19:22 ` Joel Brobecker
2013-06-24 22:41 ` [commit] Fix host_name and target_name generation by common/create-version.sh Joel Brobecker
2013-06-24 22:59 ` [PATCH v5] don't keep a gdb-specific date Joel Brobecker
2013-06-24 23:58 ` [commit] Adapt sim to new version number & date locations Joel Brobecker
2013-06-25 0:52 ` Mike Frysinger
2013-06-25 1:53 ` Joel Brobecker
2013-06-25 15:51 ` Tom Tromey
2013-06-25 15:57 ` Tom Tromey
2013-06-25 15:46 ` Tom Tromey
2013-06-25 16:01 ` Eli Zaretskii
2013-06-25 15:28 ` Tom Tromey
2013-06-25 16:41 ` Mike Frysinger
2013-06-25 1:08 ` [PATCH v5] don't keep a gdb-specific date Hans-Peter Nilsson
2013-06-25 14:16 ` Tom Tromey
2013-06-25 14:25 ` Joel Brobecker
2013-06-25 14:43 ` Tom Tromey
2013-06-25 15:27 ` Tom Tromey
2013-06-26 11:23 ` sim checkout broken (was: [PATCH v5] don't keep a gdb-specific date) Hans-Peter Nilsson
2013-06-26 16:52 ` sim checkout broken Tom Tromey
2013-06-26 17:58 ` Hans-Peter Nilsson
2013-06-27 3:22 ` Tom Tromey
2013-06-27 4:05 ` Hans-Peter Nilsson
2013-06-27 15:22 ` Tom Tromey
2013-06-27 16:30 ` Tom Tromey
2013-06-27 17:09 ` RFC: move common/version.in to gdb/ (Was: sim checkout broken) Tom Tromey
2013-06-28 3:18 ` Hans-Peter Nilsson
2013-06-28 18:17 ` RFC: move common/version.in to gdb/ Tom Tromey
2013-06-27 17:27 ` sim checkout broken Hans-Peter Nilsson
2013-06-27 8:19 ` Andreas Schwab
2013-06-25 14:50 ` [PATCH v5] don't keep a gdb-specific date Pedro Alves
2013-06-25 14:53 ` Joel Brobecker
2013-06-25 15:01 ` Tom Tromey
2013-06-25 15:14 ` Pedro Alves
2013-06-26 2:45 ` Yao Qi
2013-06-26 16:06 ` Tom Tromey
2013-06-27 2:11 ` Yao Qi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox