_buildout_opt
endef
-buildout-net.cfg: buildout.cfg
- @$(buildout_opt) buildout.cfg add buildout download_cache $(DLCACHE)/downloads
- @$(buildout_opt) buildout.cfg add buildout extends-cache $(DLCACHE)/extends
- @$(buildout_opt) buildout.cfg set buildout install_from_cache true
- @$(buildout_opt) buildout.cfg set buildout newest true
+buildout-net.cfg buildout-nonet.cfg: buildout.cfg
mkdir -p $(DLCACHE)/downloads $(DLCACHE)/extends
- @( \
- echo "[buildout]"; \
- echo "extends = buildout.cfg"; \
- echo "install-from-cache = false"; \
- echo "newest = true"; \
+ @( \
+ echo "[buildout]"; \
+ echo "extends = buildout.cfg"; \
+ echo "download-cache = $(DLCACHE)/downloads"; \
+ echo "extends-cache = $(DLCACHE)/extends"; \
+ echo "install-from-cache = true"; \
+ echo "newest = false"; \
+ ) > buildout-nonet.cfg
+ @( \
+ echo "[buildout]"; \
+ echo "extends = buildout.cfg"; \
+ echo "download-cache = $(DLCACHE)/downloads"; \
+ echo "extends-cache = $(DLCACHE)/extends"; \
+ echo "install-from-cache = false"; \
+ echo "newest = true"; \
) > buildout-net.cfg
BUILDOUT_OPTS = -c buildout-net.cfg
-init-nonet: BUILDOUT_OPTS =
-update-nonet: BUILDOUT_OPTS =
+init-nonet: BUILDOUT_OPTS = -c buildout-nonet.cfg
+update-nonet: BUILDOUT_OPTS = -c buildout-nonet.cfg
bootstrap::
sed -i -e '1s/^#!.*\/python/#!$(subst /,\/,$(PYTHON))/' $(PYTHON_DIR)/bin/*
.gitignore::
@$(gitignore) "/buildout-net.cfg"
+ @$(gitignore) "/buildout-nonet.cfg"
+
#
# If the file exists in $(DLCACHE), it is retrieved from there instead.
define httpget
- _httpget() { \
- name="$${1##*/}"; \
- target="$$2"; \
- [ -n "$$target" ] || target="$$name"; \
- cache="$(DLCACHE)/$$name"; \
- if [ -r "$$cache" ]; then \
- echo "Fetching '$$name' from cache."; \
- else \
+ _httpget() { \
+ name="$${1##*/}"; \
+ target="$$2"; \
+ [ -n "$$target" ] || target="$$name"; \
+ cache="$(DLCACHE)/$$name"; \
+ if [ -r "$$cache" ]; then \
+ echo "Fetching '$$name' from cache."; \
+ else \
[ -z "$(HTTPGET_NONET)" ] || ( echo "Missing '$$1'."; exit 2 ); \
- echo "Downloading '$$1'."; \
- wget -O "$$cache" "$$1"; \
- fi; \
- cp "$$cache" "$$target"; \
- }; \
+ echo "Downloading '$$1'."; \
+ wget -O "$$cache" "$$1"; \
+ fi; \
+ cp "$$cache" "$$target"; \
+ }; \
_httpget
endef