bug-automake
[Top][All Lists]
Advanced

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

bug#64743: Speed up GNU make's internal processing


From: Bruno Haible
Subject: bug#64743: Speed up GNU make's internal processing
Date: Thu, 20 Jul 2023 16:07:53 +0200

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

Attachment: 0001-Speed-up-GNU-make-s-internal-processing.patch
Description: Text Data


reply via email to

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