4 # The master makefile sets up the follosing customizable (double-colon) targtets.
7 # This optional target may be used by the user to install the necessary
8 # system requirements via 'aptitude'. Must be called as root
11 # Called for basic setup. Executed before installing the basic eggs
14 # Called to install eggs
17 # Called to install the buildout (e.g. call paster create)
20 # Called after the buildout is installed but BEFORE bootstraping
23 # Called BEFORE updating the buildout (e.g. before calling bin/buildout)
26 # Called to bootstrap the buildout. Here you can add actions to be
27 # performed AFTER bootstraping the project whenever a bootstrap is performed
30 # Called to update the buildout (calls bin/buildout). Here you can add
31 # commands to call AFTER bin/buildout returns.
34 # Called to populate the .gitignore file. Use '@$(gitignore) <pattern>' to
38 # Called to add environment variables to be set when executing a shell
39 # Use @$(env) <var> <value> to add a variable settings. <var> may be
40 # PATH Add <value> to PATH
41 # PYTHONPATH Add <value> to PYTHONPATH
42 # <other> Set variable to <value>
45 # Called to clean up all generated files
48 ###########################################################################
55 ###########################################################################
56 # Customization targets
77 sed -i -e '1s/^#!.*\/python/#!$(subst /,\/,$(PYTHON))/' $(PYTHON_DIR)/bin/*
78 # $(PYTHON) bootstrap.py
79 $(PYTHON) -c 'from zc.buildout.buildout import main; main(["bootstrap"])'
82 bin/buildout $(BUILDOUT_OPTS)
86 [ -r .gitignore ] || touch .gitignore; \
87 grep -qxF "$$1" .gitignore || echo "$$1" >>.gitignore; \
92 @echo "Updating .gitignore"
94 @$(gitignore) "*.egg-info/"
99 [ -r .env ] || touch .env; \
101 PATH|PYTHONPATH) line="export $$1=\"$$2:\$$$$1\"" ;; \
102 *) line="export $$1=\"$$2\"" ;; \
104 grep -qxF "$$line" .env || echo "$$line" >>.env; \
109 @echo "Updating .env"
112 rm -f .gitignore .env
115 ###########################################################################
119 ###########################################################################
122 init: setup eggs buildout init-hook update-hook bootstrap update .gitignore .env
125 @echo "# Add the following lines to [versions] in buildout.cfg to pin all packages"
126 @bin/buildout -Novvvvv | sed -ne 's/^Picked: //p' | sort | uniq
129 @eval "`cat .env`"; $$SHELL
131 update-nonet: BUILDOUT_OPTS=-No