[rfc] Move Makefile.in:VERSION to VERSION file

Andrew Cagney ac131313@cygnus.com
Sun Mar 18 14:18:00 GMT 2001


Hello,

Per discussion on the gdb@ list, this patch moves GDB's version number
out of Makefile.in and into a separate file called (of all things :-)
VERSION.

The intention is that this patch will be followed by two further
changes:

	o	a cronjob to update the date in
		the VERSION file.

	o	Replace 5.0 with a date

thoughts?

	Andrew
2001-03-17  Andrew Cagney  <ac131313@redhat.com>

	* Makefile.in (VERSION): Delete.  Moved to file VERSION.
	(version.c): Depends on file VERSION.  Extract version number from
	VERSION file.
	* VERSION: New file.
	
*** GDB/src/gdb/Makefile.in	Mon Mar 12 11:01:13 2001
--- WIP/src/gdb/Makefile.in	Sat Mar 17 14:54:35 2001
***************
*** 357,363 ****
  ADD_FILES = $(REGEX) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
  ADD_DEPS = $(REGEX) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
  
- VERSION = 5.0
  DIST=gdb
  
  LINT=/usr/5bin/lint
--- 357,362 ----
***************
*** 1009,1018 ****
  		< $(srcdir)/COPYING > $(srcdir)/copying.tmp
  	mv $(srcdir)/copying.tmp $(srcdir)/copying.c
  
! version.c: Makefile
  	rm -f version.c
  	echo '#include "version.h"' >> version.c
! 	echo 'const char version[] = "$(VERSION)";' >> version.c
  	echo 'const char host_name[] = "$(host_alias)";' >> version.c
  	echo 'const char target_name[] = "$(target_alias)";' >> version.c
  version.o: version.c $(version_h)
--- 1008,1017 ----
  		< $(srcdir)/COPYING > $(srcdir)/copying.tmp
  	mv $(srcdir)/copying.tmp $(srcdir)/copying.c
  
! version.c: Makefile VERSION
  	rm -f version.c
  	echo '#include "version.h"' >> version.c
! 	echo 'const char version[] = "'"`head -1 ${srcdir}/VERSION`"'";' >> version.c
  	echo 'const char host_name[] = "$(host_alias)";' >> version.c
  	echo 'const char target_name[] = "$(target_alias)";' >> version.c
  version.o: version.c $(version_h)
*** GDB/src/gdb/VERSION	Wed Dec 31 19:00:00 1969
--- WIP/src/gdb/VERSION	Sat Mar 17 14:26:39 2001
***************
*** 0 ****
--- 1 ----
+ 5.0


More information about the Gdb-patches mailing list