build,meson: simplify build of daemon enums sources

This commit is contained in:
Aleksander Morgado
2021-09-15 22:03:13 +02:00
parent d5a992d30f
commit aee12967ee

View File

@@ -184,24 +184,6 @@ headers = files(
'mm-port-probe.h',
)
enums_types = 'mm-daemon-enums-types'
daemon_enums_sources = []
daemon_enums_sources += gnome.mkenums(
enums_types + '.c',
sources: headers,
c_template: build_aux_dir / enums_types + '.c.template',
fhead: '#include "mm-daemon-enums-types.h"',
)
daemon_enums_sources += gnome.mkenums(
enums_types + '.h',
sources: headers,
h_template: build_aux_dir / enums_types + '.h.template',
fhead: '#include "mm-filter.h"\n#include "mm-base-bearer.h"\n#include "mm-port-probe.h"\n#ifndef __MM_DAEMON_ENUMS_TYPES_H__\n#define __MM_DAEMON_ENUMS_TYPES_H__\n',
ftail: '#endif /* __MM_DAEMON_ENUMS_TYPES_H__ */\n',
)
sources = files(
'main.c',
'mm-auth-provider.c',
@@ -240,6 +222,24 @@ sources = files(
'mm-sms-list.c',
)
enums_types = 'mm-daemon-enums-types'
sources += gnome.mkenums(
enums_types + '.c',
sources: headers,
c_template: build_aux_dir / enums_types + '.c.template',
fhead: '#include "mm-daemon-enums-types.h"',
)
sources += gnome.mkenums(
enums_types + '.h',
sources: headers,
h_template: build_aux_dir / enums_types + '.h.template',
fhead: '#include "mm-filter.h"\n#include "mm-base-bearer.h"\n#include "mm-port-probe.h"\n#ifndef __MM_DAEMON_ENUMS_TYPES_H__\n#define __MM_DAEMON_ENUMS_TYPES_H__\n',
ftail: '#endif /* __MM_DAEMON_ENUMS_TYPES_H__ */\n',
)
deps = [
gmodule_dep,
libmm_test_generated_dep,
@@ -294,7 +294,7 @@ endif
executable(
'ModemManager',
sources: sources + daemon_enums_sources,
sources: sources,
include_directories: top_inc,
dependencies: deps,
c_args: c_args,