summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pygments/lexers/make.py4
-rw-r--r--tests/examplefiles/automake.mk7
2 files changed, 10 insertions, 1 deletions
diff --git a/pygments/lexers/make.py b/pygments/lexers/make.py
index 76ca7376..0ce3ef4b 100644
--- a/pygments/lexers/make.py
+++ b/pygments/lexers/make.py
@@ -38,7 +38,9 @@ class MakefileLexer(Lexer):
# BSD Make
r'\.\s*(include|undef|error|warning|if|else|elif|endif|for|endfor)|'
# GNU Make
- r'\s*(ifeq|ifneq|ifdef|ifndef|else|endif|-?include|define|endef|:|vpath))(?=\s)')
+ r'\s*(ifeq|ifneq|ifdef|ifndef|else|endif|-?include|define|endef|:|vpath)|'
+ # GNU Automake
+ r'\s*(if|else|endif))(?=\s)')
r_comment = re.compile(r'^\s*@?#')
def get_tokens_unprocessed(self, text):
diff --git a/tests/examplefiles/automake.mk b/tests/examplefiles/automake.mk
new file mode 100644
index 00000000..47a50a38
--- /dev/null
+++ b/tests/examplefiles/automake.mk
@@ -0,0 +1,7 @@
+if DEBUG
+DBG = debug
+else
+DBG =
+endif
+noinst_PROGRAMS = $(DBG)
+