On 12/19/21 02:35, Bruno Haible wrote:
It would be possible to replace, in the module descriptions:

        $(MKDIR_P) '%reldir%' && \

with

        { test '%reldir%' = '.' || $(MKDIR_P) '%reldir%'; } && \

It's a micro-optimization. A trade-off between execution speed and
readability.

It's more than just the optimization. Emacs is already doing those mkdirs in a different way in configure.ac:

if $gl_gnulib_enabled_dynarray || $gl_gnulib_enabled_scratch_buffer; then
  AS_MKDIR_P([lib/malloc])
  if test $AUTO_DEPEND = yes; then
    AS_MKDIR_P([lib/deps/malloc])
  fi
fi

None of the Gnulib-generated mkdirs are needed, and the Gnulib-generated mkdirs don't generate lib/deps/malloc like they should. From the Emacs point of view it'd be better if the rules didn't do any mkdirs, either of '.' or of 'malloc'.

How about if we do these mkdirs at configure-time, instead of at build-time, like Emacs is already doing? (And do the deps directory too.) Then we could remove the abovementioned code from Emacs configure.ac, since Gnulib would already be doing it at configure-time.

Reply via email to