Create a simple AUTHORS file for virt-p2v, so it is easier to extract or use it later on. --- generator/authors.ml | 9 +++++++++ generator/authors.mli | 1 + generator/main.ml | 2 ++ p2v/.gitignore | 1 + p2v/Makefile.am | 3 ++- 5 files changed, 15 insertions(+), 1 deletion(-) diff --git a/generator/authors.ml b/generator/authors.ml index 095eb5177..730eb5039 100644 --- a/generator/authors.ml +++ b/generator/authors.ml @@ -186,3 +186,12 @@ let generate_p2v_about_authors_c () = List.iter fn others; pr " NULL\n"; pr "};\n" + +let generate_p2v_authors () = + let p2v_authors = + List.filter_map ( + fun (name, _, roles) -> + if List.mem V2V_and_P2V roles then Some name + else None + ) authors in + List.iter (pr "%s\n") p2v_authors diff --git a/generator/authors.mli b/generator/authors.mli index 410571583..f63ff3264 100644 --- a/generator/authors.mli +++ b/generator/authors.mli @@ -24,3 +24,4 @@ val authors : (string * string list * role list) list val generate_authors : unit -> unit val generate_p2v_about_authors_c : unit -> unit +val generate_p2v_authors : unit -> unit diff --git a/generator/main.ml b/generator/main.ml index 187821647..5e6f067bb 100644 --- a/generator/main.ml +++ b/generator/main.ml @@ -77,6 +77,8 @@ Run it from the top source directory using the command Authors.generate_authors; output_to "p2v/about-authors.c" Authors.generate_p2v_about_authors_c; + output_to "p2v/AUTHORS" + Authors.generate_p2v_authors; output_to "common/errnostring/errnostring-gperf.gperf" Errnostring.generate_errnostring_gperf; diff --git a/p2v/.gitignore b/p2v/.gitignore index 8495f6c2f..22ac25aed 100644 --- a/p2v/.gitignore +++ b/p2v/.gitignore @@ -8,6 +8,7 @@ Makefile Makefile.in /about-authors.c +/AUTHORS /blank-part.img /config.c /dependencies.archlinux diff --git a/p2v/Makefile.am b/p2v/Makefile.am index 5ee9d97d5..a1b80d084 100644 --- a/p2v/Makefile.am +++ b/p2v/Makefile.am @@ -18,7 +18,8 @@ include $(top_srcdir)/subdir-rules.mk generator_built = \ - about-authors.c + about-authors.c \ + AUTHORS BUILT_SOURCES = \ $(generator_built) -- 2.21.0