This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v4] don't keep a gdb-specific date


On 06/20/2013 09:07 PM, Tom Tromey wrote:

> 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

s,bfdver.h,bfd/version.h

> --- 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
>  
> @@ -605,28 +609,28 @@ annotate/index.html: $(ANNOTATE_DOC_FILES)
>  	$(MAKEHTML) $(MAKEHTMLFLAGS) -I $(srcdir) $(srcdir)/annotate.texinfo
>  
>  # Man pages
> -gdb.1: $(GDB_DOC_FILES)
> +gdb.1: $(GDB_DOC_FILES) version.subst

These dependencies on "version.subst" confused me for a little,
given that GDB_DOC_FILES includes GDBvn.texi, and that depends on
version.subst already.  Do we need it?  Perhaps you added it
after noticing that POD2MAN1 expands to something that uses
version.subst?  If that's the case, then I'd suggest a new
POD2MAN1_DEPS=version.subst variable, and making gdb.1 depend on that
then, to make this clearer.

I notice version.subst wasn't added to the mostlyclean rule.

Other than that, looks great to me.

Thanks,
-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]