From: Neal Norwitz Date: Sun, 11 Dec 2005 21:18:22 +0000 (+0000) Subject: SF #1373150, diffs in working copy after a build X-Git-Tag: v2.5a0~1056 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=897ff817d548ad65abf9a30950f345a8d1bd699f;p=python SF #1373150, diffs in working copy after a build Strip off leading dots and slash so the generated files are the same regardless of whether you configure in the checkout directory or build. If anyone configures in a different directory, we might want a cleaner approach using os.path.*(). Hopefully this is good enough. --- diff --git a/Include/Python-ast.h b/Include/Python-ast.h index 9609141c04..2484bb13d4 100644 --- a/Include/Python-ast.h +++ b/Include/Python-ast.h @@ -1,4 +1,4 @@ -/* File automatically generated by ./Parser/asdl_c.py */ +/* File automatically generated by Parser/asdl_c.py */ #include "asdl.h" diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py index d056c363af..2167c30542 100755 --- a/Parser/asdl_c.py +++ b/Parser/asdl_c.py @@ -638,7 +638,11 @@ class ChainOfVisitors: v.emit("", 0) def main(srcfile): - auto_gen_msg = '/* File automatically generated by %s */\n' % sys.argv[0] + argv0 = sys.argv[0] + index = argv0.find('/') + if index > 0: + argv0 = argv0[index + 1:] + auto_gen_msg = '/* File automatically generated by %s */\n' % argv0 mod = asdl.parse(srcfile) if not asdl.check(mod): sys.exit(1) diff --git a/Python/Python-ast.c b/Python/Python-ast.c index 14040adc53..b2766251b1 100644 --- a/Python/Python-ast.c +++ b/Python/Python-ast.c @@ -1,4 +1,4 @@ -/* File automatically generated by ./Parser/asdl_c.py */ +/* File automatically generated by Parser/asdl_c.py */ #include "Python.h" #include "Python-ast.h"