]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Allow bootstrap from git repository.
authorPeter O'Gorman <peter@pogma.com>
Tue, 15 Apr 2008 20:33:06 +0000 (15:33 -0500)
committerPeter O'Gorman <peter@pogma.com>
Tue, 15 Apr 2008 20:33:06 +0000 (15:33 -0500)
* 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.

ChangeLog
Makefile.am
clcommit.m4sh
configure.ac
libltdl/config/mkstamp

index b4fac0219dd1428468782ed08aecccde8807ecac..04d364a22831478a050d370f4380252487f19d59 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2008-04-15  Peter O'Gorman  <peter@pogma.com>
+
+       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  <ebb9@byu.net>
 
        Fix usage of setmode without declaration on cygwin.
index 0168a4171f8cb84174b99976554d32591228d55f..480b64701222fa1cea615ea7aedc48a6a8becd90 100644 (file)
@@ -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
 
index 3439dae481fba086ae7c5c60c0f9537c689fbadb..7fe9d2df8fae39a5ff8ed76f47fa925cd9bcce6d 100644 (file)
@@ -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 &&
index 6f4901626a702effe678f7d5da458c1571d4544d..4660a676a751bd4b93b75a3cd90c91c4e6470f4c 100644 (file)
@@ -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]])
index 8d8e7d89bee64109fb441f146e142d5caa709ff3..edd5be1b256d11f2a14929baac2bb5990ad2d11c 100755 (executable)
 # 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]