class: Tools::TagList
authorClaus Gittinger <cg@exept.de>
Wed, 24 Jul 2013 01:20:56 +0200
changeset 13215 187a0aabc409
parent 13214 7727357e3c6f
child 13216 d1db940d42fb
child 13250 0decde6c459d
class: Tools::TagList changed: #fromFile:in: makefile tags are better done by smalltalk
Tools__TagList.st
--- a/Tools__TagList.st	Tue Jul 23 23:08:55 2013 +0200
+++ b/Tools__TagList.st	Wed Jul 24 01:20:56 2013 +0200
@@ -2061,15 +2061,21 @@
     "create tags from a file;
      either use the ctags/etags command, or an intenral naive, simple method."
 
-    |list shellCmd numTags fileContents|
+    |forceSimpleTagList list shellCmd numTags fileContents|
 
     rawList := nil.
     list := OrderedCollection new.
 
-    shellCmd := (self shellCommandFor:aFile pathName).
-    shellCmd notNil ifTrue:[
-        tagTypesPresent := false.     "/ will be set again, when ctags command provides types
-        list := self getTagListFromFile:aFile usingCommand:shellCmd mode:nil in:aTempDirectory
+    forceSimpleTagList := false.
+    "/ the simple builtin tagList generator is actually better than the ctags output for makefiles
+    (self class makeFilePatterns contains:[:aPattern | (aPattern match:aFile baseName asLowercase)]) ifTrue:[forceSimpleTagList := true].
+
+    forceSimpleTagList ifFalse:[
+        shellCmd := (self shellCommandFor:aFile pathName).
+        shellCmd notNil ifTrue:[
+            tagTypesPresent := false.     "/ will be set again, when ctags command provides types
+            list := self getTagListFromFile:aFile usingCommand:shellCmd mode:nil in:aTempDirectory
+        ].
     ].
 
     "/ in case ctags could not find anything, try our own, naive fallback (not too bad either)
@@ -3661,14 +3667,14 @@
 !TagList class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__TagList.st,v 1.28 2013-07-10 08:39:01 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__TagList.st,v 1.29 2013-07-23 23:20:56 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__TagList.st,v 1.28 2013-07-10 08:39:01 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__TagList.st,v 1.29 2013-07-23 23:20:56 cg Exp $'
 !
 
 version_SVN
-    ^ '$Id: Tools__TagList.st,v 1.28 2013-07-10 08:39:01 cg Exp $'
+    ^ '$Id: Tools__TagList.st,v 1.29 2013-07-23 23:20:56 cg Exp $'
 ! !