Debian Codegraph @

autotests/input/Makefile

raw
1 # comment
2
3 include Makefile.in
4 -include Makefile.doesntexist
5
6 .PHONY: all
7
8 all: target
9
10 foo = bar $(var) \
11 $(baz) quux
12
13 ifeq ($(CC),gcc)
14 bla=$(call func,param1,param2)
15 else ifeq "x" "y"
16 $(error this seems wrong)
17 else
18 libs=$(normal_libs)
19 endif
20
21 target1:
22 error
23
24 target2: bla.cpp $@
25 $(CC) bla.c -o bla.o
26 $(CC) bla.o $< \
27 -o bla.exe
28 @echo "hello"
29
30 target3: ; @echo ’hello \
31 world’ ; echo "hello \
32 world"
33 @echo "hello"
34
35 target4: ; echo ’hello \
36 world’ ; echo "hello \
37 world"
38 echo "hello"
39
40 # String Substitution
41 VAR := $(ANOTHER_VAR:%=%+1)
42
43 # Variable Assignment
44 RELAXED ::= mello
45 rempl := x
46 foo := a b c
47 bar := foo
48 hello := $($(bar):a=$(rempl))
49 my??var=value
50 var??=value
51 var?=value
52 var? = value
53 var :::= value
54 var ::= value
55 var += value
56 var != value
57 var = value\#nocomment
58 var = value#comment
59 var = value;value2
60 override var = a
61
62 define var :::=
63 bar
64 endef
65
66 override define var :::=
67 bar
68 endef
69
70 # Conditionals
71 bar =
72 foo = $(bar)
73 ifdef bar
74 frobozz = yes
75 else ifdef foo
76 frobozz = no
77 endif
78
79 error_type := 0
80 check:
81 ifeq ($(error_type),0)
82 else ifeq ($(error_type),1)
83 else ifeq ($(error_type),2)
84 else ifeq ($(error_type),3)
85 endif
86
87 $(info "'")
88 $(info '"')
89 $(info $(??))