[PATCH] AS_INIT: don't encode full path

Luke Mewburn <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.patches
Message-ID <[email protected]>
Fix AS_INIT to use the basename of __file__ instead of the full path.
Allows for reproducible builds.
---
 lib/m4sugar/m4sh.m4 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4
index af28685..78419e9 100644
--- a/lib/m4sugar/m4sh.m4
+++ b/lib/m4sugar/m4sh.m4
@@ -2141,7 +2141,7 @@ m4_pattern_forbid([^_?AS_])
 # Bangshe and minimal initialization.
 m4_divert_text([BINSH], [@%:@! /bin/sh])
 m4_divert_text([HEADER-COMMENT],
-	       [@%:@ Generated from __file__ by m4_PACKAGE_STRING.])
+	       [@%:@ Generated from m4_bpatsubst(__file__,[^.*/\(.*\)],[[\1]]) by m4_PACKAGE_STRING.])
 m4_divert_text([M4SH-SANITIZE], [_AS_SHELL_SANITIZE])
 m4_divert_text([M4SH-INIT-FN], [m4_text_box([M4sh Shell Functions.])])
 
-- 
1.7.1
signature.asc (application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)

iEYEARECAAYFAl7/y80ACgkQpBhtmn8zJHL3dACeP9Bpmm2+L5HsM6z4GJ3Vh5tu
r1YAn1Xp4i3uUOUm6RwtU3FqdXr0SaoX
=GdYs
-----END PGP SIGNATURE-----
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.