]>
Commit | Line | Data |
---|---|---|
4c693150 JB |
1 | --- sip-4.16.3/configure.py.orig 2014-09-11 19:12:51.000000000 +0200 |
2 | +++ sip-4.16.3/configure.py 2014-10-27 17:54:50.981640566 +0100 | |
3 | @@ -47,6 +47,7 @@ | |
4 | sip_sip_dir = '' | |
5 | sysroot = '' | |
6 | src_dir = os.path.dirname(os.path.abspath(__file__)) | |
7 | +build_dir = os.getcwd() | |
8 | sip_module_base = None | |
9 | build_platform = None | |
10 | ||
11 | @@ -455,10 +456,11 @@ | |
12 | ||
13 | sipconfig.ModuleMakefile( | |
14 | configuration=cfg, | |
15 | - build_file=os.path.join(src_dir, "siplib", "siplib.sbf"), | |
16 | + build_file=os.path.join(build_dir, "siplib", "siplib.sbf"), | |
17 | dir="siplib", | |
18 | + src_dir=os.path.join(src_dir, "siplib"), | |
19 | install_dir=cfg.sip_mod_dir, | |
20 | - installs=([os.path.join(src_dir, "siplib", "sip.h")], cfg.sip_inc_dir), | |
21 | + installs=([os.path.join(build_dir, "siplib", "sip.h")], cfg.sip_inc_dir), | |
22 | console=1, | |
23 | warnings=0, | |
24 | static=opts.static, | |
25 | --- sip-4.16.3/siputils.py.orig 2014-09-07 17:30:09.000000000 +0200 | |
26 | +++ sip-4.16.3/siputils.py 2014-10-27 22:19:01.287642057 +0100 | |
27 | @@ -202,7 +202,7 @@ | |
28 | def __init__(self, configuration, console=0, qt=0, opengl=0, python=0, | |
29 | threaded=0, warnings=1, debug=0, dir=None, | |
30 | makefile="Makefile", installs=None, universal=None, | |
31 | - arch=None, deployment_target=None): | |
32 | + arch=None, deployment_target=None, src_dir=None): | |
33 | """Initialise an instance of the target. All the macros are left | |
34 | unchanged allowing scripts to manipulate them at will. | |
35 | ||
36 | @@ -264,8 +264,11 @@ | |
37 | else: | |
38 | self.dir = os.path.curdir | |
39 | ||
40 | - # Assume we are building in the source tree. | |
41 | - self._src_dir = self.dir | |
42 | + if src_dir is not None: | |
43 | + self._src_dir = src_dir | |
44 | + else: | |
45 | + # Assume we are building in the source tree. | |
46 | + self._src_dir = self.dir | |
47 | ||
48 | if universal is None: | |
49 | self._universal = configuration.universal | |
50 | @@ -381,6 +381,8 @@ | |
51 | defines.extend(self.optional_list("DEFINES")) | |
52 | ||
53 | incdir = _UniqueList(["."]) | |
54 | + if self.dir != self._src_dir: | |
55 | + incdir.append(self._src_dir) | |
56 | incdir.extend(self.extra_include_dirs) | |
57 | incdir.extend(self.optional_list("INCDIR")) | |
58 | ||
59 | @@ -1029,7 +1031,8 @@ | |
60 | else: | |
61 | if os.path.isabs(filename): | |
62 | # We appear to be building out of the source tree. | |
63 | - self._src_dir = os.path.dirname(filename) | |
64 | + if self._src_dir == self.dir: | |
65 | + self._src_dir = os.path.dirname(filename) | |
66 | bfname = filename | |
67 | else: | |
68 | bfname = os.path.join(self.dir, filename) | |
69 | @@ -1465,7 +1471,7 @@ | |
70 | console=0, qt=0, opengl=0, threaded=0, warnings=1, debug=0, | |
71 | dir=None, makefile="Makefile", installs=None, strip=1, | |
72 | export_all=0, universal=None, arch=None, | |
73 | - deployment_target=None): | |
74 | + deployment_target=None, src_dir=None): | |
75 | """Initialise an instance of a module Makefile. | |
76 | ||
77 | build_file is the file containing the target specific information. If | |
78 | @@ -1479,7 +1485,7 @@ | |
79 | increases the size of the module and slows down module load times but | |
80 | may avoid problems with modules that use exceptions. The default is 0. | |
81 | """ | |
82 | - Makefile.__init__(self, configuration, console, qt, opengl, 1, threaded, warnings, debug, dir, makefile, installs, universal, arch, deployment_target) | |
83 | + Makefile.__init__(self, configuration, console, qt, opengl, 1, threaded, warnings, debug, dir, makefile, installs, universal, arch, deployment_target, src_dir) | |
84 | ||
85 | self._build = self.parse_build_file(build_file) | |
86 | self._install_dir = install_dir | |
1209df64 JB |
87 | @@ -1677,7 +1683,7 @@ |
88 | cpp = "moc_" + root + ".cpp" | |
89 | ||
90 | mfile.write("\n%s: %s\n" % (cpp, mf)) | |
91 | - mfile.write("\t$(MOC) -o %s %s\n" % (cpp, mf)) | |
92 | + mfile.write("\t$(MOC) -o %s $<\n" % cpp) | |
93 | ||
94 | mfile.write("\n$(TARGET): $(OFILES)\n") | |
95 |