2 # Ansible Boilerplate Collection: Makefile for the project itself.
5 DIST_D = $(CURDIR)/dist
9 # Include the "real" boilerplate Makefile into this "wrapper" Makefile:
10 include Makefile.boilerplate
18 distclean: clean distclean-ansible
19 # Remove distribution directory
22 maintainer-clean: distclean
24 dist: all $(VENV_BIN)/ansible-galaxy
25 # Create distribution archive ...
27 "$(VENV_BIN)"/ansible-galaxy collection build --force --output-path "$(DIST_D)"
30 # Run tests on distribution archive ...
31 mkdir -p "$(DIST_D)/check"
32 tar -C "$(DIST_D)/check" -xzf $$(find "$(DIST_D)" -name '*.tar.gz' | sort -Vr | head -n1)
33 test -e "$(VENV_D)" && ln -fs "$(VENV_D)" "$(DIST_D)/check/.venv"
34 make -C "$(DIST_D)/check" check
36 rm -fr "$(DIST_D)/check"
38 .PHONY: default all check install clean distclean maintainer-clean dist distcheck