diff --git a/Makefile b/Makefile index 0a26211861..764398ef3b 100644 --- a/Makefile +++ b/Makefile @@ -8,8 +8,3 @@ build.ninja: configure.py clean: rm -rf $(out) - -cscope: - find -name '*.[chS]' -o -name "*.cc" -o -name "*.hh" | cscope -bq -i- - @echo cscope index created -.PHONY: cscope diff --git a/configure.py b/configure.py index 80e426480d..5e7156bc0b 100755 --- a/configure.py +++ b/configure.py @@ -120,4 +120,9 @@ with open(buildfile, 'w') as f: command = python3 configure.py $configure_args generator = 1 build build.ninja: configure | configure.py - ''')) + rule cscope + command = find -name '*.[chS]' -o -name "*.cc" -o -name "*.hh" | cscope -bq -i- + description = CSCOPE + build cscope: cscope + default {modes_list} + ''').format(modes_list = ' '.join(build_modes), **globals()))