matyama / configs

Configuration and scripts for Ubuntu desktop
MIT License
2 stars 0 forks source link

Fix detection that python3.6 or python3.7 is already installed #9

Closed matyama closed 3 years ago

matyama commented 3 years ago
python3.6 python3.7: python
ifneq ($(shell which $@ 2> /dev/null),)
        @echo ">>> $$($@ --version) already installed"
else
        @echo ">>> Installing $@"
        sudo add-apt-repository -y ppa:deadsnakes/ppa      
        sudo apt update
        sudo apt install -y $@-dev $@-venv
endif

The issue is that $@ is not resolved at the time ifneq is evaluated and thus the rule always proceeds with an installation.

matyama commented 3 years ago

Fixed in c6837c682194dc0f1b46452f964f40e078336d41 by removing the installation check.