make install malfunctions when run with parallel threads
|Reported by:||nak||Owned by:||nobody|
I ran into a strange problem today, where munin-node-configure-snmp was failing to get installed.
The root cause was I had my gmake defaults set to run with a high degree of parallelism (-j6). This caused the install-node-snmp target to sometimes get run before the install-node-non-snmp
The problem with this is that the SBINDIR dir target is created in install-node-non-snmp,
and did not exist (yet) when install-node-snmp was executed. Adding a duplicate mkdir -p $(SBINDIR) line to install-node-snmp "fixed" the problem.
Another fix could be adding a ".NONPARALLEL:" to the Makefile to tell gmake to only run with
A third (and better) solution would be to have both install-node-snmp/non-snmp rules depend on a new rule that made the required directories; that way parallel makes would work properly.