You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: recipes/make/help.md
+15-12
Original file line number
Diff line number
Diff line change
@@ -8,32 +8,36 @@ The focus here is on the `help` target and some other targets are covered so you
8
8
9
9
### Basic
10
10
11
-
My own.
11
+
Find lines starting with lowercase letters or comments. This excludes `.HOOKS` and any constants (typicall set using uppercase). This excludes empty lines, so the output is tightly packed.
12
12
13
13
-`Makefile`
14
14
```mk
15
-
# Show summary of make targets.
16
15
help:
17
-
@echo 'Print lines that are not indented (targets and comments) or empty.'
18
-
@egrep '^\S|^$$' Makefile
16
+
@grep ^[a-z#]' Makefile
19
17
```
20
18
21
-
### Extended
19
+
### Not indented
22
20
23
-
If you use `@echo` within your targets:
21
+
Print lines that are not indented (targets and comments) or empty (so that empty lines add space between commands).
24
22
25
-
My own.
23
+
-`Makefile`
24
+
```mk
25
+
help:
26
+
@egrep '^\S|^$$' Makefile
27
+
```
28
+
29
+
### Include echo lines
30
+
31
+
If you use `@echo` within your targets, you can incldue them.
32
+
33
+
Includes left-aligned, empty lines and echo lines.
26
34
27
35
-`Makefile`
28
36
```mk
29
-
# Show summary of make targets.
30
37
help:
31
-
@echo 'Print lines that are not indented (targets and comments) or empty, plus any indented echo lines.'
32
38
@egrep '(^\S)|(^$$)|\s+@echo' Makefile
33
39
```
34
40
35
-
Alt echo: `@echo "Include left-aligned, empty lines and echo lines."`
36
-
37
41
### Detailed
38
42
39
43
Copied from Poetry's [Makefile](https://github.com/python-poetry/poetry/blob/master/Makefile).
@@ -42,7 +46,6 @@ This is complex - I don't know why. I haven't tested yet but maybe something her
0 commit comments