Version: unspecified (using KDE 4.4.3) OS: Linux Kate shows incorrect syntax highlighting in a Makefile. Reproducible: Always Steps to Reproduce: Makefile below. DIR = /bin ROOT_FILES = $(shell for f in ${DIR}/*; do basename $$f; done) Actual Results: Screen shot attached. Expected Results: I expect more blue text.
Created attachment 47846 [details] incorrect syntax highlighting makefile
It looks fine for me (i.e. I get expected highlighting, not what is in your screenshot). Can you please grab the latest makefile.xml from svn and drop it in your user HL directory and see if you still have problems? I get: <var>ROOT_FILES</var> = <oper>$(</oper><var>shell</var> for f in <oper>${</oper><var>DIR</var><oper>}</oper>/*; do basename <special>$$</special>f; done<oper>)</oper> (...where the markup represents coloration with the Variable, Operator and Special attributes; everything else is String.) Also, while it looks like it probably is, double check that kate is actually using the makefile highlighter; Tools -> Highlighting -> Others -> Makefile.
kdebase4 => version 4.3.5 kate => version 4.3.5 makefile.xml => version 1.10 I went to: Settings -> Configure Kate -> Open Save -> Modes & Filetypes -> Download Highlighting Files... I have the current makefile.xml according to Kate settings. I get the same highlighting as Kevin. In addition, it seems comments on lines that contain variable assignments are not recognized. They are the same color as the assigned value, rather than the "comment" color. For example: # This comment okay DIR = /bin # Not Okay SHELL := /bin/sh # Not Okay .SUFFIXES : # Okay .SUFFIXES : .o .r .f .l # Okay I went to: http://websvn.kde.org/tags/KDE/4.4.95/kdelibs/kate/syntax/data/makefile.xml?view=log, and did a diff with the makefile.xml on my system, and they are the same.
Hmm. Okay, it turns out I have a modified makefile.xml (that I forgot I had). I wonder if that means I fixed this already, locally, and forgot about it...
Created attachment 49788 [details] makefile.xml I am using Here's what I'm using. I'll try to take another look at what this changes and possibly get it pushed upstream. I'd welcome help if someone else wants to do that; due to current Real Life circumstances, I might not get to it for a few weeks (and someone should nudge me in a week or so, or I might forget). Meanwhile, feel free to play around with this and see if it helps.
I should also add, the date on that is 2006-11-01, any changes since then probably should be merged.
this bug is still in KDE 4.6.0
Matthew: Can you have a look at whether the patch still applies?
Git commit 75f96977906b41dbf00695949eb382c4319bc2ee by Dominik Haumann. Committed on 03/08/2011 at 12:01. Pushed by dhaumann into branch 'master'. fix {...) and (...} matching BUG: 241266 M +32 -16 part/syntax/data/makefile.xml http://commits.kde.org/kate/75f96977906b41dbf00695949eb382c4319bc2ee
Git commit 224e1e0a45167f3c6b02457a4a4ee348c132083d by Dominik Haumann. Committed on 03/08/2011 at 12:01. Pushed by dhaumann into branch 'KDE/4.7'. fix {...) and (...} matching BUG: 241266 M +32 -16 part/syntax/data/makefile.xml http://commits.kde.org/kate/224e1e0a45167f3c6b02457a4a4ee348c132083d