]> git.pld-linux.org Git - packages/firefox.git/blob - mozilla-firefox-gyp-slashism.patch
- up to 25.0
[packages/firefox.git] / mozilla-firefox-gyp-slashism.patch
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
3 @@ -114,6 +114,12 @@
4    if dir and not os.path.exists(dir):
5      os.makedirs(dir)
6  
7 +def append_relative(base, rel):
8 +  if rel == '':
9 +    return base
10 +  else:
11 +    return base + '/' + rel
12 +
13  def GetFlavor(params):
14    """Returns |params.flavor| if it's set, the system's default flavor else."""
15    flavors = {
16 @@ -142,9 +148,9 @@
17  
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)
28 @@ -261,7 +267,7 @@
29        qualified_target)
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
36        dirs.append(rel_path)
37 @@ -399,7 +405,7 @@
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.
46 @@ -408,9 +414,9 @@
47    makefile_path = os.path.join(output_dir, "Makefile")
48  
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)))
55  
56    # Find the list of targets that derive from the gyp file(s) being built.
57    needed_targets = set()
This page took 0.035907 seconds and 3 git commands to generate.