bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MKDIR_P invocations


From: Paul Eggert
Subject: Re: MKDIR_P invocations
Date: Mon, 20 Dec 2021 12:48:58 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1

On 12/20/21 01:08, Bruno Haible wrote:
@NMD@   $(MKDIR_P) '%reldir%' && \

Although that'd work, it might be a bit of a maintenance hassle.

How instead using a new macro $(AUTOMAKE_MKDIR_P) instead of $(MKDIR_P)? AUTOMAKE_MKDIR_P would default to $(MKDIR_P), but GNU Emacs could override this and set AUTOMAKE_MKDIR_P=':'. This would let us use ordinary Make and shell syntax rather than inventing a new one.

One related topic. Many Gnulib modules list makefile rules containing many instances of '&& \' at line ends. How about if we omit the '&& \' when that's easy? Something like the attached, but for all the modules not just this one. I noticed this when looking at the $(MKDIR_P) stuff. This would break apart 'make' recipes into smaller commands, which is a good thing. And it would let GNU make invoke rm, mkdir, sed, and mv directly instead of via a subshell, which would be a minor efficiency plus.

(I suppose we should also omit that 'rm -f $@-t $@'; it shouldn't be needed and it just slows things down on slow build hosts like some of those that I use.)

If we do the above, we should be able to add a sed command like this:

        /^      \$(AM_V_at)\$(AUTOMAKE_MKDIR_P) '\.'$/d

at the appropriate places in gnulib-tool, to omit the odd-looking 'mkdir -p .' calls from the makefiles and make logs.

Attachment: alloca-opt.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]