Regenerate if cross build definition file is updated.

pull/15/head
Jussi Pakkanen 11 years ago
parent 063bfed54e
commit 6aa1152d72
  1. 3
      backends.py
  2. 7
      coredata.py
  3. 2
      environment.py

@ -861,6 +861,9 @@ class NinjaBackend(Backend):
deps = [os.path.join(self.build_to_src, df) \
for df in self.interpreter.get_build_def_files()]
if self.environment.is_cross_build():
deps.append(os.path.join(self.build_to_src,
self.environment.coredata.cross_file))
elem = NinjaBuildElement('build.ninja', 'REGENERATE_BUILD', deps)
elem.write(outfile)

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import pickle
import pickle, os
version = '0.7.0-research'
@ -34,7 +34,10 @@ class CoreData():
self.buildtype = options.buildtype
self.strip = options.strip
self.coverage = options.coverage
self.cross_file = options.cross_file
if options.cross_file is not None:
self.cross_file = os.path.join(os.getcwd(), options.cross_file)
else:
self.cross_file = None
self.compilers = {}
self.deps = {}

@ -695,7 +695,7 @@ class Environment():
try:
cdf = os.path.join(self.get_build_dir(), Environment.coredata_file)
self.coredata = coredata.load(cdf)
except IOError:
except FileNotFoundError:
self.coredata = coredata.CoreData(options)
if self.coredata.cross_file:
self.cross_info = CrossBuildInfo(self.coredata.cross_file)

Loading…
Cancel
Save