In my case:
$ rm ./stmp-fixinc ; time make -j16
takes 17 seconds, where I can reduce it easily with the suggested
change. Then I get to 11.2 seconds.
The scripts searches ~2500 folders in my case with total 20K header
files.
Ready to be installed?
Thanks,
Martin
fixincludes/ChangeLog:
* fixinc.in: Use mkdir -p rather that a loop.
---
fixincludes/fixinc.in | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/fixincludes/fixinc.in b/fixincludes/fixinc.in
index de5a37f6acc..cdc0ca2e4c4 100755
--- a/fixincludes/fixinc.in
+++ b/fixincludes/fixinc.in
@@ -258,13 +258,9 @@ then echo "All directories (including links to
directories):"
echo $all_dirs
fi
-for file in $all_dirs; do
- rm -rf $LIB/$file
- if [ ! -d $LIB/$file ]
- then mkdir $LIB/$file
- fi
-done
-mkdir $LIB/root
+cd $LIB
+mkdir -p $all_dirs
+cd ..
# # # # # # # # # # # # # # # # # # # # #
#
--
2.35.1