1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00
systemd/introspect.awk
Thierry Reding 9a60da2834 build-sys: allow cross-compilation
When cross-compiling systemd, the introspection XML files fail to be
generated because the systemd host binary is not executable. This patch
works around this by putting the introspection XML data into separate
ELF sections and extracting them from the binary when generating the XML
files.

The extracted XML data is passed through the strings utility in order to
strip the trailing NUL character. A small AWK script is used to prepend
the doctype and add the opening and closing node tags respectively.
Finally, the C preprocessor is used to substitute the correct doctype
information from the D-Bus header files.
2010-11-23 22:38:55 +01:00

14 lines
192 B
Awk

BEGIN {
print "<!DOCTYPE node PUBLIC DBUS_INTROSPECT_1_0_XML_PUBLIC_IDENTIFIER"
print "DBUS_INTROSPECT_1_0_XML_SYSTEM_IDENTIFIER>"
print "<node>"
}
// {
print
}
END {
print "</node>"
}