]> git.ipfire.org Git - thirdparty/qemu.git/commit
scripts: add a XML preprocessor script
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Tue, 6 Jun 2023 11:56:41 +0000 (15:56 +0400)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Tue, 27 Jun 2023 15:08:56 +0000 (17:08 +0200)
commit9b286e76c858bb015c70261cc85f34952ba1d155
tree49c6f5676efcd03e1862827966fa2077e8c6bcb3
parent29c5c7e5f65977a77eddf6580fdc31ea4a263a6a
scripts: add a XML preprocessor script

gdbus-codegen doesn't support conditions or pre-processing.

Rather than duplicating D-Bus interfaces for win32 adaptation, let's
have a preprocess step, so we can have platform-specific interfaces.

The python script is based on
https://github.com/peitaosu/XML-Preprocessor, with bug fixes, some
testing and replacing lxml dependency with the built-in xml module.

This preprocessing syntax style is not very common, but is similar to
the one provided by WiX (https://wixtoolset.org/docs/v3/overview/preprocessor/)
or wixl, that we adopted in QEMU for packaging the guest agent.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20230606115658.677673-5-marcandre.lureau@redhat.com>
MAINTAINERS
scripts/meson.build
scripts/xml-preprocess-test.py [new file with mode: 0644]
scripts/xml-preprocess.py [new file with mode: 0755]