diff --git a/configure.ac b/configure.ac index d4287c2f4..5b58fba6e 100644 --- a/configure.ac +++ b/configure.ac @@ -680,7 +680,6 @@ lib/vfs/Makefile lib/widget/Makefile misc/syntax/Makefile -misc/syntax/Syntax doc/Makefile @@ -706,6 +705,11 @@ doc/hlp/sr/Makefile po/Makefile.in ]) +dnl https://stackoverflow.com/questions/30897170/ac-subst-does-not-expand-variable/30932102#30932102 +AC_CONFIG_FILES( +[misc/syntax/Syntax], [sed -i -e "s%\${prefix}%$PREFIX%" misc/syntax/Syntax], [export PREFIX=$prefix] +) + AC_CONFIG_FILES([ tests/Makefile tests/lib/Makefile diff --git a/misc/syntax/Syntax.in b/misc/syntax/Syntax.in index 40adae4b5..88c37bb14 100644 --- a/misc/syntax/Syntax.in +++ b/misc/syntax/Syntax.in @@ -1,6 +1,20 @@ # This file describes which highlighting scheme is applied to a particular # file in mcedit. # +# +# System-wide files (this and syntax definitions) are located in +# @datarootdir@/@PACKAGE@/syntax/ directory. +# +# User's files (this and syntax definitions) are located in +# ~/.local/share/@PACKAGE@/syntax directory. +# +# If user's file is missing, system-wide one is used. +# +# +# This file is rescanned on opening of every new editor file. +# +# Format of this file is following. +# # Each entry consists of two lines: a "file" specification and the # corresponding highlighting definition ("include"). A file specification # can have two or three fields, each separated by white-space characters.