Move generic buildout stuff into Makefile.buildout
Stefan Bund [Sat, 24 Jul 2010 09:38:46 +0000 (11:38 +0200)]
Makefile.buildout [new file with mode: 0644]
Makefile.master
Makefile.zope3-buildout
skel-zope3/Makefile

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"
index 22ff4b6..bbd6344 100644 (file)
@@ -160,8 +160,6 @@ update-hook::
 .PHONY: update-hook
 
 bootstrap::
-       sed -i -e '1s/^#!.*\/python/#!$(subst /,\/,$(PYTHON))/' $(PYTHON_DIR)/bin/*
-       $(PYTHON) -c 'from zc.buildout.buildout import main; main(["bootstrap"])'
 .PHONY: bootstrap
 
 update:: update-hook
@@ -180,7 +178,6 @@ endef
        @$(gitignore) "*.pyc"
        @$(gitignore) "*.egg-info/"
        @$(gitignore) "/.env"
-       @$(gitignore) "/.nonet.cfg"
 
 define env
     _env () {                                                  \
index 6bb86c8..510ff66 100644 (file)
@@ -16,21 +16,6 @@ buildout.cfg:
        ) || ( rm -rf temp-project; false )
        @echo
        @(rm -rf $(BASEDIR)/temp-project)
-       @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'       \
-                buildout.cfg || ( rm -f buildout.cfg; false )
-       @mkdir -p $(DLCACHE)/downloads $(DLCACHE)/extends || ( rm -f buildout.cfg; false )
-
-buildout-net.cfg:
-       @(                                      \
-           echo "[buildout]";                  \
-           echo "extends = buildout.cfg";      \
-           echo "install-from-cache = false";  \
-           echo "newest = true";               \
-       ) >  buildout-net.cfg
-
 
 ###########################################################################
 
@@ -57,18 +42,14 @@ bootstrap::
 .gitignore::
        @$(gitignore) "/bin/"
        @$(gitignore) "/develop-eggs/"
-       @$(gitignore) "/downloads/"
+       @$(gitignore) "/$(EGGDIR)/"
        @$(gitignore) "/log/"
        @$(gitignore) "/var/"
+       @$(gitignore) "/parts/"
        @$(gitignore) "/.installed.cfg"
 
 .env::
        @$(env) PATH $(BASEDIR)/bin
 
 clean::
-       rm -rf log var develop-eggs parts
-
-BUILDOUT_OPTS = -c buildout-net.cfg
-
-init-nonet: BUILDOUT_OPTS =
-update-nonet: BUILDOUT_OPTS =
+       rm -rf bin $(EGGDIR) log var develop-eggs parts .installed.cfg
index f718315..50b11d8 100644 (file)
@@ -9,4 +9,5 @@ MAKELIB := $(shell for lib in plone-skeleton . ..; do [ ! -r "$$lib"/Makefile.ma
 include $(MAKELIB)/Makefile.master
 include $(MAKELIB)/Makefile.pybase
 include $(MAKELIB)/Makefile.pil
+include $(MAKELIB)/Makefile.buildout
 include $(MAKELIB)/Makefile.zope3-buildout