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 ways of doing that. distributions may have specific tools available, since constitutes 'package' varies distro distro, know of no generic test of 'package'.

linux gnu-make

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -