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. 5import os 6import glob 7os.chdir(os.path.dirname(__file__)) 8with 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 14# Things are easiest for everyone if these source paths are absolute. 15_gm = get_path_info("../gm", "abspath") 16 17gm_sources = [ 18''') 19 for path in sorted(glob.glob('../gm/*.c*')): 20 o.write(' "%s",\n' % path.replace('../gm', '$_gm')) 21 o.write(']\n') 22