Keith Marshall <[email protected]> wrote:
|On 14/03/14 20:04, Peter Schaffter wrote:
|> Can't imagine a situation where 'make dist' would want to exclude
|> documentation. Assume nothing. :)
|
|Since the intended purpose of "make dist" is to create distribution
|tarballs, such as those published on FSF mirrors, it really wouldn't be
|appropriate for it to do anything other than fail, if any distributable
|component is missing; IMO, "--without-doc" should not apply to the "make
|dist" goal.
I also think having a check here and there is not a bad thing.
I'll add it for my patch.
|> For consistency with other configure options,
|>
|> --with-doc[=ARG] [ARG=yes]
|> --without-doc (same as --with-doc=no)
|>
|> is probably best.
|
|If it's implemented using autoconf's AC_ARG_WITH macro, (as it should
|be), that would be automatic.
In fact it seems that AC_ARG_WITH doesn't allow to define an
enumeration of allowed arguments, so that this is implied as well
as anything else!
AC_DEFUN([GROFF_DOC_CHECK],
[AC_ARG_WITH([doc],
[AS_HELP_STRING([--with-doc[[=TYPE]]],
[choose which manuals (beside man pages) are desirable. \
Give TYPE as a comma-separated list of one or multiple of \
`info', `pdf' and `html' to restrict what is produced])],
[DOCADD=$withval],
[DOCADD=yes])
test "$DOCADD" = "no" && DOCADD=''
if test "$DOCADD" = yes; then
docadd_info=yes docadd_pdf=yes docadd_html=yes
else
# Don't use case/esac, verify input
docadd_info= docadd_pdf= docadd_html=
OFS=${IFS}
IFS=','
set -- ${DOCADD}
IFS=${OFS}
for i
do
test "${i}" = info && { docadd_info=yes; continue; }
test "${i}" = pdf && { docadd_pdf=yes; continue; }
test "${i}" = html && { docadd_html=yes; continue; }
AC_MSG_WARN([Invalid --with-doc argument:] ${i})
done
fi])
--steffen