gnu make - In Makefile, How to verify if required Linux packages are installed -
gnu make - In Makefile, How to verify if required Linux packages are installed - the below code works in ptxdist makefile, know if there improve solution check if required packages installed before proceeding build? env_verification: @echo ------------start env verification--------------- if ! dpkg -s sudo | grep status | grep -q installed; \ echo error: sudo bundle not installed!; \ exit 1; \ fi if ! dpkg -s scons | grep status | grep -q installed; \ echo scons bundle not installed!; \ exit 1; \ fi @echo ------------end env verification--------------- i run below command in system, nice print same in create log, help improve above code , print below output (if bundle installed) log appreciated. in advance! $ dpkg-query -w -f='${package} ${status}\n' sudo sudo install ok installed you need check see if specific needed component of bundle exists on system. @ check if programme exists makefile different