Skip to content

Commit a8e2cf0

Browse files
Do not clean up first if there is not Makefile.
1 parent bf95b31 commit a8e2cf0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Tools/freeze/test/freeze.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,11 @@ def build_python(builddir, *, verbose=True):
181181
if not builddir:
182182
builddir = '.'
183183

184+
print('building python...')
184185
srcdir = get_config_var(builddir, 'srcdir', fail=False) or SRCDIR
185186
if os.path.abspath(builddir) != srcdir:
186-
_run_cmd([MAKE, '-C', srcdir, 'clean'], verbose=False)
187-
187+
if os.path.exists(os.path.join(srcdir, 'Makefile')):
188+
_run_cmd([MAKE, '-C', srcdir, 'clean'], verbose=False)
188189
_run_cmd([MAKE, '-C', builddir, '-j'], verbose=verbose)
189190

190191
return os.path.join(builddir, 'python')

0 commit comments

Comments
 (0)