forked from rafamadriz/friendly-snippets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake.json
36 lines (36 loc) · 1022 Bytes
/
make.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{
"help": {
"prefix": "help",
"body": [
"help: ## Prints help for targets with comments",
"\t@cat $(MAKEFILE_LIST) | grep -E '^[a-zA-Z_-]+:.*?## .*$$' | awk 'BEGIN {FS = \":.*?## \"}; {printf \"\\033[36m%-30s\\033[0m %s\\n\", $\\$1, $\\$2}'"
],
"description": "help target for self-documented Makefile"
},
"if statement": {
"prefix": "if",
"body": ["ifeq (${1:cond0}, ${2:cond1})", "\t$0", "endif"],
"description": "if statement"
},
"print": {
"prefix": "print",
"body": ["print-%: ; @echo $*=$($*)"],
"description": "print"
},
"if else statement": {
"prefix": "ife",
"body": [
"ifeq (${1:cond0}, ${2:cond1})",
"\t$3",
"else",
"\t$4",
"endif"
],
"description": "if else statement"
},
"else": {
"prefix": "el",
"body": ["else", "\t$0"],
"description": "else"
}
}