diff --git a/autotests/folding/Makefile.fold b/autotests/folding/Makefile.fold --- a/autotests/folding/Makefile.fold +++ b/autotests/folding/Makefile.fold @@ -34,3 +34,20 @@ foo := a b c bar := foo hello := $($(bar):a=$(rempl)) + +# Conditionals +bar = +foo = $(bar) +ifdef bar +frobozz = yes +else ifdef foo +frobozz = no +endif + +error_type := 0 +check: +ifeq ($(error_type),0) +else ifeq ($(error_type),1) +else ifeq ($(error_type),2) +else ifeq ($(error_type),3) +endif diff --git a/autotests/html/Makefile.html b/autotests/html/Makefile.html --- a/autotests/html/Makefile.html +++ b/autotests/html/Makefile.html @@ -40,4 +40,21 @@ foo := a b c bar := foo hello := $($(bar):a=$(rempl)) + +# Conditionals +bar = +foo = $(bar) +ifdef bar +frobozz = yes +else ifdef foo +frobozz = no +endif + +error_type := 0 +check: +ifeq ($(error_type),0) +else ifeq ($(error_type),1) +else ifeq ($(error_type),2) +else ifeq ($(error_type),3) +endif diff --git a/autotests/input/Makefile b/autotests/input/Makefile --- a/autotests/input/Makefile +++ b/autotests/input/Makefile @@ -34,3 +34,20 @@ foo := a b c bar := foo hello := $($(bar):a=$(rempl)) + +# Conditionals +bar = +foo = $(bar) +ifdef bar +frobozz = yes +else ifdef foo +frobozz = no +endif + +error_type := 0 +check: +ifeq ($(error_type),0) +else ifeq ($(error_type),1) +else ifeq ($(error_type),2) +else ifeq ($(error_type),3) +endif diff --git a/autotests/reference/Makefile.ref b/autotests/reference/Makefile.ref --- a/autotests/reference/Makefile.ref +++ b/autotests/reference/Makefile.ref @@ -34,3 +34,20 @@ foo := a b c
bar := foo
hello := $($(bar):a=$(rempl))
+
+# Conditionals
+bar =
+foo = $(bar)
+ifdef bar
+frobozz = yes
+else ifdef foo
+frobozz = no
+endif
+
+error_type := 0
+check:
+ifeq ($(error_type),0)
+else ifeq ($(error_type),1)
+else ifeq ($(error_type),2)
+else ifeq ($(error_type),3)
+endif
diff --git a/data/syntax/makefile.xml b/data/syntax/makefile.xml --- a/data/syntax/makefile.xml +++ b/data/syntax/makefile.xml @@ -10,7 +10,7 @@ @@ -185,8 +185,8 @@ - - + + @@ -203,10 +203,16 @@ - + + + +