File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ are given in `{...}`, `(.)` shows the default)
9494
9595+ `OUTPUT_FORMAT` : `{(ANSI), HTML, LATEX}`
9696+ `EXPORT_THEME` : see [Export to HTML and Latex](# export-to-html-and-latex)
97- + `SUB` : see [Substitutions](# substitutions)
97+ + `SUB`, `DSUB` : see [Substitutions](# substitutions)
9898+ `TARGETS_REGEX` : regex to use for matching targets
9999+ `VARIABLES_REGEX` : regex to use for matching variables
100100* `VARS` : `{0, (1)}` show documented variables
@@ -165,6 +165,19 @@ shown. The supported parameters are:
165165See the `Makefile` of this project and the test recipes in
166166`test/recipes/test-substitution-*` for examples.
167167
168+ The option `DSUB` performs substitutions in the original descriptions. The expected
169+ format is `NAME:VALUES`. For example, using `-v DSUB='$$(DEPS):$(DEPS)'`, the target
170+
171+ ```Makefile
172+ DEPS := x y
173+ ## Prerequisites: $(DEPS)
174+ t: $(DEPS)
175+ ````
176+ would be documented as:
177+ ````
178+ t Prerequisites: x y
179+ ````
180+
168181## Export to HTML and Latex
169182
170183We use
Original file line number Diff line number Diff line change 55# Author: Dimitar Dimitrov
66# License: Apache-2.0
77# Project: https://github.com/drdv/makefile-doc
8- # Version: v1.5
8+ # Version: v1.6
99#
1010# Usage (see project README.md for more details):
1111# awk [-v option=value] -f makefile-doc.awk [Makefile ...]
2424# + OUTPUT_FORMAT: {(ANSI), HTML, LATEX}
2525# + EXPORT_THEME: see below
2626# + SUB: see below
27+ # + DSUB: see below
2728# + TARGETS_REGEX: regex for matching targets
2829# + VARIABLES_REGEX: regex for matching variables
2930# * VARS: {0, (1)} show documented variables
7778# + I initial string, e.g., {
7879# + T termination string, e.g., }
7980#
81+ # DSUB:
82+ # Similar to SUB but performs substitutions in the original descriptions. The expected
83+ # format is NAME:VALUES. For example, using -v DSUB='$$(DEPS):$(DEPS)', the target
84+ #
85+ # DEPS := x y
86+ # ## Prerequisites: $(DEPS)
87+ # t: $(DEPS)
88+ #
89+ # would be documented as: t Prerequisites: x y
90+ #
91+ # Values containing newline chatacters are not supported.
92+ #
8093# Code conventions:
8194# * All local variables in functions should be defined in the function signature (awk
8295# is a bit special in that respect).
You can’t perform that action at this time.
0 commit comments