[pypy-svn] r49201 - pypy/dist/pypy/translator/c
fijal at codespeak.net
fijal at codespeak.net
Thu Nov 29 11:41:58 CET 2007
Author: fijal
Date: Thu Nov 29 11:41:57 2007
New Revision: 49201
Modified:
pypy/dist/pypy/translator/c/genc.py
Log:
Logic for creating proper makefile. untested.
Modified: pypy/dist/pypy/translator/c/genc.py
==============================================================================
--- pypy/dist/pypy/translator/c/genc.py (original)
+++ pypy/dist/pypy/translator/c/genc.py Thu Nov 29 11:41:57 2007
@@ -316,10 +316,14 @@
cfiles = []
ofiles = []
for fn in compiler.cfilenames:
- fn = py.path.local(fn).basename
- assert fn.endswith('.c')
- cfiles.append(fn)
- ofiles.append(fn[:-2] + '.o')
+ fn = py.path.local(fn)
+ if fn.dirpath() == targetdir:
+ name = fn.basename
+ else:
+ assert fn.dirpath().dirpath() == udir
+ name = '../' + fn.relto(udir)
+ cfiles.append(name)
+ ofiles.append(name[:-2] + '.o')
if self.config.translation.cc:
cc = self.config.translation.cc
More information about the Pypy-commit
mailing list