Tools__TagList.st
branchjv
changeset 13250 0decde6c459d
parent 13182 bc686a7cc736
parent 13215 187a0aabc409
child 13333 2e8aa3023772
--- a/Tools__TagList.st	Tue Jul 23 20:55:42 2013 +0100
+++ b/Tools__TagList.st	Wed Jul 24 11:15:26 2013 +0100
@@ -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,11 +3667,11 @@
 !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_HG
@@ -3674,6 +3680,6 @@
 !
 
 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 $'
 ! !