File: make

package info (click to toggle)
dte 1.10-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, trixie
  • size: 2,152 kB
  • sloc: ansic: 28,421; sh: 94; awk: 56; makefile: 13; sed: 1
file content (95 lines) | stat: -rw-r--r-- 2,203 bytes parent folder | download | duplicates (2)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
syntax make

state start code
    char "\n" this
    char "\t" tab-indent
    char ' '  space-indent
    noeat not-recipe

# "^\t[ \t]*"
state tab-indent code
    char " \t" this
    char "\n" start
    char -b a-zA-Z_- not-target
    noeat make

# "^ [ \t]*"
state space-indent code
    char " \t" this
    noeat not-recipe

# Can't be target but can be recipe, variable or keyword
state not-target code
    char -b a-zA-Z_- this
    inlist keyword make
    noeat make

# Can't be recipe but can be target, variable or keyword
state not-recipe code
    char -b . special-target
    char -b a-zA-Z_- this
    inlist keyword make
    noeat make

state special-target code
    char -b A-Z_ this
    # FIXME: ".PHONY := ..." is valid
    inlist special-target make
    noeat make

state make code
    char # comment
    char \$ dollar
    char "\n" start
    char \\ esc
    # this is a hack
    char ')}' this variable
    eat this

state comment
    char "\n" start
    char \\ comment-esc
    eat this

state comment-esc comment
    char "\\\n" comment
    noeat comment

state dollar variable
    char '({' lp
    char a-zA-Z make variable
    char '@%<?^+|*' make variable
    char \$ make variable
    noeat make

state lp variable
    char -b a-zA-Z0-9_- variable
    noeat make

state variable
    char -b a-zA-Z0-9_- this
    char ')}' make variable
    inlist function make builtin
    noeat make

state esc special
    char "\n" make
    eat make special

list keyword -- \
    define else endef endif export ifdef ifeq ifndef ifneq -include \
    include override unexport vpath

list function \
    abspath addprefix addsuffix and basename bindir call dir error eval \
    filter filter-out findstring firstword flavor foreach if info join \
    lastword notdir or origin patsubst realpath shell sort strip subst \
    suffix value warning wildcard word wordlist words

list special-target \
    .DEFAULT .DEFAULT_GOAL .DELETE_ON_ERROR .EXPORT_ALL_VARIABLES \
    .FEATURES .IGNORE .INCLUDE_DIRS .INTERMEDIATE .LIBPATTERNS \
    .LOW_RESOLUTION_TIME .NOTPARALLEL .ONESHELL .PHONY .POSIX .PRECIOUS \
    .SECONDARY .SECONDEXPANSION .SILENT .SUFFIXES .VARIABLES

default constant special-target