Hi Jan, On Tue, Apr 20, 2021 at 11:54:41AM +0200, Jan Engelhardt wrote: > > On Tuesday 2021-04-20 06:23, Duncan Roe wrote: > >-AS_IF([test "x$with_doxygen" = xyes], [ > >+ [create doxygen documentation])], > >+ [with_doxygen="$withval"], [with_doxygen=yes]) > >+ > >+AS_IF([test "x$with_doxygen" != xno], [ > > AC_CHECK_PROGS([DOXYGEN], [doxygen]) > > AC_CHECK_PROGS([DOT], [dot], [""]) > > AS_IF([test "x$DOT" != "x"], > >@@ -48,6 +49,10 @@ AS_IF([test "x$with_doxygen" = xyes], [ > > ]) > > > > AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"]) > >+if test -z "$DOXYGEN"; then > > If you use AS_IF above, you could also make use of it here :) Happy to do that, but could you spell out the actual line please? My grasp of m4 is tenuous at best - I only copy stuff that I see working elsewhere. In this case I copied Florian Westphal's code from 3622e606. > > >+# move it out of the way and symlink the real one while we run doxygen. > >+ cd ..; [ $$(ls src | wc -l) -gt 8 ] ||\ > > This looks like it could break anytime (say, when it happens to get to 9 > files). Can't it test for a specific filename or set of names? OK I can test for existence of Makefile.in. > > >+ function main { set -e; cd man/man3; rm -f _*;\ > > The syntax for POSIX sh-compatible functions should be > > main() { ... Rats! I had it that way, but the old fixmanpages.sh had 'function' so I changed it to minimise the diff. Will change back to POSIX way in v2. > > >+function setgroup { mv $$1.3 $$2.3; BASE=$$2; };\ > >+function add2group { for i in $$@; do ln -sf $$BASE.3 $$i.3; done; };\ > > Should be quoted, i.e. "$$@". Might as well do it for the other vars. "Should be"? We're dealing with man page names. If unquoted $$@ fails, we've got other problems. Or is it a style thing? Do you want I should quote $$BASE, $$1 & $$2 as well?