]> arthur.ath.cx Git - ansible-collection-boilerplate.git/blobdiff - Makefile.boilerplate
how-to-release.md: Fix "git push" command
[ansible-collection-boilerplate.git] / Makefile.boilerplate
index bac3491fc5eee553d9b037429ada7bc195a6e9eb..646b7ccd8c8506e34fe0c8e7c7b9a2b8d7214f17 100644 (file)
@@ -7,14 +7,9 @@ SOURCE_ROOT ?= $(CURDIR)
 VENV_D = $(SOURCE_ROOT)/.venv
 VENV_BIN = $(VENV_D)/bin
 
-this_makefile_path:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
-this_dir:=$(shell cd $(dir $(this_makefile_path));pwd)
-
 check-ansible: $(VENV_BIN)/ansible-lint
 #      Check Ansible executable ...
        "$(VENV_BIN)"/ansible --version
-#      Check YAML files ...
-       "$(VENV_BIN)"/yamllint .
 #      Run ansible-playbook syntax check, when a "site play" is found ...
 ifneq ("$(wildcard playbooks/site.yml)","")
        "$(VENV_BIN)"/ansible-playbook --syntax-check playbooks/site.yml
@@ -39,17 +34,17 @@ distclean-ansible:
          test -h "$$cmd" && rm -f "$$cmd" || true; \
         done
 
-$(VENV_BIN)/ansible $(VENV_BIN)/ansible-galaxy $(VENV_BIN)/ansible-lint venv: $(VENV_BIN)/pip
+$(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 $(this_dir)/requirements.txt
-       touch "$(VENV_BIN)/ansible" "$(VENV_BIN)/ansible-galaxy" "$(VENV_BIN)/ansible-lint"
+       "$(VENV_BIN)"/pip install --upgrade --requirement $(SOURCE_ROOT)/requirements.txt
+       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