File: Test.mk

package info (click to toggle)
zmk 0.5.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 1,132 kB
  • sloc: makefile: 1,749; sh: 313; ansic: 42; awk: 12; cpp: 12
file content (82 lines) | stat: -rw-r--r-- 3,463 bytes parent folder | download
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
#!/usr/bin/make -f
include zmk/internalTest.mk

t:: debug debug-silent-rules debug-destdir

# Test logs will contain debugging messages
%.log: ZMK.makeOverrides += DEBUG=directory
# Some logs have slent rules enabled
%-silent-rules.log: ZMK.makeOverrides += Silent.Active=yes
# Some logs have DESTDIR set to /destdir
%-destdir.log: ZMK.makeOverrides += DESTDIR=/destdir

debug: debug.log
	# Directory in the build tree
	GREP -qFx 'install -d subdir' <$<
	GREP -qFx 'install -d subdir/subsubdir' <$<
	# Extension of standard directory.
	GREP -qFx 'install -d /usr/local/lib' <$<
	GREP -qFx 'install -d /usr/local/lib/extra' <$<
	# Custom shallow directory.
	GREP -qFx 'install -d /foo' <$<
	# Custom deep directory with implicit parent rules.
	GREP -qFx 'install -d /custom' <$<
	GREP -qFx 'install -d /custom/long' <$<
	GREP -qFx 'install -d /custom/long/path' <$<
	# Custom deep directory with explicit parent rules.
	GREP -qFx 'install -d /other' <$<
	GREP -qFx 'install -d /other/custom' <$<
	GREP -qFx 'install -d /other/custom/path' <$<

debug-silent-rules: debug-silent-rules.log
	# Directory in the build tree
	GREP -qFx 'printf "  %-16s %s\n" "MKDIR" "subdir"' <$<
	GREP -qFx '#install -d subdir' <$<
	GREP -qFx 'printf "  %-16s %s\n" "MKDIR" "subdir/subsubdir"' <$<
	GREP -qFx '#install -d subdir/subsubdir' <$<
	# Extension of standard directory.
	GREP -qFx 'printf "  %-16s %s\n" "MKDIR" "/usr"' <$<
	GREP -qFx '#install -d /usr' <$<
	GREP -qFx 'printf "  %-16s %s\n" "MKDIR" "/usr/local"' <$<
	GREP -qFx '#install -d /usr/local' <$<
	GREP -qFx 'printf "  %-16s %s\n" "MKDIR" "/usr/local/lib"' <$<
	GREP -qFx '#install -d /usr/local/lib' <$<
	GREP -qFx 'printf "  %-16s %s\n" "MKDIR" "/usr/local/lib/extra"' <$<
	GREP -qFx '#install -d /usr/local/lib/extra' <$<
	# Custom shallow directory.
	GREP -qFx 'printf "  %-16s %s\n" "MKDIR" "/foo"' <$<
	GREP -qFx '#install -d /foo' <$<
	# Custom deep directory with implicit parent rules.
	GREP -qFx 'printf "  %-16s %s\n" "MKDIR" "/custom"' <$<
	GREP -qFx '#install -d /custom' <$<
	GREP -qFx 'printf "  %-16s %s\n" "MKDIR" "/custom/long"' <$<
	GREP -qFx '#install -d /custom/long' <$<
	GREP -qFx 'printf "  %-16s %s\n" "MKDIR" "/custom/long/path"' <$<
	GREP -qFx '#install -d /custom/long/path' <$<
	# Custom deep directory with explicit parent rules.
	GREP -qFx 'printf "  %-16s %s\n" "MKDIR" "/other"' <$<
	GREP -qFx '#install -d /other' <$<
	GREP -qFx 'printf "  %-16s %s\n" "MKDIR" "/other/custom"' <$<
	GREP -qFx '#install -d /other/custom' <$<
	GREP -qFx 'printf "  %-16s %s\n" "MKDIR" "/other/custom/path"' <$<
	GREP -qFx '#install -d /other/custom/path' <$<

debug-destdir: debug-destdir.log
	# Directory in the build tree - note lack of destdir
	GREP -qFx 'install -d subdir' <$<
	GREP -qFx 'install -d subdir/subsubdir' <$<
	# DESTDIR is created.
	GREP -qFx 'mkdir -p /destdir' <$<
	# Extension of standard directory.
	GREP -qFx 'install -d /destdir/usr/local/lib' <$<
	GREP -qFx 'install -d /destdir/usr/local/lib/extra' <$<
	# Custom shallow directory.
	GREP -qFx 'install -d /destdir/foo' <$<
	# Custom deep directory with implicit parent rules.
	GREP -qFx 'install -d /destdir/custom' <$<
	GREP -qFx 'install -d /destdir/custom/long' <$<
	GREP -qFx 'install -d /destdir/custom/long/path' <$<
	# Custom deep directory with explicit parent rules.
	GREP -qFx 'install -d /destdir/other' <$<
	GREP -qFx 'install -d /destdir/other/custom' <$<
	GREP -qFx 'install -d /destdir/other/custom/path' <$<