[PATCH 1/2] Create archives in one Makefile target and reuse it
Vratislav Podzimek
vpodzime at redhat.com
Tue Nov 19 07:47:43 UTC 2013
Both 'make local' and 'make archive' should produce the same tarball they
differ only in commit tagging.
Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
Makefile | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/Makefile b/Makefile
index 93d5b81..208e68b 100644
--- a/Makefile
+++ b/Makefile
@@ -38,7 +38,9 @@ tag:
git tag -a -m "Tag as $(TAG)" -f $(TAG)
@echo "Tagged as $(TAG)"
-archive: tag po-pull
+archive: local tag
+
+local: po-pull
@rm -f ChangeLog
@make ChangeLog
git archive --format=tar --prefix=$(PKGNAME)-$(VERSION)/ $(TAG) > $(PKGNAME)-$(VERSION).tar
@@ -50,17 +52,6 @@ archive: tag po-pull
rm -rf $(PKGNAME)-$(VERSION)
@echo "The archive is in $(PKGNAME)-$(VERSION).tar.gz"
-local: po-pull
- @rm -f ChangeLog
- @make ChangeLog
- @rm -rf $(PKGNAME)-$(VERSION).tar.gz
- @rm -rf /tmp/$(PKGNAME)-$(VERSION) /tmp/$(PKGNAME)
- @dir=$$PWD; cp -a $$dir /tmp/$(PKGNAME)-$(VERSION)
- @cd /tmp/$(PKGNAME)-$(VERSION) ; python setup.py -q sdist
- @cp /tmp/$(PKGNAME)-$(VERSION)/dist/$(PKGNAME)-$(VERSION).tar.gz .
- @rm -rf /tmp/$(PKGNAME)-$(VERSION)
- @echo "The archive is in $(PKGNAME)-$(VERSION).tar.gz"
-
rpmlog:
@git log --pretty="format:- %s (%ae)" $(TAG).. |sed -e 's/@.*)/)/'
@echo
--
1.8.4.2
More information about the anaconda-patches
mailing list