Move generic buildout stuff into Makefile.buildout
[zope-bootstrap.git] / Makefile.buildout
diff --git a/Makefile.buildout b/Makefile.buildout
new file mode 100644 (file)
index 0000000..3728542
--- /dev/null
@@ -0,0 +1,28 @@
+# -*- makefile -*-
+
+buildout-net.cfg: buildout.cfg
+       @sed -i -e '/\[buildout\]/ba' -eb -e:a                  \
+           -ea\\ -e 'download-cache = $(DLCACHE)/downloads'    \
+           -ea\\ -e 'install-from-cache = true'                \
+           -ea\\ -e 'extends-cache = $(DLCACHE)/extends'       \
+           -ea\\ -e 'newest = false'                           \
+                buildout.cfg || ( rm -f buildout.cfg; false )
+       @mkdir -p $(DLCACHE)/downloads $(DLCACHE)/extends || ( rm -f buildout.cfg; false )
+       @(                                      \
+           echo "[buildout]";                  \
+           echo "extends = buildout.cfg";      \
+           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 =
+
+bootstrap::
+       sed -i -e '1s/^#!.*\/python/#!$(subst /,\/,$(PYTHON))/' $(PYTHON_DIR)/bin/*
+       $(PYTHON) -c 'from zc.buildout.buildout import main; main(["bootstrap"])'
+
+.gitignore::
+       @$(gitignore) "/buildout-net.cfg"