Re: git-version-gen w/o git

Peter Rosin <[email protected]>
Newsgroups gmane.comp.gnu.libtool.patches
Message-ID <[email protected]>
[dropping-gnulib for this part]

On 2012-10-18 15:02, Eric Blake wrote:
> [adding-gnulib]
> 
> On 10/18/2012 06:50 AM, Peter Rosin wrote:
>> @@ -128,8 +128,10 @@ $(ltversion_m4): $(ltversion_in) $(dotversion)
>>  	done; \
>>  	if $$rebuild; then \
>>  	  rm -f '$@'; \
>> -	  if test -f '$(srcdir)/.serial'; then \
>> -	    serial=`cat '$(srcdir)/.serial'`; \
>> +	  if test -d '$(srcdir)/.git' && git --version >& /dev/null; then \
>> +	    $(git_commit_count) > '$(srcdir)/.serial'; \
>> +	  fi; \
>> +	  serial=`cat '$(srcdir)/.serial'`; \
> 
> However, something like this would be useful in libtool.

That hunk was wrong, this is what I meant:

@@ -128,11 +128,10 @@ $(ltversion_m4): $(ltversion_in) $(dotversion)
 	done; \
 	if $$rebuild; then \
 	  rm -f '$@'; \
-	  if test -f '$(srcdir)/.serial'; then \
-	    serial=`cat '$(srcdir)/.serial'`; \
-	  else \
-	    serial=`$(git_commit_count)`; \
+	  if test -d '$(srcdir)/.git' && git --version >& /dev/null; then \
+	    $(git_commit_count) > '$(srcdir)/.serial'; \
 	  fi; \
+	  serial=`cat '$(srcdir)/.serial'`; \
 	  if test 0 = '$(V)'; then echo "  GEN   " $@; \
 	  else echo $(bootstrap_edit) "'$(ltversion_in)' > '$@'"; fi; \
 	  $(bootstrap_edit) '$(ltversion_in)' > '$@'; \



>>  	  else \
>>  	    serial=`$(git_commit_count)`; \
>>  	  fi; \


Sorry for the noise.

Cheers,
Peter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.