From 1ffcb516954add31a225d38675adad1df8fa5d21 Mon Sep 17 00:00:00 2001 From: Tim Wiederhake Date: Sun, 3 Mar 2024 12:55:11 +0100 Subject: Add meson as alternative build system Add a note to the readme file to clarify that the default build system is still automake. Signed-off-by: Tim Wiederhake --- src/meson.build | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 src/meson.build (limited to 'src/meson.build') diff --git a/src/meson.build b/src/meson.build new file mode 100644 index 0000000..9c801df --- /dev/null +++ b/src/meson.build @@ -0,0 +1,78 @@ +deftwmrc = custom_target( + 'deftwmrc.c', + input: 'system.twmrc', + output: 'deftwmrc.c', + command: [ + find_program('gen_deftwmrc.sh'), + '@OUTPUT@', + '@INPUT@', + ], +) + +parser = custom_target( + 'gram.[ch]', + input: [ + 'gram.y', + ], + output: [ + 'gram.c', + 'gram.h' + ], + command: [ + find_program('bison'), + '-y', + '-d', + '-o', + '@OUTPUT0@', + '@INPUT@', + ], +) + +lexer = custom_target( + 'lex.c', + input: [ + 'lex.l', + parser[1], + ], + output: [ + 'lex.c', + ], + command: [ + find_program('flex'), + '-o', + '@OUTPUT@', + '@INPUT0@', + ], +) + +twm = executable( + 'twm', + [ + 'add_window.c', + 'cursor.c', + 'events.c', + 'gc.c', + 'iconmgr.c', + 'icons.c', + 'list.c', + 'menus.c', + 'parse.c', + 'resize.c', + 'session.c', + 'twm.c', + 'util.c', + deftwmrc, + parser, + lexer, + ], + dependencies: twm_dependencies, + install: true, +) + +configure_file( + input: 'system.twmrc', + output: 'system.twmrc', + copy: true, + install: true, + install_dir: get_option('datadir') / 'X11/twm/', +) -- cgit v1.2.3