This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


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

[patch] Extract version number from version.in


Just FYI,

This tweeks the top level Makefile.in so that it will extract the 
version number from the file .../version.in when that is available.

GDB's version number, which lives in that file, changes daily.  The GDB 
snapshot process has been using this patch for roughly a month.

	Andrew
Fri Jun  8 11:14:02 2001  Andrew Cagney  <cagney@b1.cygnus.com>

	* Makefile.in (VER): When present, extract the version number from
 	the file version.in.

Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/Makefile.in,v
retrieving revision 1.33
diff -p -r1.33 Makefile.in
*** Makefile.in	2001/06/08 03:24:41	1.33
--- Makefile.in	2001/06/08 15:17:10
*************** SUPPORT_FILES = list-of-support-files-fo
*** 1759,1767 ****
  # as VER="$(VER)"
  VER = `	if grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \
  	  sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \
! 	else \
  	  sed < $(TOOL)/Makefile.in -n 's/^VERSION *= *//p'; \
! 	fi`
  PACKAGE = $(TOOL)
  
  .PHONY: taz
--- 1759,1771 ----
  # as VER="$(VER)"
  VER = `	if grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \
  	  sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \
! 	else if test -f $(TOOL)/version.in; then \
! 	  head -1 $(TOOL)/version.in; \
! 	else if grep VERSION $(TOOL)/Makefile.in > /dev/null 2>&1; then \
  	  sed < $(TOOL)/Makefile.in -n 's/^VERSION *= *//p'; \
! 	else \
! 	  echo VERSION; \
! 	fi fi fi`
  PACKAGE = $(TOOL)
  
  .PHONY: taz

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