[Top][All Lists]

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

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

From: Luke Mewburn
Subject: Re: [PATCH] AS_INIT: don't encode full path
Date: Sun, 5 Jul 2020 14:13:38 +1000
User-agent: Mutt/1.5.20 (2009-12-10)

On 20-07-04 13:00, Zack Weinberg wrote:
  | On Fri, Jul 3, 2020 at 8:42 PM Luke Mewburn <> 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.

Hi Zack,

I've updated the patch to address your comments:
1) Added a testsuite.
2) Added the comment.
3) Improved the regex. (Thanks for the heads up about M4 greedy regex.)

I've attached the revised patch.

Hopefully this still trivial enough to not need a copyright assignment,
since I cribbed most of the new tests from elsewhere in and
If an assignment is required let me know; happy to provide it.


Attachment: 0001-AS_INIT-basename-__file__.patch
Description: Text document

Attachment: pgpyVCu8wgHCW.pgp
Description: PGP signature

reply via email to

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