Commit d10f4e7
committed
Makefile: add/use foreach target
To not repeat shell's for loop for multiple targets, add "foreach"
target and use it.
It can also be used from the command line:
$ make foreach
Usage: make foreach CMD="commands to run for every package"
make: *** [Makefile:17: foreach] Error 1
$ make foreach CMD="gofmt -w ."
set -eu; \
for p in mountinfo mount sequential signal symlink user userns ; do \
(cd $p; gofmt -w .;) \
done
Signed-off-by: Kir Kolyshkin <[email protected]>1 parent 243daa2 commit d10f4e7
1 file changed
+17
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
17 | 21 | | |
18 | 22 | | |
19 | | - | |
| 23 | + | |
20 | 24 | | |
21 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
22 | 31 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 32 | + | |
| 33 | + | |
28 | 34 | | |
29 | 35 | | |
30 | 36 | | |
| |||
39 | 45 | | |
40 | 46 | | |
41 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
42 | 51 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | 52 | | |
50 | 53 | | |
51 | 54 | | |
| |||
0 commit comments