make_gm_gni.py 652 B

123456789101112131415161718192021
  1. #! /usr/bin/env python
  2. # Copyright 2019 Google LLC.
  3. # Use of this source code is governed by a BSD-style license that can be
  4. # found in the LICENSE file.
  5. import os
  6. import glob
  7. os.chdir(os.path.dirname(__file__))
  8. with open('gm.gni', 'w') as o:
  9. o.write('''# Copyright 2016 Google Inc.
  10. #
  11. # Use of this source code is governed by a BSD-style license that can be
  12. # found in the LICENSE file.
  13. # Things are easiest for everyone if these source paths are absolute.
  14. _gm = get_path_info("../gm", "abspath")
  15. gm_sources = [
  16. ''')
  17. for path in sorted(glob.glob('../gm/*.c*')):
  18. o.write(' "%s",\n' % path.replace('../gm', '$_gm'))
  19. o.write(']\n')