summaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-06-24 15:06:26 +0000
committerTom Tromey <tromey@redhat.com>2013-06-24 15:06:26 +0000
commitf4f9399f80652e95afa0b4c2e099508cc6b2646d (patch)
tree3d2ee6b958f21dc895bb40f1187328258a2a52bb /gdb/doc
parent61f6db26fad51a7a4b2d4d61a134d5f98cbdf1e1 (diff)
downloadgdb-f4f9399f80652e95afa0b4c2e099508cc6b2646d.tar.gz
don't keep a gdb-specific date
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.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog7
-rw-r--r--gdb/doc/Makefile.in15
2 files changed, 17 insertions, 5 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index eeb096d99cf..96d1a26455b 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,10 @@
+2013-06-24 Tom Tromey <tromey@redhat.com>
+
+ * Makefile.in (POD2MAN1, POD2MAN5): Use version.subst.
+ (GDBvn.texi): Use version.subst.
+ (version.subst): New target.
+ (mostlyclean): Remove version.subst.
+
2013-06-20 Pedro Alves <pedro@codesourcery.com>
* gdb.texinfo (GDB/MI Data Manipulation)
diff --git a/gdb/doc/Makefile.in b/gdb/doc/Makefile.in
index fdd57d65516..d4ab738f8df 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