From 40a99de6a1e59c40399a0732a1eebc7391da2d71 Mon Sep 17 00:00:00 2001 From: shnavid Date: Tue, 3 Jul 2007 14:27:51 +0000 Subject: * cleaned up Makefile git-svn-id: svn+ssh://svn.fedorahosted.org/svn/sos/trunk@170 ef72aa8b-4018-0410-8976-d6e080ef94d8 --- src/Makefile | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/Makefile b/src/Makefile index 94fb35bd..1de40c84 100644 --- a/src/Makefile +++ b/src/Makefile @@ -6,7 +6,6 @@ NAME = sos VERSION = $(shell grep -e 'version = ' setup.py |cut -d \' -f 2) REPO = https://sos.108.redhat.com/svn/sos SVNTAG = r$(subst .,-,$(VERSION)) -SVN_TAG_CONTENTS := $(shell svn list $(REPO)/tags/$(SVNTAG)/Makefile) all: @@ -14,14 +13,14 @@ all: .PHONY: tag-release tarball release install version clean tag-release: -ifeq ($(strip $(SVN_TAG_CONTENTS)), Makefile) - @echo "The repository already contains a tag for version $(VERSION)" - @exit 1 -else + @svn list $(REPO)/tags/$(SVNTAG)/Makefile > /dev/null && \ + ( \ + echo "The repository already contains a tag for version $(VERSION)"; \ + exit 1; \ + ) @svn copy $(REPO)/trunk/src $(REPO)/tags/$(SVNTAG) \ -m "Tagging the $(SVNTAG) release of the sos project" @echo "Tagged as $(SVNTAG)" -endif # if we don't compress them, rpmbuild does, and this breaks things manpages: sosreport.1 @@ -42,7 +41,11 @@ tarball: clean manpages @echo "The final archive is ./$(NAME)-$(VERSION).tar.bz2." release: clean manpages -ifeq ($(strip $(SVN_TAG_CONTENTS)), Makefile) + @svn list $(REPO)/tags/$(SVNTAG)/Makefile > /dev/null && \ + ( \ + @echo "There is no tag in the repository for this version, must be tagged before release"; \ + exit 1; \ + ) @echo "Creating an archive from tag $(SVNTAG)" @rm -rf /tmp/$(NAME) @svn export -q $(REPO)/tags/$(SVNTAG) /tmp/$(NAME) \ @@ -55,9 +58,6 @@ ifeq ($(strip $(SVN_TAG_CONTENTS)), Makefile) @rm -f /tmp/$(NAME)-$(VERSION).tar.bz2 @echo " " @echo "The final archive is ./$(NAME)-$(VERSION).tar.bz2." -else - @echo "There is no tag in the repository for this version, must be tagged before release" -endif install: python setup.py install -- cgit