Some windows fixes.

pull/15/head
Jussi Pakkanen 10 years ago
parent 1dc8d324fa
commit ff934952a0
  1. 6
      dependencies.py
  2. 6
      ninjabackend.py

@ -137,7 +137,11 @@ class ExternalProgram():
self.fullpath = [shutil.which(name)]
if self.fullpath[0] is None and search_dir is not None:
trial = os.path.join(search_dir, name)
if os.access(trial, os.X_OK):
suffix = os.path.splitext(trial)[-1].lower()
if environment.is_windows() and (suffix == 'exe' or suffix == 'com'\
or suffix == 'bat'):
self.fullpath = [trial]
elif not environment.is_windows() and os.access(trial, os.X_OK):
self.fullpath = [trial]
else:
# Now getting desperate. Maybe it is a script file that is a) not chmodded

@ -1079,12 +1079,12 @@ rule FORTRAN_DEP_HACK
else:
rel_src = os.path.join(self.build_to_src, target.get_source_subdir(), src)
abs_src = os.path.join(self.environment.get_build_dir(), rel_src)
if os.path.isabs(src):
if isinstance(src, RawFilename):
src_filename = src.fname
elif os.path.isabs(src):
src_filename = os.path.basename(src)
else:
src_filename = src
if isinstance(src, RawFilename):
src_filename = src.fname
obj_basename = src_filename.replace('/', '_').replace('\\', '_')
rel_obj = os.path.join(self.get_target_private_dir(target), obj_basename)
rel_obj += '.' + self.environment.get_object_suffix()

Loading…
Cancel
Save