1 --- xulrunner-18.0/mozilla/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py.orig 2013-01-05 00:44:41.000000000 +0100
2 +++ xulrunner-18.0/mozilla/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py 2013-01-13 20:13:40.033894757 +0100
4 if dir and not os.path.exists(dir):
7 +def append_relative(base, rel):
11 + return base + '/' + rel
13 def GetFlavor(params):
14 """Returns |params.flavor| if it's set, the system's default flavor else."""
18 def WriteMakefile(filename, data, build_file, depth, topsrcdir, srcdir, relative_path, extra_data=None):
19 if not os.path.isabs(topsrcdir):
20 - topsrcdir = depth + "/" + topsrcdir
21 + topsrcdir = append_relative(depth, topsrcdir)
22 if not os.path.isabs(srcdir):
23 - srcdir = depth + "/" + srcdir
24 + srcdir = append_relative(depth, srcdir)
25 #TODO: should compare with the existing file and not overwrite it if the
26 # contents are the same!
27 ensure_directory_exists(filename)
30 build_file = os.path.abspath(build_file)
31 rel_path, output_file = self.CalculateMakefilePath(build_file, target)
32 - subdepth = self.depth + "/" + getdepth(rel_path)
33 + subdepth = append_relative(self.depth, getdepth(rel_path))
34 if self.WriteTargetMakefile(output_file, rel_path, qualified_target, spec, build_file, subdepth):
35 # If WriteTargetMakefile returns True, then this is a useful target
38 # The relative path from objdir to gyp_file_dir
39 srcdir = gyp.common.RelativePath(gyp_file_dir, objdir)
40 # The absolute path to the source dir
41 - abs_srcdir = topsrcdir + "/" + relative_srcdir
42 + abs_srcdir = append_relative(topsrcdir, relative_srcdir)
43 # The path to get up to the root of the objdir from the output dir.
44 depth = getdepth(relative_srcdir)
45 # The output directory.
47 makefile_path = os.path.join(output_dir, "Makefile")
49 def topsrcdir_path(path):
50 - return "$(topsrcdir)/" + swapslashes(gyp.common.RelativePath(path, topsrcdir))
51 + return append_relative("$(topsrcdir)", swapslashes(gyp.common.RelativePath(path, topsrcdir)))
52 def objdir_path(path):
53 - return "$(DEPTH)/" + swapslashes(gyp.common.RelativePath(path, objdir))
54 + return append_relative("$(DEPTH)", swapslashes(gyp.common.RelativePath(path, objdir)))
56 # Find the list of targets that derive from the gyp file(s) being built.
57 needed_targets = set()