Re: [PATCH] AS_INIT: don't encode full path

Zack Weinberg <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.patches
Message-ID <CAKCAbMi9=bTRGA7UXKy7dExzmpXxTVta9gJXGUjORyTC7StL5Q@mail.gmail.com>
On Fri, Jul 3, 2020 at 8:42 PM Luke Mewburn <[email protected]> wrote:
>
> Fix AS_INIT to use the basename of __file__ instead of the full path.
> Allows for reproducible builds.

I like the idea here, but I think the patch isn't quite ready yet.
Most importantly, please write a test for the testsuite to ensure that
this doesn't get broken accidentally in the future.  Second, there
should be a comment in m4sh.m4 explaining that we are taking the
basename of __file__ so that the path to the source directory is not
embedded in the output file.  Third, a small tweak for your regular
expression: it should be "^.*/\([^/]*\)$" instead of "^.*/\(.*)".  The
latter relies too much on the particular greediness behavior of M4's
regexp implementation.

zw
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.