]> arthur.barton.de Git - ansible-collection-boilerplate.git/commitdiff
Makefile.boilerplate: Don't touch pip when updating it, only on create
authorAlexander Barton <alex@barton.de>
Sat, 29 Jul 2023 17:20:32 +0000 (19:20 +0200)
committerAlexander Barton <alex@barton.de>
Sat, 29 Jul 2023 17:20:32 +0000 (19:20 +0200)
The upgrade set is potentially executed lather than other targets
depending on pip, so fiddling with its timestamps results in those
targets being rebuild over and over again.

And let touch(1) never create files!

Makefile.boilerplate

index 2342c2b235acd1964041116fae65a7efe0f90bb6..646b7ccd8c8506e34fe0c8e7c7b9a2b8d7214f17 100644 (file)
@@ -37,14 +37,14 @@ distclean-ansible:
 $(VENV_BIN)/ansible $(VENV_BIN)/ansible-galaxy $(VENV_BIN)/ansible-lint venv: $(SOURCE_ROOT)/requirements.txt $(VENV_BIN)/pip
 #      Install/upgrade Python package manager
        "$(VENV_BIN)"/pip install --upgrade pip wheel
-       touch "$(VENV_BIN)/pip" "$(VENV_BIN)/wheel"
 #      Install/upgrade Python dependencies ...
        "$(VENV_BIN)"/pip install --upgrade --requirement $(SOURCE_ROOT)/requirements.txt
-       touch "$(VENV_BIN)/ansible" "$(VENV_BIN)/ansible-galaxy" "$(VENV_BIN)/ansible-lint"
+       touch -c "$(VENV_BIN)/ansible" "$(VENV_BIN)/ansible-galaxy" "$(VENV_BIN)/ansible-lint"
 
 $(VENV_BIN)/pip:
 #      Create/upgrade Python "virtual environment"
        "$(PYTHON)" -m venv "$(SOURCE_ROOT)"/.venv
+       touch -c "$(VENV_BIN)/pip"
 
 .PHONY: venv