From: Tomi Ollila Date: Sun, 9 Feb 2014 08:26:50 +0000 (+0200) Subject: Re: [PATCH v4] build: write VERSION file containing $(VERSION) string X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b673760bd80e6272ce651938a71996f30a93e69d;p=notmuch-archives.git Re: [PATCH v4] build: write VERSION file containing $(VERSION) string --- diff --git a/21/0073051dc88b5f204444a5d6d8c4d175c98418 b/21/0073051dc88b5f204444a5d6d8c4d175c98418 new file mode 100644 index 000000000..0366b2794 --- /dev/null +++ b/21/0073051dc88b5f204444a5d6d8c4d175c98418 @@ -0,0 +1,103 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 2002A431FBD + for ; Sun, 9 Feb 2014 00:27:06 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id mo8Q+9MFyKFf for ; + Sun, 9 Feb 2014 00:26:58 -0800 (PST) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by olra.theworths.org (Postfix) with ESMTP id B2D0A431FBC + for ; Sun, 9 Feb 2014 00:26:58 -0800 (PST) +Received: from guru.guru-group.fi (localhost [IPv6:::1]) + by guru.guru-group.fi (Postfix) with ESMTP id C48031000B2; + Sun, 9 Feb 2014 10:26:50 +0200 (EET) +From: Tomi Ollila +To: "W. Trevor King" +Subject: Re: [PATCH v4] build: write VERSION file containing $(VERSION) string +In-Reply-To: <20140208235623.GF17142@odin.tremily.us> +References: + <1391641113-4669-1-git-send-email-tomi.ollila@iki.fi> + <20140208235623.GF17142@odin.tremily.us> +User-Agent: Notmuch/0.17+69~g761b031 (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-unknown-linux-gnu) +X-Face: HhBM'cA~ +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: quoted-printable +Cc: notmuch@notmuchmail.org +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sun, 09 Feb 2014 08:27:06 -0000 + +On Sun, Feb 09 2014, "W. Trevor King" wrote: + +> On Thu, Feb 06, 2014 at 12:58:33AM +0200, Tomi Ollila wrote: +>> -VERSION:=3D$(shell git describe --match '[0-9.]*'|sed -e s/_/~/ -e s/-/= ++/ -e s/-/~/) +>> +# Also write VERSION file in case its contents differ from $(VERSION) +>> +VERSION:=3D$(shell\ +>> + gv=3D`git describe --match '[0-9.]*'|sed -e s/_/~/ -e s/-/+/ -e s/-/~/= +`;\ +> +> Ew, backticks ;). What about handling more of the logic in Make: +> +> VERSION :=3D $(shell git describe =E2=80=A6) +> FILE_VERSION :=3D $(shell test -f VERSION || touch VERSION; cat VERSION) +> ifneq ($(FILE_VERSION), $(VERSION)) +> $(shell echo "$(VERSION)" > VERSION) +> endif + +Sure makes that clearer... + +> +>> +# Depend (also) on 'version' file. In case of ifeq ($(IS_GIT),yes) +>> +# this file may already have been updated. +>> +VERSION: version +>> + echo $(VERSION) > $@ +> +> Do we care about case-insensitive filesystems where VERSION will +> collide with version? + +Very good point! We do not wan't to have a chance to overwrite version +... I have to look a new filename for that... + +> +>> -CLEAN :=3D $(CLEAN) notmuch notmuch-shared $(notmuch_client_modules) no= +tmuch.elc +>> +CLEAN :=3D $(CLEAN) VERSION notmuch notmuch-shared $(notmuch_client_mod= +ules) +> +> Where did notmuch.elc go? + +To emacs/notmuch.elc years ago. + +> +> Cheers, +> Trevor + +Thanks for review. + +Tomi