On 3/8/23 17:39, Daniel P. Berrangé wrote: > The new program takes the form > > rpcgen [--mode source|header|repr] \ > [--header include] \ > xdr-file output-file > > If '--mode' is not given it parses the XDR file but does not > generate anything, which is useful as a syntax check. The > 'source' mode gives the '.c' file content, while 'header' > gives the '.h' file content. 'repr' gives a representation > of the abstract syntax tree, mostly useful for debugging > the parser. > > If '--header' is given, it is added as a local #include ".." > statement in the output and is valid for either 'header' > or 'source' modes. > > Either 'xdr-file' or 'output-file' can be omitted in which > case they default to stdin/stdout respectively. > > This rpcgen program will directly include the 'config.h' > header in its output. > > Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx> > --- > scripts/rpcgen/main.py | 86 ++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 86 insertions(+) > create mode 100755 scripts/rpcgen/main.py > > diff --git a/scripts/rpcgen/main.py b/scripts/rpcgen/main.py > new file mode 100755 > index 0000000000..bf4ef38ede > --- /dev/null > +++ b/scripts/rpcgen/main.py > @@ -0,0 +1,86 @@ > +#!/usr/bin/python #!/usr/bin/env python3 Michal