Skip to content

Commit 65fd76b

Browse files
committed
makeman: extend duplicate option warning to OPT_ options
In a local tree I accidentally had OPT_INIT_ALL defaulting to zero in userland and none in kernel. This resulted in the INIT_ALL text appearing twice in src.conf.5. Reviewed by: brooks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45184
1 parent f381173 commit 65fd76b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tools/build/options/makeman

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,12 +379,18 @@ EOF
379379
The following options accept a single value from a list of valid values.
380380
.Bl -tag -width indent
381381
EOF
382+
prev_opt=
382383
show_group_options |
383384
while read opt ; do
384385
if [ ! -f ${opt} ] ; then
385386
echo "no description found for ${opt}, skipping" >&2
386387
continue
387388
fi
389+
if [ $opt = "$prev_opt" ]; then
390+
echo "ignoring duplicate option $opt" >&2
391+
continue
392+
fi
393+
prev_opt=$opt
388394

389395
echo ".It Va ${opt}"
390396
cat ${opt}

0 commit comments

Comments
 (0)