From 0a9c97439c0bf8b9d99b053ad4b34f7ee6a5fb41 Mon Sep 17 00:00:00 2001 From: Mathew Attlee Date: Thu, 12 May 2016 15:02:37 +0100 Subject: [PATCH] Makefile snippets for if, ife and el and .DEFAULT_GOAL --- snippets/make.snippets | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/snippets/make.snippets b/snippets/make.snippets index 8367b8f..68a75e2 100644 --- a/snippets/make.snippets +++ b/snippets/make.snippets @@ -25,7 +25,21 @@ snippet add snippet print print-%: ; @echo $*=$($*) # ifeq -snippet ifeq +snippet if ifeq (${1:cond0}, ${2:cond1}) ${0} endif +# ifeq ... else ... endif +snippet ife + ifeq (${1:cond0}, ${2:cond1}) + ${3} + else + ${0} + endif +# else ... +snippet el + else + ${0} +# .DEFAULT_GOAL := target +snippet default + .DEFAULT_GOAL := ${1}