Automatic generation of build dependencies