* [PATCH v2] don't keep a gdb-specific date
@ 2013-06-19 18:23 Tom Tromey
2013-06-19 18:33 ` Pedro Alves
0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2013-06-19 18:23 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 bfdver.h and changes version.in to use the
placeholder string "DATE" for those times when a date is wanted.
I remove 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.
* Makefile.in (version.c): Use bfd/version.h.
* version.in: Replace date with "DATE".
* Makefile.in (version.c): Use bfd/version.h.
---
gdb/Makefile.in | 9 ++++++---
gdb/gdbserver/Makefile.in | 9 ++++++---
gdb/version.in | 2 +-
3 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index a6336a2..7932eef 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1420,13 +1420,16 @@ $(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
+version.c: Makefile version.in $(srcdir)/../bfd/version.h
+ rm -f version.c-tmp version.c version.tmp
+ date=`sed -n -e 's/^.* BFD_VERSION_DATE \(.*\)$$/\1/p' $(srcdir)/../bfd/version.h`; \
+ sed -e "s/DATE/$$date/" < $(srcdir)/version.in > version.tmp
echo '#include "version.h"' >> version.c-tmp
- echo 'const char version[] = "'"`sed q ${srcdir}/version.in`"'";' >> 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 version.c
+ rm -f version.tmp
observer.h: observer.sh doc/observer.texi
${srcdir}/observer.sh h ${srcdir}/doc/observer.texi observer.h
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index e8470a8..067302d 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -389,12 +389,15 @@ am--refresh:
force:
-version.c: Makefile $(srcdir)/../version.in
- rm -f version.c-tmp version.c
+version.c: Makefile $(srcdir)/../version.in $(srcdir)/../../bfd/version.h
+ rm -f version.c-tmp version.c version.tmp
+ date=`sed -n -e 's/^.* BFD_VERSION_DATE \(.*\)$$/\1/p' $(srcdir)/../../bfd/version.h`; \
+ sed -e "s/DATE/$$date/" < $(srcdir)/../version.in > version.tmp
echo '#include "server.h"' >> version.c-tmp
- echo 'const char version[] = "'"`sed q ${srcdir}/../version.in`"'";' >> version.c-tmp
+ echo 'const char version[] = "'"`sed q version.tmp`"'";' >> version.c-tmp
echo 'const char host_name[] = "$(host_alias)";' >> version.c-tmp
mv version.c-tmp version.c
+ rm -f version.tmp
version.o: version.c $(server_h)
xml-builtin.c: stamp-xml; @true
diff --git a/gdb/version.in b/gdb/version.in
index 5af97ee..99adaca 100644
--- a/gdb/version.in
+++ b/gdb/version.in
@@ -1 +1 @@
-7.6.50.20130619-cvs
+7.6.50.DATE-cvs
--
1.8.1.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] don't keep a gdb-specific date
2013-06-19 18:23 [PATCH v2] don't keep a gdb-specific date Tom Tromey
@ 2013-06-19 18:33 ` Pedro Alves
2013-06-20 16:53 ` Tom Tromey
0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2013-06-19 18:33 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches
On 06/19/2013 07:13 PM, Tom Tromey wrote:
>
> -version.c: Makefile version.in
> - rm -f version.c-tmp version.c
> +version.c: Makefile version.in $(srcdir)/../bfd/version.h
> + rm -f version.c-tmp version.c version.tmp
> + date=`sed -n -e 's/^.* BFD_VERSION_DATE \(.*\)$$/\1/p' $(srcdir)/../bfd/version.h`; \
> + sed -e "s/DATE/$$date/" < $(srcdir)/version.in > version.tmp
> echo '#include "version.h"' >> version.c-tmp
> - echo 'const char version[] = "'"`sed q ${srcdir}/version.in`"'";' >> 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 version.c
> + rm -f version.tmp
>
> observer.h: observer.sh doc/observer.texi
> ${srcdir}/observer.sh h ${srcdir}/doc/observer.texi observer.h
> diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
> index e8470a8..067302d 100644
> --- a/gdb/gdbserver/Makefile.in
> +++ b/gdb/gdbserver/Makefile.in
> @@ -389,12 +389,15 @@ am--refresh:
>
> force:
>
> -version.c: Makefile $(srcdir)/../version.in
> - rm -f version.c-tmp version.c
> +version.c: Makefile $(srcdir)/../version.in $(srcdir)/../../bfd/version.h
> + rm -f version.c-tmp version.c version.tmp
> + date=`sed -n -e 's/^.* BFD_VERSION_DATE \(.*\)$$/\1/p' $(srcdir)/../../bfd/version.h`; \
> + sed -e "s/DATE/$$date/" < $(srcdir)/../version.in > version.tmp
> echo '#include "server.h"' >> version.c-tmp
> - echo 'const char version[] = "'"`sed q ${srcdir}/../version.in`"'";' >> version.c-tmp
> + echo 'const char version[] = "'"`sed q version.tmp`"'";' >> version.c-tmp
> echo 'const char host_name[] = "$(host_alias)";' >> version.c-tmp
> mv version.c-tmp version.c
> + rm -f version.tmp
> version.o: version.c $(server_h)
Looks fine now, thanks.
How about we move version.* to common/ ?
--
Pedro Alves
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] don't keep a gdb-specific date
2013-06-19 18:33 ` Pedro Alves
@ 2013-06-20 16:53 ` Tom Tromey
0 siblings, 0 replies; 3+ messages in thread
From: Tom Tromey @ 2013-06-20 16:53 UTC (permalink / raw)
To: Pedro Alves; +Cc: gdb-patches
Pedro> Looks fine now, thanks.
Pedro> How about we move version.* to common/ ?
Sure thing. New patch momentarily.
Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-06-20 16:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-19 18:23 [PATCH v2] don't keep a gdb-specific date Tom Tromey
2013-06-19 18:33 ` Pedro Alves
2013-06-20 16:53 ` Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox