]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
include: Use printf(1) instead of shell loops for header symlinks
authorAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Wed, 6 Jan 2021 17:46:36 +0000 (17:46 +0000)
committerAlex Richardson <arichardson@FreeBSD.org>
Thu, 7 Jan 2021 09:26:22 +0000 (09:26 +0000)
commit7b0d3a3ccf8d2ea3b7c8338bdf4aa588222f6adc
tree6722705fcc7652fe453201cb14c89ca6220329ff
parent0cace0bb0ae0158d8a770a88570fa93d47ffc980
include: Use printf(1) instead of shell loops for header symlinks

Using a shell for loop means we have to spawn a separate install(1)
process for each header that is symlinked. This patch uses printf(1) to
generate an argument list that has been prefixed with the correct number
of ../ and then uses a single install(1) invocation.

This reduces the number of execve() calls during make includes from 2442
(with D27622) to 1382. Running `make symlinks` in include/ now spawns 214
processes instead of 1276 without this patch.

Reviewed By: jhb
Differential Revision: https://reviews.freebsd.org/D27723
include/Makefile