From e2f5d34e427707eac3d5fbe7e20cb177c09be77e Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Mon, 6 Dec 2021 21:04:50 +0100 Subject: [PATCH] Simplify autogen.sh. This script is expected to perform only the autoconf specific setup, but not run configure, make or the test suite, so remove everything which is not related to autoconf. People who prefer to run everything in one go can easily do so by writing their own script, for example autogen-local.sh. Add a line to .gitignore which ignores files matching *-local* to prevent such files from showing up in git status. --- .gitignore | 1 + autogen.sh | 22 +--------------------- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/.gitignore b/.gitignore index bd5e0480..8f8d0af7 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ confdefs.h conftest conftest.c git-version.h +*-local* diff --git a/autogen.sh b/autogen.sh index caf1401d..cbfea7fd 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,28 +1,8 @@ #!/bin/sh -# check if we have multiple processors/cores -n=$(nproc 2>/dev/null) -if [ -z "$n" ]; then - n=$(grep ^processor /proc/cpuinfo 2>/dev/null | wc -l) - [ $n -eq 0 ] && n=1 -fi -# If we are compiling with distcc, try to guess a reasonable number -# based on (a) the number of cores on this machine and (b) the number -# of words in the DISTCC_HOSTS variable. -d="$(echo $DISTCC_HOSTS | wc -w)" -n=$(($n + 2 * $n * $d)) -echo preparing, parallel=$n... -if test -f Makefile; then - make maintainer-clean > /dev/null 2>&1 -fi autom4te \ --language=autoconf \ --output=configure \ --no-cache \ --warnings=all \ - configure.ac + configure.ac && autoheader -echo configuring... -./configure $@ > /dev/null -echo compiling... -make clean > /dev/null 2>&1 -make -j $n > /dev/null && make check -- 2.39.5