autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Zack Weinberg
Subject: Re: [PATCH] AS_INIT: don't encode full path
Date: Sat, 4 Jul 2020 13:00:29 -0400

On Fri, Jul 3, 2020 at 8:42 PM Luke Mewburn <luke@mewburn.net> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]