Commit 5d57e361 authored by Marius Vlad's avatar Marius Vlad

meson: Add tags/cscope custom targets for meson

This adds a script that generates the files to be fed to ctags/cscope
programs and adds a few custom targets for meson to generate the databases like
we had in autotools.
Signed-off-by: Marius Vlad's avatarMarius Vlad <marius.vlad@collabora.com>
parent cc64cc37
Pipeline #26706 passed with stage
in 6 minutes and 36 seconds
......@@ -168,4 +168,24 @@ subdir('man')
configure_file(output: 'config.h', install: false, configuration: config_h)
tags_program = find_program('ctags', required: false)
cscope_program = find_program('cscope', required: false)
tags_file = custom_target('gen-file-tags',
command: [ meson.current_source_dir() + '/scripts/gen-tags-file.sh',
meson.current_build_dir() + '/cscope.files'],
output: 'cscope.files')
if tags_program.found()
custom_target('xtags',
command: [ 'ctags', '-L', meson.current_build_dir() + '/cscope.files'],
depends: tags_file, output: 'tags')
endif
if cscope_program.found()
custom_target('xcscope',
command: [ 'cscope', '-b', '-q', '-i', meson.current_build_dir() + '/cscope.files' ],
output: 'cscope', depends: tags_file)
endif
# TODO: process doc/doxygen/*.doxygen.in
#!/bin/sh
if [ -z $1 ]; then
echo "Please supply a file"
exit 127
fi
FILE=$1
> $FILE
for dir in "clients" "xwayland" "shared" "libweston" "compositor" \
"libweston-desktop" "desktop-shell" "fullscreen-shell" \
"protocol"; do
if [ -d $dir ]; then
find ../$dir -type f -name \*.[ch] >> $FILE
fi
done
#sed -i 's|^\.\./||' $FILE
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