1 diff -aurN automake-1.9.3.orig/lib/am/python.am automake-1.9.3/lib/am/python.am
2 --- automake-1.9.3.orig/lib/am/python.am 2004-01-28 21:50:43.000000000 +0100
3 +++ automake-1.9.3/lib/am/python.am 2004-11-08 13:57:57.149780216 +0100
5 ## Byte-compile must be done at install time, since file times are
6 ## encoded in the actual files.
8 - PYTHON=$(PYTHON) $(py_compile) --basedir "$(DESTDIR)$(%NDIR%dir)" $$dlist
9 + PYTHON=$(PYTHON) $(py_compile) --basedir "$(DESTDIR)$(%NDIR%dir)" --destdir "$(DESTDIR)" $$dlist
13 diff -aurN automake-1.9.3.orig/lib/py-compile automake-1.9.3/lib/py-compile
14 --- automake-1.9.3.orig/lib/py-compile 2004-01-12 23:56:48.000000000 +0100
15 +++ automake-1.9.3/lib/py-compile 2004-11-08 14:00:18.155344112 +0100
23 - if test -z "$basedir"; then
24 - echo "$0: Missing argument to --basedir." 1>&2
31 +while test "x$loop" = "xtrue"
36 + if test -z "$basedir"; then
37 + echo "$0: Missing argument to --basedir." 1>&2
44 + if test -z "$destdir"; then
45 + echo "$0: Missing argument to --destdir." 1>&2
52 Usage: py-compile [--help] [--version] [--basedir DIR] FILES..."
56 Report bugs to <bug-automake@gnu.org>.
61 - echo "py-compile $scriptversion"
68 + echo "py-compile $scriptversion"
78 echo "$0: No files given. Try \`$0 --help' for more information." 1>&2
80 # if basedir was given, then it should be prepended to filenames before
82 if [ -z "$basedir" ]; then
84 + trans=" path = file"
86 - trans="path = os.path.join('$basedir', file)"
87 + trans=" path = os.path.join('$basedir', file)"
90 +# if destdir was given, then it should be stripped from path when storing
91 +# the intended file name
92 +if [ -z "$destdir" ]; then
93 + transdfile=" dfile = path"
96 + if path.startswith('$destdir'):
97 + dfile = path.split('$destdir')[1]
106 print 'Byte-compiling python modules...'
107 for file in string.split(files):
111 if not os.path.exists(path) or not (len(path) >= 3 and path[-3:] == '.py'):
115 - py_compile.compile(path)
116 + py_compile.compile(path, dfile=dfile)
119 # this will fail for python < 1.5, but that doesn't matter ...
122 print 'Byte-compiling python modules (optimized versions) ...'
123 for file in string.split(files):
127 if not os.path.exists(path) or not (len(path) >= 3 and path[-3:] == '.py'):
131 - py_compile.compile(path)
132 + py_compile.compile(path, dfile=dfile)
133 print" 2>/dev/null || :