fix(tools): various Makefile improvements

- sync output recursively for make calls
- add a script to get the number of cpus on mac and linux
- Makefile formatting
- update serialize_targets.sh to invoke the proper make binary
- Add instructions to install make
This commit is contained in:
Arthur Meyre
2021-08-25 18:24:24 +02:00
parent 1b489b281c
commit 3541e4ff4e
4 changed files with 47 additions and 7 deletions

7
script/make_utils/ncpus.sh Executable file
View File

@@ -0,0 +1,7 @@
#!/bin/bash
if [[ `uname` == "Darwin" ]]; then
sysctl -n hw.logicalcpu
else
nproc
fi

View File

@@ -4,8 +4,12 @@ set +e
EXIT_CODE=0
# Get the make executable
MAKE="$1"
shift
for make_target in "$@"; do
make --no-print-directory "${make_target}"
"${MAKE}" --no-print-directory "${make_target}"
if [[ "$?" != "0" ]]; then
EXIT_CODE=1
fi