Hi, * Makefile.am: Expect mkstamp to return only rev date. * libltdl/config/mkstamp: return a revision and date based on the number of lines in the input and the topmost date.
Ok? Peter -- Peter O'Gorman http://pogma.com
* Makefile.am: Expect mkstamp to return only rev date. * libltdl/config/mkstamp: return a revision and date based on the number of lines in the input and the topmost date. --- ChangeLog | 7 +++++++ Makefile.am | 2 +- libltdl/config/mkstamp | 32 ++++++++++++++++++++++---------- 3 files changed, 30 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index b4fac02..3eba77e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-04-14 Peter O'Gorman <[EMAIL PROTECTED]> + + Allow bootstrap from git repository. + * Makefile.am: Expect mkstamp to return only rev date. + * libltdl/config/mkstamp: return a revision and date based on + the number of lines in the input and the topmost date. + 2008-04-11 Eric Blake <[EMAIL PROTECTED]> Fix usage of setmode without declaration on cygwin. diff --git a/Makefile.am b/Makefile.am index 0168a41..4609cdd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -52,7 +52,7 @@ MKSTAMP = $(SHELL) $(srcdir)/$(auxdir)/mkstamp timestamp = set dummy `$(MKSTAMP) < $(srcdir)/ChangeLog`; shift; \ case $(VERSION) in \ - *[acegikmoqsuwy]) TIMESTAMP=" $$1 $$2 $$3" ;; \ + *[acegikmoqsuwy]) TIMESTAMP=" $$1 $$2" ;; \ *) TIMESTAMP="" ;; \ esac diff --git a/libltdl/config/mkstamp b/libltdl/config/mkstamp index 8d8e7d8..eb3284a 100755 --- a/libltdl/config/mkstamp +++ b/libltdl/config/mkstamp @@ -23,15 +23,27 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #### -# This script expects to find a line containing both Revision and Date -# tags, and it edits this line so that it looks like ` $rev $date' +# This script counts the lines in a Changelog and generates a +# revision date on the output. -# Command-line arguments are passed down to sed; additional -e cmd -# arguments are acceptable. Input is from from stdin. The original -# version of this script accepted input from a named file or stdin. +# Generate a revision that looks similar to CVS revision by using 1. +# then the last 2 digits of the year +30 (so that the revision number +# is greater than the last cvs revision, and the number of lines +# in the ChangeLog. For those pulling from the savannah git repository +# it should be possible to go from this revision number to the git +# revision fairly easily. The number will also always increase,e ven +# when we rotate ChangeLogs in the new year. -tr -d "\015" | sed -e ' - s%.*\$''Revision: \([^$]*\) \$.*\$''Date: \([^$]*\) \$.*% \1 \2% - t end - d - : end' ${1+"$@"} +awk 'BEGIN { + dated=0; +} +/^20/ { + if (dated == 0) { + dated=1; + datestr=$1; + } +} +END { + yr=substr(datestr,3,2) + 30; + print "1." yr NR " " datestr; +}' -- 1.5.3.7