1#!/usr/bin/env python 2# Copyright (c) 2011 Google Inc. All rights reserved. 3# Use of this source code is governed by a BSD-style license that can be 4# found in the LICENSE file. 5 6import sys 7 8assert len(sys.argv) == 4, sys.argv 9 10(in_file, c_file, h_file) = sys.argv[1:] 11 12def write_file(filename, contents): 13 open(filename, 'wb').write(contents) 14 15write_file(c_file, open(in_file, 'rb').read()) 16 17write_file(h_file, '#define NAME "%s"\n' % in_file) 18 19sys.exit(0) 20