mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-20 03:35:41 +02:00
'-' is a valid character for tags.
Commit 03e1c7d
(module/network: Add link stats, 2022-04-30) introduced
two new tags for the network module: `ul-speed` and `dl-speed`. These
use the `-` character, that was previously never used in any tag.
We had two options: either change those tags to use `_` instead, or just
accept `-`s as a valid character. Going forward, I can see many people
deciding to name their tags with `-` instead of `_`, so I believe it is
better to just accept it once and for all.
Note that `-` cannot be used as the first character of a tag (e.g.
`-tag1`) since the `-` has a special meaning in `.yml` files. I don't
believe this will happen often, however, and should be easy to both
detect and correct if it does.
59 lines
1.7 KiB
Meson
59 lines
1.7 KiB
Meson
flex = find_program('flex', required: true)
|
|
bison = find_program('bison', required: true)
|
|
|
|
lgen = generator(
|
|
flex,
|
|
output : '@BASENAME@.yy.c',
|
|
arguments : ['-o', '@OUTPUT@', '@INPUT@']
|
|
)
|
|
lfiles = lgen.process('map.l')
|
|
|
|
pgen = generator(
|
|
bison,
|
|
output : ['@BASENAME@.tab.c', '@BASENAME@.tab.h'],
|
|
arguments : ['-Wall',
|
|
'-Wcounterexamples',
|
|
'--defines=@OUTPUT1@',
|
|
'--output=@OUTPUT0@', '@INPUT@']
|
|
)
|
|
pfiles = pgen.process('map.y')
|
|
|
|
map_parser = declare_dependency(sources: [pfiles, lfiles], include_directories: '.')
|
|
|
|
particle_sdk = declare_dependency(dependencies: [pixman, tllist, fcft])
|
|
|
|
dynlist_lib = build_target(
|
|
'dynlist', 'dynlist.c', 'dynlist.h', dependencies: particle_sdk,
|
|
target_type: plugs_as_libs ? 'shared_library' : 'static_library',
|
|
override_options : ['b_lundef=false'],
|
|
install: plugs_as_libs,
|
|
install_dir: get_option('libdir') + '/yambar',
|
|
)
|
|
|
|
dynlist = declare_dependency(link_with: dynlist_lib)
|
|
|
|
# Particle name -> dep-list
|
|
deps = {
|
|
'empty': [],
|
|
'list': [],
|
|
'map': [dynlist, map_parser],
|
|
'progress-bar': [],
|
|
'ramp': [],
|
|
'string': [],
|
|
}
|
|
|
|
particles = []
|
|
foreach particle, particle_deps : deps
|
|
if plugs_as_libs
|
|
shared_module('@0@'.format(particle), '@0@.c'.format(particle),
|
|
dependencies: [particle_sdk] + particle_deps,
|
|
name_prefix: 'particle_',
|
|
install: true,
|
|
install_dir: join_paths(get_option('libdir'), 'yambar'))
|
|
else
|
|
particles += [declare_dependency(
|
|
sources: '@0@.c'.format(particle),
|
|
dependencies: [particle_sdk] + particle_deps,
|
|
compile_args: '-DHAVE_PLUGIN_@0@'.format(particle.underscorify()))]
|
|
endif
|
|
endforeach
|