Skip to content

Commit 4c8637a

Browse files
committed
Update README
1 parent 8ca55cc commit 4c8637a

2 files changed

Lines changed: 18 additions & 32 deletions

File tree

.github/workflows/main.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,9 @@ jobs:
1717
run: |
1818
awk --version
1919
make --version
20-
make test
21-
make test AWK_FLAGS=--posix
22-
yes | make test AWK=mawk
23-
yes | make test AWK=nawk
24-
yes | make test AWK=wak
25-
yes | make test AWK=goawk
26-
make utest AWK=awk
27-
make utest AWK=mawk
28-
make utest AWK=nawk
29-
make utest AWK=wak
30-
make utest AWK=goawk
20+
make test utest
21+
make test utest AWK_FLAGS=--posix
22+
yes | make test utest AWK=mawk
23+
yes | make test utest AWK=nawk
24+
yes | make test utest AWK=wak
25+
yes | make test utest AWK=goawk

README.md

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22

33
[![CI](https://github.com/drdv/makefile-doc/actions/workflows/main.yml/badge.svg)](https://github.com/drdv/makefile-doc/actions/workflows/main.yml)
44

5-
The `makefile-doc.awk` script is a POSIX-compliant extension of a simple `awk` one-liner
6-
I have been using for years (it was based on [this
7-
gist](https://gist.github.com/prwhite/8168133)). I simply needed a bit more
8-
functionality and this turned out to be a nice small project with Awk.
9-
[This](https://drdv.github.io/blog/202511-makefile-doc) blog post shows an example of
10-
the documentation.
5+
The `makefile-doc.awk` script can be used to extract documentation from a Makefile. It
6+
is simply a more elaborate, POSIX-compliant, version of [this
7+
gist](https://gist.github.com/prwhite/8168133) one-liner. An example of the generated
8+
documentation can be seen [here](https://drdv.github.io/blog/202511-makefile-doc).
119

1210
## How to use
1311

@@ -43,9 +41,6 @@ help: ## show help
4341

4442
Manually download and place the `makefile-doc.awk` script on your `AWKPATH`.
4543

46-
It is assumed that `.RECIPEPREFIX` is a TAB, if this is not the case you should pass `-v
47-
RECIPEPREFIX=$(.RECIPEPREFIX)` to `awk`.
48-
4944
## Docs syntax
5045

5146
```Makefile
@@ -86,9 +81,6 @@ We refer to targets / variables as anchors (for docs/sections).
8681
targets are displayed with a `&` at the end, e.g., `t1 t2 t3&`. Double-colon grouped
8782
targets are handled as well.
8883

89-
+ Variable assignments can be prefixed with any or all of the special keywords `export`,
90-
`unexport`, `override`, or `private` (in the documentation they are stripped).
91-
9284
+ See `test/Makefile*` for examples.
9385

9486
**Note**: in general, using inline comments with variables is not a good idea because
@@ -208,14 +200,13 @@ without `#`). Foreground/background can be set using the tokens `FG/BG`. Unspeci
208200

209201
## Running the tests
210202

211-
Execute `make test` (this uses the system's default `awk`). To test with a custom
212-
`awk`, use (you need a standard build environment):
203+
Execute `make test utest` (this uses the system's default `awk`). To test with a custom
204+
`awk`, use:
213205

214-
+ `make test AWK=mawk`
215-
+ `make test AWK=nawk`
216-
+ `make test AWK=bawk` (binaries are not available for macos)
217-
+ `make test AWK=wak`
218-
+ `make test AWK=goawk`
206+
+ `make test utest AWK=mawk`
207+
+ `make test utest AWK=nawk`
208+
+ `make test utest AWK=bawk` (binaries are not available for macos)
209+
+ `make test utest AWK=wak`
210+
+ `make test utest AWK=goawk`
219211

220-
Note that the makefiles in `./test` are not meant to be used manually, they are part of
221-
the tests.
212+
You need a standard build environment.

0 commit comments

Comments
 (0)