From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id E01EC1381FE for ; Wed, 8 Aug 2012 23:47:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DA065E0771; Wed, 8 Aug 2012 23:46:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 9CF57E0771 for ; Wed, 8 Aug 2012 23:46:48 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id AED361B4026 for ; Wed, 8 Aug 2012 23:46:47 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id CE751E5440 for ; Wed, 8 Aug 2012 23:46:45 +0000 (UTC) From: "André Erdmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "André Erdmann" Message-ID: <1344469484.c8c9a4d515e6c350482139cc0311ab27c0507b9e.dywi@gentoo> Subject: [gentoo-commits] proj/R_overlay:master commit in: / X-VCS-Repository: proj/R_overlay X-VCS-Files: Makefile X-VCS-Directories: / X-VCS-Committer: dywi X-VCS-Committer-Name: André Erdmann X-VCS-Revision: c8c9a4d515e6c350482139cc0311ab27c0507b9e X-VCS-Branch: master Date: Wed, 8 Aug 2012 23:46:45 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 4970000c-3e49-4bf9-a002-2015181eaf89 X-Archives-Hash: 48487123bc0ea71b498187981fb52855 commit: c8c9a4d515e6c350482139cc0311ab27c0507b9e Author: André Erdmann mailerd de> AuthorDate: Wed Aug 8 23:44:44 2012 +0000 Commit: André Erdmann mailerd de> CommitDate: Wed Aug 8 23:44:44 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=c8c9a4d5 Makfile: install/uninstall targets --- Makefile | 49 ++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 42 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 2af9870..cf7f9c4 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,9 @@ # Some make targets for testing / distribution +# DESTDIR := +BINDIR := $(DESTDIR)/usr/local/bin +PYMOD_FILE_LIST := ./roverlay_files.list + MANIFEST := MANIFEST MANIFEST_TMP := $(MANIFEST).tmp @@ -12,8 +16,8 @@ LOGDIR := ./log ROVERLAY_MAIN := ./roverlay.py -PYVER := 2 -PY = python$(PYVER) +PYVER := +PYTHON := python$(PYVER) PYDOC_SH = ./do_pydoc.sh DOCDIR := ./doc @@ -24,24 +28,33 @@ SELFDOC := $(DOCDIR)/pydoc default \ clean-log clean distclean _pyclean _pydoc_clean \ run-test run-sync test \ - pydoc $(SELFDOC) $(DOCDIR) doc + pydoc $(SELFDOC) $(DOCDIR) doc \ + pyver \ + install install-all \ + install-roverlay install-pymodules \ + uninstall uninstall-all \ + uninstall-roverlay uninstall-pymodules default: @false +pyver: + @$(PYTHON) --version + clean-log: rm -rf -- $(LOGDIR) clean: - @true + rm -rf build/ _pyclean: find . -name "*.pyc" -or -name "*.pyo" -delete + _pydoc_clean: rm -f -- $(SELFDOC)/*.html ! test -d $(SELFDOC) || rmdir --ignore-fail-on-non-empty -- $(SELFDOC)/ -distclean: _pyclean _pydoc_clean +distclean: clean _pyclean _pydoc_clean # generates docs in $(DOCDIR)/ $(DOCDIR): $(SELFDOC) @@ -60,11 +73,11 @@ pydoc: $(SELFDOC) # sync all repos run-sync: $(ROVERLAY_MAIN) - $(PY) $(ROVERLAY_MAIN) sync + $(PYTHON) $(ROVERLAY_MAIN) sync # this is the 'default' test run command run-test: $(ROVERLAY_MAIN) - $(PY) $(ROVERLAY_MAIN) --nosync --stats -O /tmp/overlay + $(PYTHON) $(ROVERLAY_MAIN) --nosync --stats -O /tmp/overlay # sync and do a test run afterwards test: run-sync run-test @@ -80,3 +93,25 @@ $(MANIFEST): $(MANIFEST_TMP) release: $(MANIFEST) $(SETUP_PY) @test -d $(PKG_DISTDIR) || @mkdir -- $(PKG_DISTDIR) ./$(SETUP_PY) sdist --dist-dir=$(PKG_DISTDIR) --formats=bztar + + +install-roverlay: ./roverlay.py + install -T -D -- ./roverlay.py $(BINDIR)/roverlay + +install-pymodules: ./setup.py + $(PYTHON) ./setup.py install --record $(PYMOD_FILE_LIST) + +install-all: install + +install: install-pymodules install-roverlay + +uninstall-roverlay: + rm -vf -- $(BINDIR)/roverlay + +uninstall-pymodules: $(PYMOD_FILE_LIST) + xargs rm -vrf < $(PYMOD_FILE_LIST) + +uninstall-all: uninstall + +uinstall: + @false