Re: [PATCH v3] build: write VERSION file containing $(VERSION) string

Subject: Re: [PATCH v3] build: write VERSION file containing $(VERSION) string

Date: Tue, 28 Jan 2014 13:13:06 +0200

To: David Bremner, notmuch@notmuchmail.org

Cc:

From: Tomi Ollila


On Tue, Jan 28 2014, David Bremner <david@tethera.net> wrote:

> Tomi Ollila <tomi.ollila@iki.fi> writes:
>
>> +VERSION:=$(shell gv=`exec git describe --match '[0-9.]*'|sed -e s/_/~/ -e s/-/+/ -e s/-/~/`; test -f VERSION || touch VERSION; read fv < VERSION; test x"$$fv" = x"$$gv" || echo "$$gv" > VERSION; echo "$$gv")
>
> does this need to be one line long? It's a bit scary.

Probably not -- I realized after sending v3 I could have split that
(among one other problem...)

>
>> +# this file may already have been updated.
>> +VERSION: version
>> +	echo $(VERSION) > version
>
> I'd prefer the build process does not change any version controlled
> file. It should be source, or generated, but not both. did  you mean to
> write to VERSION here?

I sure meant to. actually echo $(VERSION) > $@

>
> d
>

Tnx for the review...


Tomi

Thread: