# <other> Set variable to <value>
#
# clean::
-# Called to clean up all generated files
+# Called to clean up all unimportant generated files. This includes all files
+# which may be recreated by calling 'init'
+#
+# shorthelp::
+# Called to provide an overview of important target (this is the default target)
+#
+# fullhelp::
+# Called to create the list of supplementary targets.
+#
+# varhelp::
+# Called to create the list of Makefile variables.
#
###########################################################################
name="$${1##*/}"; \
target="$$2"; \
[ -n "$$target" ] || target="$$name"; \
- cache="$(DLCACHE)/$$name"; \
+ cache="$(BASEDIR)/$(DLCACHE)/$$name"; \
if [ -r "$$cache" ]; then \
echo "Fetching '$$name' from cache."; \
else \
@echo
@echo "MAIN TARGETS"
@echo
- @echo " shorthelp"
+ @echo " shorthelp (default target)"
@echo " help"
- @echo " Summary of important / all user targets"
+ @echo " Summary of important targets / complete help."
@echo
@echo " debdepends"
@echo " Install debian packages via 'aptitude' needed to satisy build"
@echo " for the local buildout."
@echo
@echo " clean"
- @echo " Remove all unimportant (!) generated files. This target will leave"
- @echo " only those files which are to be checked into version control."
- @echo " calling 'make init' or 'make init-nonet' will rebuild the buildout."
+ @echo " Remove all unimportant (!) generated files (the remaining files are"
+ @echo " those which may be changed and should be managed as part of the"
+ @echo " project source-code). calling 'make init' or 'make init-nonet' will"
+ @echo " rebuild the development environment."
@echo
.PHONY: shorthelp
-help:: shorthelp
+fullhelp::
@echo
- @echo "SECONDARY TARGETS"
- @echo
- @echo " versions"
- @echo " Generate lines to be added to 'buildout.cfg' to pin all package"
- @echo " versions."
+ @echo "SUPPLEMENTARY TARGETS"
@echo
@echo " cleancache"
@echo " purge the download cache"
@echo " target purges the download cache to ensure, no obsolete files are"
@echo " left."
@echo
+.PHONY: fullhelp
+
+varhelp::
+ @echo
+ @echo "MAKEFILE VARIABLES"
+ @echo
+ @echo " DLCACHE ($(DLCACHE))"
+ @echo " Name of the download-cache subdirectory. This directory may be"
+ @echo " persisted e.g. by checking into version control (together with"
+ @echo " the source code or into as a separate repository or by saving into"
+ @echo " an archive. A persistent cache allows the setup to be completely"
+ @echo " reproducible and network independent."
+ @echo
+.PHONY: varhelp
debdepends::
.PHONY: debdepends
.PHONY: bootstrap
update:: update-hook
- bin/buildout $(BUILDOUT_OPTS)
.PHONY: update
define gitignore
endef
.gitignore::
@echo "Updating .gitignore."
- @$(gitignore) "*.pyc"
- @$(gitignore) "*.egg-info/"
@$(gitignore) "/.env"
define env
init-nonet: init
.PHONY: init-nonet
-versions:
- @echo "# Add the following lines to [versions] in buildout.cfg to pin all packages"
- @bin/buildout -vvvvv | sed -ne 's/^Picked: //p' | sort | uniq
-.PHONY: versions
-
shell:
@eval "`cat .env`"; $$SHELL
.PHONY: shell
upgrade: clean cleancache init
.PHONY: upgrade
+
+help:
+ @[ -n `which less` ] && $(MAKE) -s shorthelp fullhelp varhelp | less \
+ || $(MAKE) -s shorthelp fullhelp varhelp
+.PHONY: help
\ No newline at end of file