Bug 1314147 - Generate build files in mach vendor aom. r?froydnj,kinetik
Call the config and build file generator script as
part of the vendoring step, so we update everything
at once.
MozReview-Commit-ID: C9RwN5YcYyZ
--- a/python/mozbuild/mozbuild/vendor_aom.py
+++ b/python/mozbuild/mozbuild/vendor_aom.py
@@ -40,16 +40,29 @@ class VendorAOM(MozbuildObject):
def clean_upstream(self, target):
'''Remove files we don't want to import.'''
mozfile.remove(mozpath.join(target, '.gitattributes'))
mozfile.remove(mozpath.join(target, '.gitignore'))
mozfile.remove(mozpath.join(target, 'build', '.gitattributes'))
mozfile.remove(mozpath.join(target, 'build' ,'.gitignore'))
+ def generate_sources(self, target):
+ '''
+ Run the library's native build system to update ours.
+
+ Invoke configure for each supported platform to generate
+ appropriate config and header files, then invoke the
+ makefile to obtain a list of source files, writing
+ these out in the appropriate format for our build
+ system to use.
+ '''
+ self.run_process(args=['./generate_sources_mozbuild.sh'],
+ cwd=target)
+
def check_modified_files(self):
'''
Ensure that there aren't any uncommitted changes to files
in the working copy, since we're going to change some state
on the user.
'''
modified = self.repository.get_modified_files()
if modified:
@@ -69,13 +82,18 @@ Please commit or stash these changes bef
self.check_modified_files()
if not revision:
revision = 'master'
vendor_dir = mozpath.join(self.topsrcdir, 'third_party/aom')
self.fetch_and_unpack(revision, vendor_dir)
self.log(logging.INFO, 'clean_upstream', {},
'''Removing unnecessary files.''')
self.clean_upstream(vendor_dir)
+ glue_dir = mozpath.join(self.topsrcdir, 'media/libaom')
+ self.log(logging.INFO, 'generate_sources', {},
+ '''Generating build files...''')
+ self.generate_sources(glue_dir)
self.log(logging.INFO, 'add_remove_files', {},
'''Registering changes with version control.''')
self.repository.add_remove_files(vendor_dir)
+ self.repository.add_remove_files(glue_dir)
self.log(logging.INFO, 'done', {'revision': revision},
'''Update to aom version '{revision}' ready to commit.''')