aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gmail.com>2018-04-09 21:35:57 +0100
committerJussi Pakkanen <jpakkane@gmail.com>2018-04-09 23:35:57 +0300
commite103675a3995f799d65a90595c62ad7f0ed4a088 (patch)
treed4c68bd616b3be87c009c451705fe97f20e4d55d /mesonbuild
parent6dea1777743fe26173d9c674b0870790a7caae92 (diff)
downloadmeson-e103675a3995f799d65a90595c62ad7f0ed4a088.zip
meson-e103675a3995f799d65a90595c62ad7f0ed4a088.tar.gz
meson-e103675a3995f799d65a90595c62ad7f0ed4a088.tar.bz2
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.
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/modules/gnome.py6
1 files changed, 6 insertions, 0 deletions
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', '')