[PATCH v3 1/4] v4l2-tracer: autogenerate files that can be added to git

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



A comment at the beginning of the autogenerated files provides an absolute
path to the location of the autogeneration script. In preparation for
adding these files to the git repository, remove this absolute path.

Also, the autogeneration script was adding an extra newline to
trace-gen.cpp which was causing a whitespace warning, so remove that
too.

Signed-off-by: Deborah Brouwer <deborah.brouwer@xxxxxxxxxxxxx>
---
 utils/v4l2-tracer/v4l2-tracer-gen.pl | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/utils/v4l2-tracer/v4l2-tracer-gen.pl b/utils/v4l2-tracer/v4l2-tracer-gen.pl
index cb9c3ab5..1e4cadda 100755
--- a/utils/v4l2-tracer/v4l2-tracer-gen.pl
+++ b/utils/v4l2-tracer/v4l2-tracer-gen.pl
@@ -865,29 +865,29 @@ sub do_open($$) {
 
 $fh_trace_cpp = do_open("trace", "trace-gen.cpp");
 printf $fh_trace_cpp "/* SPDX-License-Identifier: GPL-2.0-only */\n/*\n * Copyright 2022 Collabora Ltd.\n";
-printf $fh_trace_cpp " *\n * AUTOMATICALLY GENERATED BY \'%s\' DO NOT EDIT\n */\n\n", __FILE__;
+printf $fh_trace_cpp " *\n * AUTOMATICALLY GENERATED BY v4l2-tracer-gen.pl DO NOT EDIT\n */\n\n";
 printf $fh_trace_cpp "#include \"v4l2-tracer-common.h\"\n\n";
 
 $fh_trace_h = do_open("trace", "trace-gen.h");
 printf $fh_trace_h "/* SPDX-License-Identifier: GPL-2.0-only */\n/*\n * Copyright 2022 Collabora Ltd.\n";
-printf $fh_trace_h " *\n * AUTOMATICALLY GENERATED BY \'%s\' DO NOT EDIT\n */\n\n", __FILE__;
+printf $fh_trace_h " *\n * AUTOMATICALLY GENERATED BY v4l2-tracer-gen.pl DO NOT EDIT\n */\n\n";
 printf $fh_trace_h "\#ifndef TRACE_GEN_H\n";
 printf $fh_trace_h "\#define TRACE_GEN_H\n\n";
 
 $fh_retrace_cpp = do_open("retrace", "retrace-gen.cpp");
 printf $fh_retrace_cpp "/* SPDX-License-Identifier: GPL-2.0-only */\n/*\n * Copyright 2022 Collabora Ltd.\n";
-printf $fh_retrace_cpp " *\n * AUTOMATICALLY GENERATED BY \'%s\' DO NOT EDIT\n */\n\n", __FILE__;
+printf $fh_retrace_cpp " *\n * AUTOMATICALLY GENERATED BY v4l2-tracer-gen.pl DO NOT EDIT\n */\n\n";
 printf $fh_retrace_cpp "#include \"v4l2-tracer-common.h\"\n\n";
 
 $fh_retrace_h = do_open("retrace", "retrace-gen.h");
 printf $fh_retrace_h "/* SPDX-License-Identifier: GPL-2.0-only */\n/*\n * Copyright 2022 Collabora Ltd.\n";
-printf $fh_retrace_h " *\n * AUTOMATICALLY GENERATED BY \'%s\' DO NOT EDIT\n */\n\n", __FILE__;
+printf $fh_retrace_h " *\n * AUTOMATICALLY GENERATED BY v4l2-tracer-gen.pl DO NOT EDIT\n */\n\n";
 printf $fh_retrace_h "\#ifndef RETRACE_GEN_H\n";
 printf $fh_retrace_h "\#define RETRACE_GEN_H\n\n";
 
 $fh_common_info_h = do_open("common", "v4l2-tracer-info-gen.h");
 printf $fh_common_info_h "/* SPDX-License-Identifier: GPL-2.0-only */\n/*\n * Copyright 2022 Collabora Ltd.\n";
-printf $fh_common_info_h " *\n * AUTOMATICALLY GENERATED BY \'%s\' DO NOT EDIT\n */\n\n", __FILE__;
+printf $fh_common_info_h " *\n * AUTOMATICALLY GENERATED BY v4l2-tracer-gen.pl DO NOT EDIT\n */\n\n";
 printf $fh_common_info_h "\#ifndef V4L2_TRACER_INFO_GEN_H\n";
 printf $fh_common_info_h "\#define V4L2_TRACER_INFO_GEN_H\n\n";
 printf $fh_common_info_h "#include \"v4l2-tracer-common.h\"\n\n";
@@ -1067,6 +1067,8 @@ printf $fh_common_info_h "\t{ -1, \"\" }\n};\n";
 
 printf $fh_trace_h "\n#endif\n";
 close $fh_trace_h;
+# Delete the last of two new lines to avoid a whitespace error
+truncate($fh_trace_cpp, tell($fh_trace_cpp) - 1);
 close $fh_trace_cpp;
 
 printf $fh_retrace_h "\n#endif\n";
-- 
2.41.0





[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux