summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorFelix Herrmann <fherrmann@de.adit-jv.com>2020-06-05 15:01:18 +0200
committerSaya Sugiura <39760799+ssugiura@users.noreply.github.com>2020-07-06 10:04:07 +0900
commitde0c990bbfebf0458db5ece18d0d7722cb65ca1d (patch)
tree6501e988291198f13d81d319bff24e817667e3d0 /util
parentff7e65ac36fad5e39efba6fc26cb083a27d400a5 (diff)
downloadDLT-daemon-de0c990bbfebf0458db5ece18d0d7722cb65ca1d.tar.gz
set DLT_NETWORK_TRACE_ENABLE by cmakedefine
Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com> Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
Diffstat (limited to 'util')
-rwxr-xr-xutil/create_dlt_user_h.py34
1 files changed, 34 insertions, 0 deletions
diff --git a/util/create_dlt_user_h.py b/util/create_dlt_user_h.py
new file mode 100755
index 0000000..b0d1eb1
--- /dev/null
+++ b/util/create_dlt_user_h.py
@@ -0,0 +1,34 @@
+#!/usr/bin/python3
+# This software has been developed by Advanced Driver Information Technology.
+# Copyright(c) 2020 Advanced Driver Information Technology GmbH,
+# Advanced Driver Information Technology Corporation, Robert Bosch GmbH,
+# Robert Bosch Car Multimedia GmbH and DENSO Corporation.
+#
+# This file is part of GENIVI Project DLT - Diagnostic Log and Trace.
+#
+# This Source Code Form is subject to the terms of the
+# Mozilla Public License (MPL), v. 2.0.
+# If a copy of the MPL was not distributed with this file,
+# You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# For further information see http://www.genivi.org/.
+import pathlib
+import argparse
+
+
+def main(header_in_file, header_out_file):
+ header_in = pathlib.Path(header_in_file)
+ header_out = pathlib.Path(header_out_file)
+ with header_in.open() as hi, header_out.open('w') as ho:
+ for line in hi:
+ if line.startswith("#cmakedefine"):
+ continue
+ ho.write(line)
+
+
+if __name__ == '__main__':
+ parser = argparse.ArgumentParser()
+ parser.add_argument('header_in')
+ parser.add_argument('header_out')
+ args = parser.parse_args()
+ main(args.header_in, args.header_out)