From e103675a3995f799d65a90595c62ad7f0ed4a088 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 9 Apr 2018 21:35:57 +0100 Subject: Never install the glib-mkenums generated C source (#3374) * Never install the glib-mkenums generated C source When using gnome.mkenums_simple() we end up installing the generated C source file alongside the C header file, if `install_header` is set to True. This is caused by mkenums_simple() acting as a wrapper for mkenums() without template files; mkenums() won't be able to know if we're generating the header or the source, and will use the presence of `install_header` as the deciding factor as to whether the generated file should be installed. When generating the C source file, we should always unset the `install_header` option to False, just like mkenums() expects. Closes #3373 * Verify that mkenums_simple() does not install C sources When asked to installed the generated C header file. --- mesonbuild/modules/gnome.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mesonbuild') diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 30364a6..9c73667 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -1046,6 +1046,12 @@ This will become a hard error in the future.''') raise MesonException( 'Sources keyword argument must be a string or array.') + # The `install_header` argument will be used by mkenums() when + # not using template files, so we need to forcibly unset it + # when generating the C source file, otherwise we will end up + # installing it + c_file_kwargs['install_header'] = False + header_prefix = kwargs.get('header_prefix', '') decl_decorator = kwargs.get('decorator', '') func_prefix = kwargs.get('function_prefix', '') -- cgit v1.1