diff options
| author | Simon Ser <contact@emersion.fr> | 2020-12-15 20:35:25 +0100 |
|---|---|---|
| committer | Simon Ser <contact@emersion.fr> | 2021-05-10 22:08:45 +0000 |
| commit | f452e41264387dee4fd737cbf1af58b34b53941b (patch) | |
| tree | 9d5e425408d00363fc6b650fe5d82799da43989b /src/meson.build | |
| parent | src: Add missing new lines to log messages (diff) | |
| download | wayland-f452e41264387dee4fd737cbf1af58b34b53941b.tar wayland-f452e41264387dee4fd737cbf1af58b34b53941b.tar.gz wayland-f452e41264387dee4fd737cbf1af58b34b53941b.tar.bz2 wayland-f452e41264387dee4fd737cbf1af58b34b53941b.tar.lz wayland-f452e41264387dee4fd737cbf1af58b34b53941b.tar.xz wayland-f452e41264387dee4fd737cbf1af58b34b53941b.tar.zst wayland-f452e41264387dee4fd737cbf1af58b34b53941b.zip | |
build: replace assembly embedding with Python script
This allows Meson to properly track dependencies and re-build the scanner when
editing the dtd. We also stop depending on GNU as' .incbin and make the
embedding less obscure.
Signed-off-by: Simon Ser <contact@emersion.fr>
Diffstat (limited to 'src/meson.build')
| -rw-r--r-- | src/meson.build | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/meson.build b/src/meson.build index b6b248c..ec00d81 100644 --- a/src/meson.build +++ b/src/meson.build @@ -34,13 +34,17 @@ if get_option('scanner') scanner_args += '-DHAVE_LIBXML=1' endif - configure_file( + prog_embed = find_program('embed.py', native: true) + + embed_dtd = custom_target( + 'wayland.dtd.h', input: '../protocol/wayland.dtd', - output: 'wayland.dtd.embed', - copy: true + output: 'wayland.dtd.h', + command: [ prog_embed, '@INPUT@', 'wayland_dtd' ], + capture: true ) - wayland_scanner_sources = [ 'scanner.c', 'dtddata.S' ] + wayland_scanner_sources = [ 'scanner.c', embed_dtd ] wayland_scanner_includes = [ root_inc, protocol_inc ] wayland_scanner = executable( |
