From: Tomi Ollila <tomi.ollila@iki.fi>
To: Ralph Seichter <ralph@ml.seichter.de>, notmuch@notmuchmail.org
Subject: Re: Clashes between "version" files and C++ keyword
Date: Wed, 28 Oct 2020 15:52:41 +0200 [thread overview]
Message-ID: <m2k0va31au.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <87v9euojlp.fsf@wedjat.horus-it.com>
On Wed, Oct 28 2020, Ralph Seichter wrote:
> Building Notmuch on macOS is known to cause problems because the Notmuch
> distribution archive contains two files named "version". These clash
> with the <version> keyword as defined in C++20 [1] and will likely
> become obvious on other platforms as well once Compilers adopt the new
> standard.
>
> The two affected files in the Notmuch Git tree are
>
> /bindings/python-cffi/version
> /version
>
> I suggest to rename them both to version.txt. The attached patch can
> then be applied to make the necessary build file changes.
good stuff!
Could you send git am -able patch to the mailing list ?
Tomi
>
> -Ralph
>
> [1] https://en.cppreference.com/w/cpp/20#New_headers
>
> diff --git Makefile.global Makefile.global
> index cd489ef2..8477468d 100644
> --- Makefile.global
> +++ Makefile.global
> @@ -17,7 +17,7 @@ else
> DATE:=$(shell date +%F)
> endif
>
> -VERSION:=$(shell cat ${srcdir}/version)
> +VERSION:=$(shell cat ${srcdir}/version.txt)
> ELPA_VERSION:=$(subst ~,_,$(VERSION))
> ifeq ($(filter release release-message pre-release update-versions,$(MAKECMDGOALS)),)
> ifeq ($(IS_GIT),yes)
> diff --git Makefile.local Makefile.local
> index c65cee7c..dde7981b 100644
> --- Makefile.local
> +++ Makefile.local
> @@ -19,7 +19,7 @@ endif
>
> # Depend (also) on the file 'version'. In case of ifeq ($(IS_GIT),yes)
> # this file may already have been updated.
> -version.stamp: $(srcdir)/version
> +version.stamp: $(srcdir)/version.txt
> echo $(VERSION) > $@
>
> $(TAR_FILE):
> diff --git bindings/python-cffi/setup.py bindings/python-cffi/setup.py
> index b0060835..cda52338 100644
> --- bindings/python-cffi/setup.py
> +++ bindings/python-cffi/setup.py
> @@ -1,6 +1,6 @@
> import setuptools
>
> -with open('version') as fp:
> +with open('version.txt') as fp:
> VERSION = fp.read().strip()
>
> setuptools.setup(
> diff --git doc/conf.py doc/conf.py
> index 94e266af..11bed51d 100644
> --- doc/conf.py
> +++ doc/conf.py
> @@ -19,7 +19,7 @@ copyright = u'2009-2020, Carl Worth and many others'
> location = os.path.dirname(__file__)
>
> for pathdir in ['.', '..']:
> - version_file = os.path.join(location,pathdir,'version')
> + version_file = os.path.join(location,pathdir,'version.txt')
> if os.path.exists(version_file):
> with open(version_file,'r') as infile:
> version=infile.read().replace('\n','')
> _______________________________________________
> notmuch mailing list -- notmuch@notmuchmail.org
> To unsubscribe send an email to notmuch-leave@notmuchmail.org
next prev parent reply other threads:[~2020-10-28 13:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-28 8:11 Clashes between "version" files and C++ keyword Ralph Seichter
2020-10-28 13:52 ` Tomi Ollila [this message]
2020-10-28 14:44 ` [PATCH] Rename version to version.txt ralph
2020-10-30 19:21 ` David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2k0va31au.fsf@guru.guru-group.fi \
--to=tomi.ollila@iki.fi \
--cc=notmuch@notmuchmail.org \
--cc=ralph@ml.seichter.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).