GNU bug report logs - #64743
Speed up GNU make's internal processing

Previous Next

Package: automake;

Reported by: Bruno Haible <bruno <at> clisp.org>

Date: Thu, 20 Jul 2023 14:09:02 UTC

Severity: normal

Done: Karl Berry <karl <at> freefriends.org>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Bruno Haible <bruno <at> clisp.org>
To: bug-automake <at> gnu.org
Cc: Paul Smith <psmith <at> gnu.org>
Subject: Speed up GNU make's internal processing
Date: Thu, 20 Jul 2023 16:07:53 +0200
[Message part 1 (text/plain, inline)]
Hi,

Paul Smith, the GNU make maintainer, gives this recommendation how
to disable built-in rules and thus speed up make's processing [1]:

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
My recommendation has been to disable the built-in rules directly, if
you don't need them.  For example you can use:

  .SUFFIXES:

to disable most of the built in rules (this is a POSIX standard
facility so it's helpful even for other versions of make).

Unfortunately that doesn't fix all problems because GNU Make also has a
few built-in rules that are defined using pattern rules (because suffix
rules are not powerful enough).  So a full list of "turn it all off"
would be this:

  .SUFFIXES:
  %:: %,v
  %:: RCS/%,v
  %:: RCS/%
  %:: s.%
  %:: SCCS/s.%
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

GNU Automake already emits the '.SUFFIXES:' line. To optimize things
for GNU make, it should also emit the remaining part.

It has no effect with non-GNU make [2].

The effect, for example in gettext's gettext-runtime/src directory, is
that
  - The output of "make -n -d" shrinks from 11028 lines to 4928 lines.
  - The number of 'stat()' calls made by "make -n" shrinks from 188 to 178.
    (make no longer tests whether various directories have an 'RCS' or 'SCCS'
    subdirectory.)

Patch is attached.

Bruno

[1] https://lists.gnu.org/archive/html/bug-make/2023-07/msg00063.html
[2] https://lists.gnu.org/archive/html/bug-make/2023-07/msg00067.html
[0001-Speed-up-GNU-make-s-internal-processing.patch (text/x-patch, attachment)]

This bug report was last modified 1 year and 305 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.