From b88672481836083d67d1cbaabd0e5bd491f701dd Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Mon, 12 Jun 2006 22:49:37 +0000 Subject: [PATCH] (check-options): New goal --- doc/Makefile.am | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/doc/Makefile.am b/doc/Makefile.am index 43acec7..4c8d448 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -45,6 +45,26 @@ header.texi: $(top_srcdir)/src/tar.h master-menu: $(tar_TEXINFOS) emacs -batch -l mastermenu.el -f make-master-menu $(info_TEXINFOS) +check-options: + @ARGP_HELP_FMT='usage-indent=0,short-opt-col=0,long-opt-col=0,\ +doc-opt-col=0,opt-doc-col=0,header-col=0,rmargin=1' \ + $(top_builddir)/src/tar --usage | \ + sed -n 's/^\[--\([^]\=\[]*\).*/\1/p' | sort | uniq > opts.$$$$;\ + sed -n 's/@opindex *\([^,]*\)$$/\1/p;s/@opindex *\(.*\),.*/\1/p' \ + $(info_TEXINFOS) | sort | uniq > docs.$$$$;\ + (echo 'Not documented options:';\ + join -v1 opts.$$$$ docs.$$$$;\ + echo 'Non-existing options:';\ + join -v2 opts.$$$$ docs.$$$$) > report.$$$$;\ + rm opts.$$$$ docs.$$$$;\ + if [ -n "`sed '1,2d' report.$$$$`" ]; then \ + cat report.$$$$;\ + rm report.$$$$;\ + exit 1;\ + fi;\ + rm report.$$$$ + + clean-local: rm -rf manual -- 2.44.0