From 2876ca00f1a95dfea52e0fdb8d2779edc2783af4 Mon Sep 17 00:00:00 2001
From: janneke <janneke>
Date: Wed, 21 Jul 2004 00:17:19 +0000
Subject: [PATCH] * SConstruct: Use only code files for TAGS.

* SConstruct[GO_FAST_BUTTON]: implement tips from Andreas Roach.
This brings SCons run-time on up-to-date tree down from 48s with
only checksums, to 34s without 2day checksums, to 14s (make needs
4 seconds).
(subdirs)[GO_FAST_BUTTON]: Try to read all subdirs only when
necessary.
---
 ChangeLog  |  2 ++
 SConstruct | 13 +++++++------
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5380b84289..49171b8d94 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2004-07-21  Jan Nieuwenhuizen  <janneke@gnu.org>
 
+	* SConstruct: Use only code files for TAGS.
+
 	* SConstruct[GO_FAST_BUTTON]: implement tips from Andreas Roach.
 	This brings SCons run-time on up-to-date tree down from 48s with
 	only checksums, to 34s without 2day checksums, to 14s (make needs
diff --git a/SConstruct b/SConstruct
index daa7560ee1..88406c4906 100644
--- a/SConstruct
+++ b/SConstruct
@@ -730,7 +730,7 @@ if GO_FAST_BUTTON\
    and 'web' not in COMMAND_LINE_TARGETS\
    and 'install' not in COMMAND_LINE_TARGETS\
    and 'clean' not in COMMAND_LINE_TARGETS:
-	subdirs = ['lily','flower', 'mf']
+	subdirs = ['lily', 'lily/include', 'flower', 'flower/include', 'mf']
 else:
 	subdirs = flatten (cvs_dirs ('.'), [])
 readme_files = ['AUTHORS', 'README', 'INSTALL', 'NEWS']
@@ -801,11 +801,12 @@ env.Alias ('web', www_ball)
 
 #### tags
 env.Append (
-	ETAGSFLAGS = ["""--regex='{c++}/^LY_DEFINE *(\([^,]+\)/\1/'""",
-		      """--regex='{c++}/^LY_DEFINE *([^"]*"\([^"]+\)"/\1/'"""])
-# filter-out some files?
-env.Command ('TAGS', src_files, 'etags $ETAGSFLAGS $SOURCES')
-
+	ETAGSFLAGS = """--regex='{c++}/^LY_DEFINE *(\([^,]+\)/\\1/' \
+	--regex='{c++}/^LY_DEFINE *([^"]*"\([^"]+\)"/\\1/'""")
+code_ext = ['.cc', '.hh', '.scm', '.tcc',]
+env.Command ('TAGS', filter (lambda x: os.path.splitext (x)[1] in code_ext,
+			     src_files),
+	     'etags $ETAGSFLAGS $SOURCES')
 
 # Note: SConscripts are only needed in directories where something needs
 # to be done, building or installing
-- 
2.39.5