From: Stefan Bund Date: Sat, 24 Jul 2010 09:38:46 +0000 (+0200) Subject: Move generic buildout stuff into Makefile.buildout X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=8d849ae243898419a1e70067ea90b10f82014db3;p=zope-bootstrap.git Move generic buildout stuff into Makefile.buildout --- diff --git a/Makefile.buildout b/Makefile.buildout new file mode 100644 index 0000000..3728542 --- /dev/null +++ b/Makefile.buildout @@ -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" diff --git a/Makefile.master b/Makefile.master index 22ff4b6..bbd6344 100644 --- a/Makefile.master +++ b/Makefile.master @@ -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 () { \ diff --git a/Makefile.zope3-buildout b/Makefile.zope3-buildout index 6bb86c8..510ff66 100644 --- a/Makefile.zope3-buildout +++ b/Makefile.zope3-buildout @@ -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 diff --git a/skel-zope3/Makefile b/skel-zope3/Makefile index f718315..50b11d8 100644 --- a/skel-zope3/Makefile +++ b/skel-zope3/Makefile @@ -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