blob: d8a87bf72a5f68a4e430436b920f8c21c51d46fe [file] [log] [blame]
Anders Carlssondc6b4772018-01-15 13:31:03 +01001# Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
2#
3# Use of this source code is governed by a BSD-style license
4# that can be found in the LICENSE file in the root of the source
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS. All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
9import argparse
10import datetime
11import sys
12
13
14def GenerateUmbrellaHeader():
15 parser = argparse.ArgumentParser(description='Generate umbrella header')
16 parser.add_argument("-o", "--out", type=str, help="Output file.")
17 parser.add_argument("-s", "--sources", default=[], type=str, nargs='+',
18 help="Headers to include.")
19
20 args = parser.parse_args()
21
22 with open(args.out, "w") as outfile:
23 outfile.write("""/*
24 * Copyright %d The WebRTC project authors. All Rights Reserved.
25 *
26 * Use of this source code is governed by a BSD-style license
27 * that can be found in the LICENSE file in the root of the source
28 * tree. An additional intellectual property rights grant can be found
29 * in the file PATENTS. All contributing project authors may
30 * be found in the AUTHORS file in the root of the source tree.
31 */\n\n""" % datetime.datetime.now().year)
32
33 for s in args.sources:
34 outfile.write("#import <{}>\n".format(s))
35
36 return 0
37
38
39if __name__ == '__main__':
40 sys.exit(GenerateUmbrellaHeader())