Purpose: when the user enters “create packages”, he automatically searches for the libx11-dev package (necessary to compile my program) and, if not found, install it. Here is a stripped down version of my makefile:
PACKAGES = $(shell if [ -z $(dpkg -l | grep libx11-dev) ]; then sudo apt-get install libx11-dev; fi) [other definitions and targets] packages: $(PACKAGES)
When I type "make packages", I am prompted to enter the root password. If entered correctly, it then freezes indefinitely.
Am I trying to do what I am trying to do from a makefile? If so, how?
Many thanks.
source share