| 1 |
#!/usr/bin/python3 |
| 2 |
# This software has been developed by Advanced Driver Information Technology. |
| 3 |
# Copyright(c) 2020 Advanced Driver Information Technology GmbH, |
| 4 |
# Advanced Driver Information Technology Corporation, Robert Bosch GmbH, |
| 5 |
# Robert Bosch Car Multimedia GmbH and DENSO Corporation. |
| 6 |
# |
| 7 |
# This file is part of COVESA Project DLT - Diagnostic Log and Trace. |
| 8 |
# |
| 9 |
# This Source Code Form is subject to the terms of the |
| 10 |
# Mozilla Public License (MPL), v. 2.0. |
| 11 |
# If a copy of the MPL was not distributed with this file, |
| 12 |
# You can obtain one at http://mozilla.org/MPL/2.0/. |
| 13 |
# |
| 14 |
# For further information see http://www.covesa.org/. |
| 15 |
import pathlib |
| 16 |
import argparse |
| 17 |
|
| 18 |
|
| 19 |
def main(header_in_file, header_out_file): |
| 20 |
header_in = pathlib.Path(header_in_file) |
| 21 |
header_out = pathlib.Path(header_out_file) |
| 22 |
with header_in.open() as hi, header_out.open('w') as ho: |
| 23 |
for line in hi: |
| 24 |
if line.startswith("#cmakedefine"): |
| 25 |
continue |
| 26 |
ho.write(line) |
| 27 |
|
| 28 |
|
| 29 |
if __name__ == '__main__': |
| 30 |
parser = argparse.ArgumentParser() |
| 31 |
parser.add_argument('header_in') |
| 32 |
parser.add_argument('header_out') |
| 33 |
args = parser.parse_args() |
| 34 |
main(args.header_in, args.header_out) |