Richard W.M. Jones
2016-Feb-23 08:19 UTC
[Libguestfs] [PATCH 0/4] Various tweaks to the generator.
Use interfaces files (*.mli files) instead of exporting all symbols randomly. Change the 'file is generated' warnings at the top of generated files so they accurately describe which source file generates each output file. Rich.
Richard W.M. Jones
2016-Feb-23 08:19 UTC
[Libguestfs] [PATCH 1/4] generator: Add interfaces to all modules.
Be explicit about what is exported from each module in the generator. --- generator/Makefile.am | 26 +++++++++++++++++++++++++- generator/bindtests.mli | 30 ++++++++++++++++++++++++++++++ generator/c.mli | 41 +++++++++++++++++++++++++++++++++++++++++ generator/checks.mli | 18 ++++++++++++++++++ generator/csharp.mli | 19 +++++++++++++++++++ generator/customize.mli | 22 ++++++++++++++++++++++ generator/daemon.mli | 23 +++++++++++++++++++++++ generator/docstrings.mli | 34 ++++++++++++++++++++++++++++++++++ generator/erlang.mli | 20 ++++++++++++++++++++ generator/errnostring.mli | 21 +++++++++++++++++++++ generator/events.mli | 20 ++++++++++++++++++++ generator/fish.mli | 28 ++++++++++++++++++++++++++++ generator/gobject.mli | 29 +++++++++++++++++++++++++++++ generator/golang.mli | 19 +++++++++++++++++++ generator/haskell.mli | 19 +++++++++++++++++++ generator/java.mli | 23 +++++++++++++++++++++++ generator/lua.mli | 19 +++++++++++++++++++ generator/ocaml.mli | 22 ++++++++++++++++++++++ generator/optgroups.mli | 22 ++++++++++++++++++++++ generator/perl.mli | 20 ++++++++++++++++++++ generator/php.mli | 20 ++++++++++++++++++++ generator/python.mli | 20 ++++++++++++++++++++ generator/ruby.mli | 19 +++++++++++++++++++ generator/tests_c_api.mli | 19 +++++++++++++++++++ generator/xdr.mli | 19 +++++++++++++++++++ 25 files changed, 571 insertions(+), 1 deletion(-) create mode 100644 generator/bindtests.mli create mode 100644 generator/c.mli create mode 100644 generator/checks.mli create mode 100644 generator/csharp.mli create mode 100644 generator/customize.mli create mode 100644 generator/daemon.mli create mode 100644 generator/docstrings.mli create mode 100644 generator/erlang.mli create mode 100644 generator/errnostring.mli create mode 100644 generator/events.mli create mode 100644 generator/fish.mli create mode 100644 generator/gobject.mli create mode 100644 generator/golang.mli create mode 100644 generator/haskell.mli create mode 100644 generator/java.mli create mode 100644 generator/lua.mli create mode 100644 generator/ocaml.mli create mode 100644 generator/optgroups.mli create mode 100644 generator/perl.mli create mode 100644 generator/php.mli create mode 100644 generator/python.mli create mode 100644 generator/ruby.mli create mode 100644 generator/tests_c_api.mli create mode 100644 generator/xdr.mli diff --git a/generator/Makefile.am b/generator/Makefile.am index f3d4852..ab6e059 100644 --- a/generator/Makefile.am +++ b/generator/Makefile.am @@ -22,39 +22,63 @@ sources = \ actions.ml \ actions.mli \ bindtests.ml \ + bindtests.mli \ c.ml \ + c.mli \ checks.ml \ + checks.mli \ csharp.ml \ + csharp.mli \ customize.ml \ + customize.mli \ daemon.ml \ + daemon.mli \ docstrings.ml \ + docstrings.mli \ erlang.ml \ + erlang.mli \ errnostring.ml \ + errnostring.mli \ events.ml \ + events.mli \ fish.ml \ + fish.mli \ gobject.ml \ + gobject.mli \ golang.ml \ + golang.mli \ haskell.ml \ + haskell.mli \ java.ml \ + java.mli \ lua.ml \ + lua.mli \ main.ml \ ocaml.ml \ + ocaml.mli \ optgroups.ml \ + optgroups.mli \ perl.ml \ + perl.mli \ php.ml \ + php.mli \ pr.ml \ pr.mli \ prepopts.ml \ prepopts.mli \ python.ml \ + python.mli \ ruby.ml \ + ruby.mli \ structs.ml \ structs.mli \ tests_c_api.ml \ + tests_c_api.mli \ types.ml \ utils.ml \ utils.mli \ - xdr.ml + xdr.ml \ + xdr.mli # In build dependency order. objects = \ diff --git a/generator/bindtests.mli b/generator/bindtests.mli new file mode 100644 index 0000000..255490a --- /dev/null +++ b/generator/bindtests.mli @@ -0,0 +1,30 @@ +(* libguestfs + * Copyright (C) 2009-2016 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + *) + +val generate_bindtests : unit -> unit +val generate_erlang_bindtests : unit -> unit +val generate_golang_bindtests : unit -> unit +val generate_gobject_js_bindtests : unit -> unit +val generate_haskell_bindtests : unit -> unit +val generate_java_bindtests : unit -> unit +val generate_lua_bindtests : unit -> unit +val generate_ocaml_bindtests : unit -> unit +val generate_perl_bindtests : unit -> unit +val generate_php_bindtests : unit -> unit +val generate_python_bindtests : unit -> unit +val generate_ruby_bindtests : unit -> unit diff --git a/generator/c.mli b/generator/c.mli new file mode 100644 index 0000000..9a261a4 --- /dev/null +++ b/generator/c.mli @@ -0,0 +1,41 @@ +(* libguestfs + * Copyright (C) 2009-2016 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + *) + +type optarg_proto = Dots | VA | Argv + +val generate_prototype : ?extern:bool -> ?static:bool -> ?semicolon:bool -> ?single_line:bool -> ?indent:string -> ?newline:bool -> ?in_daemon:bool -> ?dll_public:bool -> ?attribute_noreturn:bool -> ?prefix:string -> ?suffix:string -> ?handle:string -> ?optarg_proto:optarg_proto -> string -> Types.style -> unit + +val generate_c_call_args : ?handle:string -> ?implicit_size_ptr:string -> ?in_daemon:bool -> Types.ret * Types.args * Types.optargs -> unit + +val nr_actions_files : int + +val generate_actions_pod : unit -> unit +val generate_availability_pod : unit -> unit +val generate_client_actions : int -> unit -> unit +val generate_client_actions_variants : unit -> unit +val generate_client_structs_cleanup : unit -> unit +val generate_client_structs_compare : unit -> unit +val generate_client_structs_copy : unit -> unit +val generate_client_structs_free : unit -> unit +val generate_event_string_c : unit -> unit +val generate_guestfs_h : unit -> unit +val generate_internal_actions_h : unit -> unit +val generate_internal_frontend_cleanups_h : unit -> unit +val generate_linker_script : unit -> unit +val generate_max_proc_nr : unit -> unit +val generate_structs_pod : unit -> unit diff --git a/generator/checks.mli b/generator/checks.mli new file mode 100644 index 0000000..4bbbda5 --- /dev/null +++ b/generator/checks.mli @@ -0,0 +1,18 @@ +(* libguestfs + * Copyright (C) 2009-2016 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + *) + diff --git a/generator/csharp.mli b/generator/csharp.mli new file mode 100644 index 0000000..01c60bb --- /dev/null +++ b/generator/csharp.mli @@ -0,0 +1,19 @@ +(* libguestfs + * Copyright (C) 2009-2016 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + *) + +val generate_csharp : unit -> unit diff --git a/generator/customize.mli b/generator/customize.mli new file mode 100644 index 0000000..267e0cc --- /dev/null +++ b/generator/customize.mli @@ -0,0 +1,22 @@ +(* libguestfs + * Copyright (C) 2009-2016 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + *) + +val generate_customize_cmdline_ml : unit -> unit +val generate_customize_cmdline_mli : unit -> unit +val generate_customize_options_pod : unit -> unit +val generate_customize_synopsis_pod : unit -> unit diff --git a/generator/daemon.mli b/generator/daemon.mli new file mode 100644 index 0000000..21788aa --- /dev/null +++ b/generator/daemon.mli @@ -0,0 +1,23 @@ +(* libguestfs + * Copyright (C) 2009-2016 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + *) + +val generate_daemon_actions : unit -> unit +val generate_daemon_actions_h : unit -> unit +val generate_daemon_names : unit -> unit +val generate_daemon_optgroups_c : unit -> unit +val generate_daemon_optgroups_h : unit -> unit diff --git a/generator/docstrings.mli b/generator/docstrings.mli new file mode 100644 index 0000000..22cadeb --- /dev/null +++ b/generator/docstrings.mli @@ -0,0 +1,34 @@ +(* libguestfs + * Copyright (C) 2009-2016 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + *) + +type comment_style + CStyle | CPlusPlusStyle | HashStyle | OCamlStyle | HaskellStyle + | ErlangStyle | LuaStyle | PODStyle +type license = GPLv2plus | LGPLv2plus + +val progress_message : string + +val protocol_limit_warning : string + +val deprecation_notice : ?prefix:string -> ?replace_underscores:bool -> Types.action -> string option + +val version_added : Types.action -> string option + +val copyright_years : string + +val generate_header : ?extra_inputs:string list -> ?emacs_mode:string -> comment_style -> license -> unit diff --git a/generator/erlang.mli b/generator/erlang.mli new file mode 100644 index 0000000..9d78ef5 --- /dev/null +++ b/generator/erlang.mli @@ -0,0 +1,20 @@ +(* libguestfs + * Copyright (C) 2009-2016 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + *) + +val generate_erlang_c : unit -> unit +val generate_erlang_erl : unit -> unit diff --git a/generator/errnostring.mli b/generator/errnostring.mli new file mode 100644 index 0000000..ad1f7f8 --- /dev/null +++ b/generator/errnostring.mli @@ -0,0 +1,21 @@ +(* libguestfs + * Copyright (C) 2009-2016 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + *) + +val generate_errnostring_c : unit -> unit +val generate_errnostring_h : unit -> unit +val generate_errnostring_gperf : unit -> unit diff --git a/generator/events.mli b/generator/events.mli new file mode 100644 index 0000000..403256d --- /dev/null +++ b/generator/events.mli @@ -0,0 +1,20 @@ +(* libguestfs + * Copyright (C) 2009-2016 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + *) + +val events : (string * int) list +val all_events_bitmask : int diff --git a/generator/fish.mli b/generator/fish.mli new file mode 100644 index 0000000..c654bf6 --- /dev/null +++ b/generator/fish.mli @@ -0,0 +1,28 @@ +(* libguestfs + * Copyright (C) 2009-2016 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + *) + +val generate_fish_actions_pod : unit -> unit +val generate_fish_cmds : unit -> unit +val generate_fish_cmds_gperf : unit -> unit +val generate_fish_cmds_h : unit -> unit +val generate_fish_commands_pod : unit -> unit +val generate_fish_completion : unit -> unit +val generate_fish_event_names : unit -> unit +val generate_fish_prep_options_c : unit -> unit +val generate_fish_prep_options_h : unit -> unit +val generate_fish_prep_options_pod : unit -> unit diff --git a/generator/gobject.mli b/generator/gobject.mli new file mode 100644 index 0000000..50daac5 --- /dev/null +++ b/generator/gobject.mli @@ -0,0 +1,29 @@ +(* libguestfs + * Copyright (C) 2009-2016 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + *) + +val generate_gobject_doc_title : unit -> unit +val generate_gobject_header : unit -> unit +val generate_gobject_makefile : unit -> unit +val generate_gobject_optargs_header : string -> string -> 'a -> Types.action -> unit -> unit +val generate_gobject_optargs_source : string -> string -> Types.optargt list -> Types.action -> unit -> unit +val generate_gobject_session_header : unit -> unit +val generate_gobject_session_source : unit -> unit +val generate_gobject_struct_header : string -> string -> (string * Types.field) list -> unit -> unit +val generate_gobject_struct_source : string -> string -> 'a -> unit -> unit +val generate_gobject_tristate_header : unit -> unit +val generate_gobject_tristate_source : unit -> unit diff --git a/generator/golang.mli b/generator/golang.mli new file mode 100644 index 0000000..ecd62a9 --- /dev/null +++ b/generator/golang.mli @@ -0,0 +1,19 @@ +(* libguestfs + * Copyright (C) 2009-2016 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + *) + +val generate_golang_go : unit -> unit diff --git a/generator/haskell.mli b/generator/haskell.mli new file mode 100644 index 0000000..e23aebb --- /dev/null +++ b/generator/haskell.mli @@ -0,0 +1,19 @@ +(* libguestfs + * Copyright (C) 2009-2016 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + *) + +val generate_haskell_hs : unit -> unit diff --git a/generator/java.mli b/generator/java.mli new file mode 100644 index 0000000..b240314 --- /dev/null +++ b/generator/java.mli @@ -0,0 +1,23 @@ +(* libguestfs + * Copyright (C) 2009-2016 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + *) + +val generate_java_c : unit -> unit +val generate_java_gitignore : unit -> unit +val generate_java_java : unit -> unit +val generate_java_makefile_inc : unit -> unit +val generate_java_struct : string -> (string * Types.field) list -> unit -> unit diff --git a/generator/lua.mli b/generator/lua.mli new file mode 100644 index 0000000..3fae056 --- /dev/null +++ b/generator/lua.mli @@ -0,0 +1,19 @@ +(* libguestfs + * Copyright (C) 2009-2016 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + *) + +val generate_lua_c : unit -> unit diff --git a/generator/ocaml.mli b/generator/ocaml.mli new file mode 100644 index 0000000..ff5710c --- /dev/null +++ b/generator/ocaml.mli @@ -0,0 +1,22 @@ +(* libguestfs + * Copyright (C) 2009-2016 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + *) + +val generate_ocaml_c : unit -> unit +val generate_ocaml_c_errnos : unit -> unit +val generate_ocaml_ml : unit -> unit +val generate_ocaml_mli : unit -> unit diff --git a/generator/optgroups.mli b/generator/optgroups.mli new file mode 100644 index 0000000..81a8621 --- /dev/null +++ b/generator/optgroups.mli @@ -0,0 +1,22 @@ +(* libguestfs + * Copyright (C) 2009-2016 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + *) + +val optgroups : (string * Types.action list) list +val optgroups_retired : string list +val optgroups_names : string list +val optgroups_names_all : string list diff --git a/generator/perl.mli b/generator/perl.mli new file mode 100644 index 0000000..b6e6fdb --- /dev/null +++ b/generator/perl.mli @@ -0,0 +1,20 @@ +(* libguestfs + * Copyright (C) 2009-2016 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + *) + +val generate_perl_pm : unit -> unit +val generate_perl_xs : unit -> unit diff --git a/generator/php.mli b/generator/php.mli new file mode 100644 index 0000000..63663cd --- /dev/null +++ b/generator/php.mli @@ -0,0 +1,20 @@ +(* libguestfs + * Copyright (C) 2009-2016 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + *) + +val generate_php_c : unit -> unit +val generate_php_h : unit -> unit diff --git a/generator/python.mli b/generator/python.mli new file mode 100644 index 0000000..919dab3 --- /dev/null +++ b/generator/python.mli @@ -0,0 +1,20 @@ +(* libguestfs + * Copyright (C) 2009-2016 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + *) + +val generate_python_c : unit -> unit +val generate_python_py : unit -> unit diff --git a/generator/ruby.mli b/generator/ruby.mli new file mode 100644 index 0000000..dd97dfe --- /dev/null +++ b/generator/ruby.mli @@ -0,0 +1,19 @@ +(* libguestfs + * Copyright (C) 2009-2016 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + *) + +val generate_ruby_c : unit -> unit diff --git a/generator/tests_c_api.mli b/generator/tests_c_api.mli new file mode 100644 index 0000000..f095e7c --- /dev/null +++ b/generator/tests_c_api.mli @@ -0,0 +1,19 @@ +(* libguestfs + * Copyright (C) 2009-2016 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + *) + +val generate_c_api_tests : unit -> unit diff --git a/generator/xdr.mli b/generator/xdr.mli new file mode 100644 index 0000000..c7075d4 --- /dev/null +++ b/generator/xdr.mli @@ -0,0 +1,19 @@ +(* libguestfs + * Copyright (C) 2009-2016 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + *) + +val generate_xdr : unit -> unit -- 2.5.0
Richard W.M. Jones
2016-Feb-23 08:19 UTC
[Libguestfs] [PATCH 2/4] generator: gobject: Remove parameters which are not used.
Revealed by adding typed interfaces in the previous commit. --- generator/gobject.ml | 4 ++-- generator/gobject.mli | 4 ++-- generator/main.ml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/generator/gobject.ml b/generator/gobject.ml index e5ae491..8f23135 100644 --- a/generator/gobject.ml +++ b/generator/gobject.ml @@ -271,7 +271,7 @@ let generate_gobject_struct_header filename typ cols () header_end filename -let generate_gobject_struct_source filename typ cols () +let generate_gobject_struct_source filename typ () let title = "Guestfs" ^ camel_name_of_struct typ in source_start ~title filename; @@ -295,7 +295,7 @@ let generate_gobject_struct_source filename typ cols () pr "G_DEFINE_BOXED_TYPE (%s, %s, %s_copy, %s_free)\n" camel_name name name name -let generate_gobject_optargs_header filename name optargs f () +let generate_gobject_optargs_header filename name f () header_start filename; let uc_name = String.uppercase name in let camel_name = camel_of_name f in diff --git a/generator/gobject.mli b/generator/gobject.mli index 50daac5..0e2934e 100644 --- a/generator/gobject.mli +++ b/generator/gobject.mli @@ -19,11 +19,11 @@ val generate_gobject_doc_title : unit -> unit val generate_gobject_header : unit -> unit val generate_gobject_makefile : unit -> unit -val generate_gobject_optargs_header : string -> string -> 'a -> Types.action -> unit -> unit +val generate_gobject_optargs_header : string -> string -> Types.action -> unit -> unit val generate_gobject_optargs_source : string -> string -> Types.optargt list -> Types.action -> unit -> unit val generate_gobject_session_header : unit -> unit val generate_gobject_session_source : unit -> unit val generate_gobject_struct_header : string -> string -> (string * Types.field) list -> unit -> unit -val generate_gobject_struct_source : string -> string -> 'a -> unit -> unit +val generate_gobject_struct_source : string -> string -> unit -> unit val generate_gobject_tristate_header : unit -> unit val generate_gobject_tristate_source : unit -> unit diff --git a/generator/main.ml b/generator/main.ml index ca882b1..63a5d25 100644 --- a/generator/main.ml +++ b/generator/main.ml @@ -179,7 +179,7 @@ Run it from the top source directory using the command sprintf "gobject/include/guestfs-gobject/%s.h" short in output_to filename (generate_gobject_struct_header short typ cols); let filename = sprintf "gobject/src/%s.c" short in - output_to filename (generate_gobject_struct_source short typ cols) + output_to filename (generate_gobject_struct_source short typ) ) external_structs; delete_except_generated "gobject/include/guestfs-gobject/struct-*.h"; delete_except_generated "gobject/src/struct-*.c"; @@ -191,7 +191,7 @@ Run it from the top source directory using the command let filename sprintf "gobject/include/guestfs-gobject/%s.h" short in output_to filename - (generate_gobject_optargs_header short name optargs f); + (generate_gobject_optargs_header short name f); let filename = sprintf "gobject/src/%s.c" short in output_to filename (generate_gobject_optargs_source short name optargs f) -- 2.5.0
Richard W.M. Jones
2016-Feb-23 08:19 UTC
[Libguestfs] [PATCH 3/4] generator: Make the 'this file is generated' warning clearer.
Also rename the ~extra_inputs parameter as plain ~inputs. We will use ~inputs more widely in following commits. --- generator/docstrings.ml | 13 +++++++++---- generator/docstrings.mli | 2 +- gobject/Makefile.inc | 4 ++-- java/Makefile.inc | 4 ++-- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/generator/docstrings.ml b/generator/docstrings.ml index 488526f..9d3fd0b 100644 --- a/generator/docstrings.ml +++ b/generator/docstrings.ml @@ -67,8 +67,7 @@ type comment_style | ErlangStyle | LuaStyle | PODStyle type license = GPLv2plus | LGPLv2plus -let generate_header ?(extra_inputs = []) ?emacs_mode comment license - let inputs = "generator/ *.ml" :: extra_inputs in +let generate_header ?(inputs = []) ?emacs_mode comment license let c = match comment with | CStyle -> pr "/* "; " *" | CPlusPlusStyle -> pr "// "; "//" @@ -84,8 +83,14 @@ let generate_header ?(extra_inputs = []) ?emacs_mode comment license | Some mode -> pr " -*- %s -*-" mode ); pr "\n"; - pr "%s WARNING: THIS FILE IS GENERATED FROM:\n" c; - List.iter (pr "%s %s\n" c) inputs; + if inputs <> [] then ( + pr "%s WARNING: THIS FILE IS GENERATED FROM THE FOLLOWING FILES:\n" c; + List.iter (pr "%s %s\n" c) inputs; + pr "%s and from the code in the generator/ subdirectory.\n" c + ) else ( + pr "%s WARNING: THIS FILE IS GENERATED\n" c; + pr "%s from the code in the generator/ subdirectory.\n" c + ); pr "%s ANY CHANGES YOU MAKE TO THIS FILE WILL BE LOST.\n" c; pr "%s\n" c; pr "%s Copyright (C) %s Red Hat Inc.\n" c copyright_years; diff --git a/generator/docstrings.mli b/generator/docstrings.mli index 22cadeb..204b38d 100644 --- a/generator/docstrings.mli +++ b/generator/docstrings.mli @@ -31,4 +31,4 @@ val version_added : Types.action -> string option val copyright_years : string -val generate_header : ?extra_inputs:string list -> ?emacs_mode:string -> comment_style -> license -> unit +val generate_header : ?inputs:string list -> ?emacs_mode:string -> comment_style -> license -> unit diff --git a/gobject/Makefile.inc b/gobject/Makefile.inc index 5ba0fc9..866e1be 100644 --- a/gobject/Makefile.inc +++ b/gobject/Makefile.inc @@ -1,6 +1,6 @@ # libguestfs generated file -# WARNING: THIS FILE IS GENERATED FROM: -# generator/ *.ml +# WARNING: THIS FILE IS GENERATED +# from the code in the generator/ subdirectory. # ANY CHANGES YOU MAKE TO THIS FILE WILL BE LOST. # # Copyright (C) 2009-2016 Red Hat Inc. diff --git a/java/Makefile.inc b/java/Makefile.inc index 8c17443..86da36a 100644 --- a/java/Makefile.inc +++ b/java/Makefile.inc @@ -1,6 +1,6 @@ # libguestfs generated file -# WARNING: THIS FILE IS GENERATED FROM: -# generator/ *.ml +# WARNING: THIS FILE IS GENERATED +# from the code in the generator/ subdirectory. # ANY CHANGES YOU MAKE TO THIS FILE WILL BE LOST. # # Copyright (C) 2009-2016 Red Hat Inc. -- 2.5.0
Richard W.M. Jones
2016-Feb-23 08:19 UTC
[Libguestfs] [PATCH 4/4] generator: Declare which input file(s) generate each output file.
--- generator/bindtests.ml | 2 ++ generator/c.ml | 2 ++ generator/csharp.ml | 2 ++ generator/customize.ml | 2 ++ generator/daemon.ml | 2 ++ generator/erlang.ml | 2 ++ generator/errnostring.ml | 2 ++ generator/fish.ml | 2 ++ generator/gobject.ml | 2 ++ generator/golang.ml | 2 ++ generator/haskell.ml | 2 ++ generator/java.ml | 2 ++ generator/lua.ml | 2 ++ generator/ocaml.ml | 2 ++ generator/perl.ml | 2 ++ generator/php.ml | 2 ++ generator/python.ml | 2 ++ generator/ruby.ml | 2 ++ generator/tests_c_api.ml | 2 ++ generator/xdr.ml | 2 ++ gobject/Makefile.inc | 5 +++-- java/Makefile.inc | 5 +++-- 22 files changed, 46 insertions(+), 4 deletions(-) diff --git a/generator/bindtests.ml b/generator/bindtests.ml index ed0b247..bd2600d 100644 --- a/generator/bindtests.ml +++ b/generator/bindtests.ml @@ -29,6 +29,8 @@ open Actions open Structs open C +let generate_header = generate_header ~inputs:["generator/bindtests.ml"] + let rec generate_bindtests () generate_header CStyle LGPLv2plus; diff --git a/generator/c.ml b/generator/c.ml index c432356..417e2bc 100644 --- a/generator/c.ml +++ b/generator/c.ml @@ -29,6 +29,8 @@ open Actions open Structs open Events +let generate_header = generate_header ~inputs:["generator/c.ml"] + (* Generate C API. *) (* The actions are split across this many C files. You can increase diff --git a/generator/csharp.ml b/generator/csharp.ml index cb48ee3..0255e92 100644 --- a/generator/csharp.ml +++ b/generator/csharp.ml @@ -28,6 +28,8 @@ open Optgroups open Actions open Structs +let generate_header = generate_header ~inputs:["generator/csharp.ml"] + let rec generate_csharp () generate_header CPlusPlusStyle LGPLv2plus; diff --git a/generator/customize.ml b/generator/customize.ml index d272ffb..36d185c 100644 --- a/generator/customize.ml +++ b/generator/customize.ml @@ -23,6 +23,8 @@ open Printf open Docstrings open Pr +let generate_header = generate_header ~inputs:["generator/customize.ml"] + (* Command-line arguments used by virt-customize, virt-builder and * virt-sysprep. *) diff --git a/generator/daemon.ml b/generator/daemon.ml index d1689e1..cb8b6ba 100644 --- a/generator/daemon.ml +++ b/generator/daemon.ml @@ -29,6 +29,8 @@ open Actions open Structs open C +let generate_header = generate_header ~inputs:["generator/daemon.ml"] + (* Generate daemon/actions.h. *) let generate_daemon_actions_h () generate_header CStyle GPLv2plus; diff --git a/generator/erlang.ml b/generator/erlang.ml index d5d30b4..4a18938 100644 --- a/generator/erlang.ml +++ b/generator/erlang.ml @@ -30,6 +30,8 @@ open Structs open C open Events +let generate_header = generate_header ~inputs:["generator/erlang.ml"] + let rec generate_erlang_erl () generate_header ErlangStyle LGPLv2plus; diff --git a/generator/errnostring.ml b/generator/errnostring.ml index fa29816..5033d2e 100644 --- a/generator/errnostring.ml +++ b/generator/errnostring.ml @@ -25,6 +25,8 @@ open Utils open Pr open Docstrings +let generate_header = generate_header ~inputs:["generator/errnostring.ml"] + (* Generate the functions errno_to_string and string_to_errno which * convert errno (eg. EINVAL) into string ("EINVAL") and back again, * allowing us to portably pass error values over the protocol between diff --git a/generator/fish.ml b/generator/fish.ml index a562a73..c5bf7e0 100644 --- a/generator/fish.ml +++ b/generator/fish.ml @@ -31,6 +31,8 @@ open Prepopts open C open Events +let generate_header = generate_header ~inputs:["generator/fish.ml"] + type func | Function of string (* The description. *) | Alias of string (* The function of which it is one the diff --git a/generator/gobject.ml b/generator/gobject.ml index 8f23135..60c053c 100644 --- a/generator/gobject.ml +++ b/generator/gobject.ml @@ -30,6 +30,8 @@ open Structs open Types open Utils +let generate_header = generate_header ~inputs:["generator/gobject.ml"] + let camel_of_name { camel_name = camel_name } = "Guestfs" ^ camel_name let generate_gobject_proto name ?(single_line = true) diff --git a/generator/golang.ml b/generator/golang.ml index faaf19e..1cb97fc 100644 --- a/generator/golang.ml +++ b/generator/golang.ml @@ -30,6 +30,8 @@ open Structs open C open Events +let generate_header = generate_header ~inputs:["generator/golang.ml"] + let generate_golang_go () generate_header CStyle LGPLv2plus; diff --git a/generator/haskell.ml b/generator/haskell.ml index 1430edb..66c921e 100644 --- a/generator/haskell.ml +++ b/generator/haskell.ml @@ -28,6 +28,8 @@ open Optgroups open Actions open Structs +let generate_header = generate_header ~inputs:["generator/haskell.ml"] + let rec generate_haskell_hs () generate_header HaskellStyle LGPLv2plus; diff --git a/generator/java.ml b/generator/java.ml index 7bcd329..f303048 100644 --- a/generator/java.ml +++ b/generator/java.ml @@ -30,6 +30,8 @@ open Structs open Events open C +let generate_header = generate_header ~inputs:["generator/java.ml"] + (* Generate Java bindings GuestFS.java file. *) let rec generate_java_java () generate_header CStyle LGPLv2plus; diff --git a/generator/lua.ml b/generator/lua.ml index eee751b..53c2072 100644 --- a/generator/lua.ml +++ b/generator/lua.ml @@ -30,6 +30,8 @@ open Structs open C open Events +let generate_header = generate_header ~inputs:["generator/lua.ml"] + let generate_lua_c () generate_header CStyle LGPLv2plus; diff --git a/generator/ocaml.ml b/generator/ocaml.ml index 9071eb0..288e91f 100644 --- a/generator/ocaml.ml +++ b/generator/ocaml.ml @@ -30,6 +30,8 @@ open Structs open C open Events +let generate_header = generate_header ~inputs:["generator/ocaml.ml"] + (* List of errnos to expose on Guestfs.Errno. *) let ocaml_errnos = [ "EINVAL"; diff --git a/generator/perl.ml b/generator/perl.ml index 6876b0f..5250ce1 100644 --- a/generator/perl.ml +++ b/generator/perl.ml @@ -30,6 +30,8 @@ open Structs open C open Events +let generate_header = generate_header ~inputs:["generator/perl.ml"] + (* Generate Perl xs code, a sort of crazy variation of C with macros. *) let rec generate_perl_xs () generate_header CStyle LGPLv2plus; diff --git a/generator/php.ml b/generator/php.ml index 15a618b..926ac4f 100644 --- a/generator/php.ml +++ b/generator/php.ml @@ -29,6 +29,8 @@ open Actions open Structs open C +let generate_header = generate_header ~inputs:["generator/php.ml"] + let rec generate_php_h () generate_header CStyle LGPLv2plus; diff --git a/generator/python.ml b/generator/python.ml index a7f5e34..c618bf0 100644 --- a/generator/python.ml +++ b/generator/python.ml @@ -30,6 +30,8 @@ open Structs open C open Events +let generate_header = generate_header ~inputs:["generator/python.ml"] + (* Generate Python C module. *) let rec generate_python_c () generate_header CStyle LGPLv2plus; diff --git a/generator/ruby.ml b/generator/ruby.ml index db222ea..9567925 100644 --- a/generator/ruby.ml +++ b/generator/ruby.ml @@ -30,6 +30,8 @@ open Structs open C open Events +let generate_header = generate_header ~inputs:["generator/ruby.ml"] + (* Generate ruby bindings. *) let rec generate_ruby_c () generate_header CStyle LGPLv2plus; diff --git a/generator/tests_c_api.ml b/generator/tests_c_api.ml index 7cf3763..635a4a6 100644 --- a/generator/tests_c_api.ml +++ b/generator/tests_c_api.ml @@ -28,6 +28,8 @@ open Optgroups open Actions open Structs +let generate_header = generate_header ~inputs:["generator/tests_c_api.ml"] + (* Generate the C API tests. *) let rec generate_c_api_tests () generate_header CStyle GPLv2plus; diff --git a/generator/xdr.ml b/generator/xdr.ml index 92d484b..60ccbf9 100644 --- a/generator/xdr.ml +++ b/generator/xdr.ml @@ -28,6 +28,8 @@ open Optgroups open Actions open Structs +let generate_header = generate_header ~inputs:["generator/xdr.ml"] + (* Generate the protocol (XDR) file, 'guestfs_protocol.x' and * indirectly 'guestfs_protocol.h' and 'guestfs_protocol.c'. * diff --git a/gobject/Makefile.inc b/gobject/Makefile.inc index 866e1be..46f27dc 100644 --- a/gobject/Makefile.inc +++ b/gobject/Makefile.inc @@ -1,6 +1,7 @@ # libguestfs generated file -# WARNING: THIS FILE IS GENERATED -# from the code in the generator/ subdirectory. +# WARNING: THIS FILE IS GENERATED FROM THE FOLLOWING FILES: +# generator/gobject.ml +# and from the code in the generator/ subdirectory. # ANY CHANGES YOU MAKE TO THIS FILE WILL BE LOST. # # Copyright (C) 2009-2016 Red Hat Inc. diff --git a/java/Makefile.inc b/java/Makefile.inc index 86da36a..8f994ea 100644 --- a/java/Makefile.inc +++ b/java/Makefile.inc @@ -1,6 +1,7 @@ # libguestfs generated file -# WARNING: THIS FILE IS GENERATED -# from the code in the generator/ subdirectory. +# WARNING: THIS FILE IS GENERATED FROM THE FOLLOWING FILES: +# generator/java.ml +# and from the code in the generator/ subdirectory. # ANY CHANGES YOU MAKE TO THIS FILE WILL BE LOST. # # Copyright (C) 2009-2016 Red Hat Inc. -- 2.5.0
Pino Toscano
2016-Feb-23 10:34 UTC
Re: [Libguestfs] [PATCH 1/4] generator: Add interfaces to all modules.
On Tuesday 23 February 2016 08:19:23 Richard W.M. Jones wrote:> Be explicit about what is exported from each module in the generator. > ---LGTM, just one note below.> [...] > > diff --git a/generator/checks.mli b/generator/checks.mli > new file mode 100644 > index 0000000..4bbbda5 > --- /dev/null > +++ b/generator/checks.mli > @@ -0,0 +1,18 @@ > +(* libguestfs > + * Copyright (C) 2009-2016 Red Hat Inc. > + * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License as published by > + * the Free Software Foundation; either version 2 of the License, or > + * (at your option) any later version. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + * > + * You should have received a copy of the GNU General Public License > + * along with this program; if not, write to the Free Software > + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA > + *) > +Can you please add a note that this module exports nothing on purpose, as it only does runtime checks for actions and other generator stuff? Thanks, -- Pino Toscano
Pino Toscano
2016-Feb-23 10:34 UTC
Re: [Libguestfs] [PATCH 0/4] Various tweaks to the generator.
On Tuesday 23 February 2016 08:19:22 Richard W.M. Jones wrote:> Use interfaces files (*.mli files) instead of exporting all symbols > randomly. > > Change the 'file is generated' warnings at the top of generated files > so they accurately describe which source file generates each output > file.The series LGTM, just one small note in patch #1. Thanks, -- Pino Toscano
Richard W.M. Jones
2016-Feb-23 10:40 UTC
Re: [Libguestfs] [PATCH 0/4] Various tweaks to the generator.
On Tue, Feb 23, 2016 at 11:34:55AM +0100, Pino Toscano wrote:> On Tuesday 23 February 2016 08:19:22 Richard W.M. Jones wrote: > > Use interfaces files (*.mli files) instead of exporting all symbols > > randomly. > > > > Change the 'file is generated' warnings at the top of generated files > > so they accurately describe which source file generates each output > > file. > > The series LGTM, just one small note in patch #1.Thanks - pushed with the note added to checks.mli. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v