Merge pull request #585 from agx/meson
meson: add tags and ctags targets
This commit is contained in:
commit
174d1aa81b
28
meson.build
28
meson.build
|
@ -180,3 +180,31 @@ pkgconfig.generate(
|
|||
name: meson.project_name(),
|
||||
description: 'Wayland compositor library',
|
||||
)
|
||||
|
||||
git = find_program('git', required: false)
|
||||
if git.found()
|
||||
all_files = run_command(
|
||||
git,
|
||||
['--git-dir=@0@/.git'.format(meson.source_root()),
|
||||
'ls-files',
|
||||
':/*.[ch]'])
|
||||
all_files = files(all_files.stdout().split())
|
||||
|
||||
etags = find_program('etags', required: false)
|
||||
if etags.found() and all_files.length() > 0
|
||||
custom_target('etags',
|
||||
build_by_default: true,
|
||||
input: all_files,
|
||||
output: 'TAGS',
|
||||
command: [etags.path(), '-o', 'TAGS'] + all_files)
|
||||
endif
|
||||
|
||||
ctags = find_program('ctags', required: false)
|
||||
if ctags.found() and all_files.length() > 0
|
||||
custom_target('ctags',
|
||||
build_by_default: true,
|
||||
input: all_files,
|
||||
output: 'tags',
|
||||
command: [ctags.path(), '-o', 'tags'] + all_files)
|
||||
endif
|
||||
endif
|
||||
|
|
Loading…
Reference in New Issue