Commit 4c27ba64 authored by Guido Gunther's avatar Guido Gunther

meson: generate tag files automatically

parent a75c85ec
......@@ -71,3 +71,31 @@ gnome = import('gnome')
subdir('data')
subdir('po')
subdir('src')
git = find_program('git', required: false)
if git.found()
all_files = run_command(
git,
['--git-dir=@0@/.git'.format(meson.current_source_dir()),
'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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment