@cryptotaxi247 / netdata-1 / commits / d6e8972e2

Update handling of builds of bundled dependencies. (#11375)

This adds parallelization of the builds of the bundled dependencies (this provides a few percent build time reduction on slower systems), and switches them all to use the same version of `make` that Netdata will be built with (this changes nothing on most systems, but means that we will now uniformly use gmake on BSD systems).

Austin S. Hemmelgarn committed Jul 29, 2021 at 07:13 UTC d6e8972e217d353960d36b039fc54c3ae7dcc42c
1 file changed +6 -6
netdata-installer.sh
+6 -6
@@ -544,7 +544,7 @@ build_libmosquitto() {
544 fi
545
546 if [ "$(uname -s)" = Linux ]; then
547 - run ${env_cmd} make -C "${1}/lib"
547 + run ${env_cmd} ${make} -j$(find_processors) -C "${1}/lib"
548 else
549 pushd ${1} > /dev/null || return 1
550 if [ "$(uname)" = "Darwin" ] && [ -d /usr/local/opt/openssl ]; then
@@ -556,7 +556,7 @@ build_libmosquitto() {
556 else
557 run ${env_cmd} cmake -D WITH_STATIC_LIBRARIES:boolean=YES .
558 fi
559 - run ${env_cmd} make -C lib
559 + run ${env_cmd} ${make} -j$(find_processors) -C lib
560 run mv lib/libmosquitto_static.a lib/libmosquitto.a
561 popd || return 1
562 fi
@@ -660,7 +660,7 @@ EOF
660 $CMAKE_FLAGS \
661 .
662 fi
663 - run ${env_cmd} make -j$(find_processors)
663 + run ${env_cmd} ${make} -j$(find_processors)
664 popd > /dev/null || exit 1
665 }
666
@@ -744,7 +744,7 @@ build_judy() {
744 run ${env_cmd} automake --add-missing --force --copy --include-deps &&
745 run ${env_cmd} autoconf &&
746 run ${env_cmd} ./configure &&
747 - run ${env_cmd} make -C src &&
747 + run ${env_cmd} ${make} -j$(find_processors) -C src &&
748 run ${env_cmd} ar -r src/libJudy.a src/Judy*/*.o; then
749 popd > /dev/null || return 1
750 else
@@ -822,7 +822,7 @@ build_jsonc() {
822
823 pushd "${1}" > /dev/null || exit 1
824 run ${env_cmd} cmake -DBUILD_SHARED_LIBS=OFF .
825 - run ${env_cmd} make
825 + run ${env_cmd} ${make} -j$(find_processors)
826 popd > /dev/null || exit 1
827 }
828
@@ -888,7 +888,7 @@ bundle_jsonc
888
889 build_libbpf() {
890 pushd "${1}/src" > /dev/null || exit 1
891 - run env CFLAGS=-fPIC CXXFLAGS= LDFLAGS= BUILD_STATIC_ONLY=y OBJDIR=build DESTDIR=.. make install
891 + run env CFLAGS=-fPIC CXXFLAGS= LDFLAGS= BUILD_STATIC_ONLY=y OBJDIR=build DESTDIR=.. ${make} -j$(find_processors) install
892 popd > /dev/null || exit 1
893 }
894