Skip to content

Add POSIX/gmake alternate for Makefile simple variable assignment

Peter Mello requested to merge pmello/syntax-highlighting:patch-1 into master

This commit adds '::=' as an operator which defines the value of a variable to the list of strings which trigger the application of the Variable attribute in the KSyntaxHighlighting framework. This element of POSIX syntax is recognized by GNU make v4.0 and later, but not BSD bmake, but failure to fully adopt an international standard by one member of a family of related tools should not present an impediment to widespread adoption elsewhere.

In 2012, the IEEE published a corrigendum (Latin: a document which exists solely to correct the errors of an earlier publication) which was subsequently adopted as Std 1003.1-2008/Cor 1-2013, known better in computing circles as the document which amended the original POSIX standard released in 2008 and defined the replacement "POSIX 2013" specification. Among the changes it made was the addition of '::=' as an alternate syntax of for the standard '=' variable assignment operator. Recognition of this operator as a syntactic equivalent for ':=' to indicate simple (non-recursive) variable assignment in Makefiles was added to GNU make in the first release after POSIX 2013 was adopted by the IEEE: version 4.0, on 2013-10-09.

Merge request reports