Is there a way to check the absence of dependencies that arise when compiling a project with several tasks (-jN where N> 1)?
I often come across packages, mostly open source, where the build process works fine while I use -j1 or -jN, where N is a relatively low value, like 4 or 8, but if I used higher values, like 48, a little unusual, he begins to fail due to lack of dependencies.
I tried to create a bash script for myself, which, taking into account the goal, calculated all the dependencies and tried to explicitly build each of these dependencies with -j1, to verify that none of them contain dependencies on their own. It looks like it works with a small / medium package, but does not fit more importantly, for example, uClibc.
I am sharing my script here, as some people can understand what I mean by reading the code. I also hope that a more reliable solution exists and can be transferred back.
#!/bin/bash TARGETS=$* echo "TARGETS=$TARGETS" for target in $TARGETS do MAKE="make" RULE=`make -j1 -n -p | grep "^$target:"` if [ -z "$RULE" ]; then continue fi NEWTARGETS=${RULE#* } if [ -z "$NEWTARGETS" ]; then continue fi if [ "${NEWTARGETS}" = "${RULE}" ]; then
source share