meson: output TAGS file in source not build directory
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 30 May 2017 23:56:12 +0000 (19:56 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 31 May 2017 01:36:27 +0000 (21:36 -0400)
The TAGS file was generated in build/ following what autotools did.
Nevertheless, it's more convenient to put in the source dir.
(It doesn't get deleted by mistake, and it's easier to find for the
editor.)

meson.build

index 0f90da1..f932d06 100644 (file)
@@ -2325,11 +2325,10 @@ if git.found() and etags.found()
                  ':/*.[ch]'])
         all_files = files(all_files.stdout().split())
 
-        custom_target(
+        run_target(
                 'TAGS',
-                output : 'TAGS',
                 input : all_files,
-                command : [etags, '-o', '@OUTPUT@'] + all_files)
+                command : [etags, '-o', '@0@/TAGS'.format(meson.source_root())] + all_files)
 endif
 
 if git.found()