From: Peter O'Gorman Date: Tue, 15 Apr 2008 20:33:06 +0000 (-0500) Subject: Allow bootstrap from git repository. X-Git-Tag: v2.2.4~30 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=3528106688e06c4be785e17966b2ad3067250fec;p=thirdparty%2Flibtool.git Allow bootstrap from git repository. * Makefile.am: Pass srcdir as an argument to mkstamp and expect only 2 fields in mkstamps output. * clcommit.m4sh: Ditto. * configure.ac: Ditto. * libltdl/config/mkstamp: return a revision and date based on the number of lines which look like dates in all the ChangeLog* files in the directory we got as arg 1. --- diff --git a/ChangeLog b/ChangeLog index b4fac0219..04d364a22 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2008-04-15 Peter O'Gorman + + Allow bootstrap from git repository. + * Makefile.am: Pass srcdir as an argument to mkstamp and expect + only 2 fields in mkstamps output. + * clcommit.m4sh: Ditto. + * configure.ac: Ditto. + * libltdl/config/mkstamp: return a revision and date based on + the number of lines which look like dates in all the ChangeLog* + files in the directory we got as arg 1. + 2008-04-11 Eric Blake Fix usage of setmode without declaration on cygwin. diff --git a/Makefile.am b/Makefile.am index 0168a4171..480b64701 100644 --- a/Makefile.am +++ b/Makefile.am @@ -50,9 +50,9 @@ lt__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd MKSTAMP = $(SHELL) $(srcdir)/$(auxdir)/mkstamp -timestamp = set dummy `$(MKSTAMP) < $(srcdir)/ChangeLog`; shift; \ +timestamp = set dummy `$(MKSTAMP) $(srcdir)`; shift; \ case $(VERSION) in \ - *[acegikmoqsuwy]) TIMESTAMP=" $$1 $$2 $$3" ;; \ + *[acegikmoqsuwy]) TIMESTAMP=" $$1 $$2" ;; \ *) TIMESTAMP="" ;; \ esac diff --git a/clcommit.m4sh b/clcommit.m4sh index 3439dae48..7fe9d2df8 100644 --- a/clcommit.m4sh +++ b/clcommit.m4sh @@ -444,7 +444,7 @@ func_mailnotify () test -f CVS/Root && echo "CVSROOT: `$SED -e 's,.*:,,g' CVS/Root`" test -f $MKSTAMP && - echo "TIMESTAMP: `$SHELL $MKSTAMP < ./ChangeLog`" + echo "TIMESTAMP: `$SHELL $MKSTAMP .`" test -f CVS/Repository && echo "Module name: `cat CVS/Repository`" test -f CVS/Tag && diff --git a/configure.ac b/configure.ac index 6f4901626..4660a676a 100644 --- a/configure.ac +++ b/configure.ac @@ -103,7 +103,7 @@ AC_SUBST([LASTRELEASE]) # This is a sanity check so we can see which version is used in bug reports. # It is assumed that we only want to see the date extension for cvs libtool # versions (i.e. "odd" letters) and not actual alpha releases. -TIMESTAMP=`${CONFIG_SHELL} ${ac_aux_dir}/mkstamp < ${srcdir}/ChangeLog` +TIMESTAMP=`${CONFIG_SHELL} ${ac_aux_dir}/mkstamp ${srcdir}` package_revision=`( set $TIMESTAMP; echo $1; )` case $lt_alpha in [[bdfhjlnprtvxz]]) diff --git a/libltdl/config/mkstamp b/libltdl/config/mkstamp index 8d8e7d89b..edd5be1b2 100755 --- a/libltdl/config/mkstamp +++ b/libltdl/config/mkstamp @@ -23,15 +23,26 @@ # 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 takes a directory as an argument and generates a +# revision and date based upon the ChangeLog files in that directory. -# 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 number of lines in the ChangeLogs starting with dates (an +# approximation of the number of commits) + 1000. +# 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. -tr -d "\015" | sed -e ' - s%.*\$''Revision: \([^$]*\) \$.*\$''Date: \([^$]*\) \$.*% \1 \2% - t end - d - : end' ${1+"$@"} +awk 'BEGIN { + cocount=0; +} +/[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] / { + if (cocount== 0) { + datestr=$1 + } + cocount++; +} +END { + cocount = cocount + 1000; + print "1." cocount " " datestr; +}' $1/ChangeLog $1/ChangeLog.[12][0-9][0-9][0-9]