Skip to content

Commit

Permalink
meson: simplify tag support and add ctags (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
silvio authored and keszybz committed Jul 3, 2017
1 parent 739e348 commit 02fbbdb
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -250,18 +250,14 @@ endforeach
############################################################

git = find_program('git', required : false)
etags = find_program('etags', required : false)

if git.found() and etags.found()
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())

run_target(
'TAGS',
input : all_files,
command : [etags, '-o', '@0@/TAGS'.format(meson.source_root())] + all_files)
run_target('tags', command : ['env', 'etags', '-o', '@0@/@1@'.format(meson.source_root(), 'tags')] + all_files)
run_target('ctags', command : ['env', 'ctags', '-o', '@0@/@1@'.format(meson.source_root(), 'tags')] + all_files)
endif

0 comments on commit 02fbbdb

Please sign in to comment.