From ca7102de3a75666b2e6213872d6a637dce7979e4 Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: May 28 2008 16:09:51 +0000 Subject: - add targets for an 'archive' target --- diff --git a/Makefile.am b/Makefile.am index d7dea7e..4263db2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,27 +5,27 @@ CONFIGURE_DEPENDENCIES = $(top_srcdir)/oddjob.spec VERSION=$(shell rpm -q --specfile $(top_srcdir)/oddjob.spec --define 'dist %{nil}' --qf '%{version}\n' | head -n1) RELEASE=$(shell rpm -q --specfile $(top_srcdir)/oddjob.spec --define 'dist %{nil}' --qf '%{release}\n' | head -n1) -CVSTAG=oddjob-$(shell echo $(VERSION) | tr . _)-$(shell echo $(RELEASE) | tr . _) +TAG=oddjob-$(shell echo $(VERSION))-$(shell echo $(RELEASE)) distdir=$(PACKAGE)-$(VERSION)-$(RELEASE) compare_versions: test $(VERSION) = `cat autoversion` tag: compare_versions - cvs tag -c $(CVSTAG) + git tag $(TAG) force-tag: compare_versions - cvs tag -cF $(CVSTAG) + git tag -f $(TAG) -CVSROOT=$(shell test -d CVS && cat CVS/Root) -REPOSITORY=$(shell test -d CVS && cat CVS/Repository) +REPOSITORY=$(shell git config remote.origin.url 2> /dev/null || /bin/pwd) ARCHIVEOUTDIR=$(shell cd $(top_srcdir) && pwd) archive: tmpdir=`mktemp -d /tmp/make_archive_XXXXXX`;\ if test -d "$$tmpdir" ; then \ cd $$tmpdir;\ - cvs -d $(CVSROOT) co -d $(distdir) -r $(CVSTAG) $(REPOSITORY);\ - cd $(distdir);\ + git clone $(REPOSITORY);\ + cd $$tmpdir/$$PACKAGE;\ + git checkout $(TAG);\ ./autogen;\ make dist;\ mkdir -p $$tmpdir/rpm-build-top;\