From ed8f127a0ef2efb9d0746efdcf41f8b0fc5c6d29 Mon Sep 17 00:00:00 2001 From: Fredrik Thulin Date: Wed, 19 Jan 2011 10:39:31 +0100 Subject: [PATCH] release: Make work with build dir != src dir. --- Makefile.am | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Makefile.am b/Makefile.am index 20d807d..8b49c86 100644 --- a/Makefile.am +++ b/Makefile.am @@ -79,11 +79,14 @@ EXTRA_DIST += contrib/README contrib/programming.sh PROJECT = yubikey-personalization ChangeLog: - git2cl > ChangeLog + cd $(srcdir) && git2cl > ChangeLog check-doc-dist: - perl -pe "s,^EXTRA_DIST = .*,EXTRA_DIST = `echo doc/*.asciidoc`," < Makefile.am > tmp - diff -ur Makefile.am tmp || (echo 'error: please update Makefile.am'; exit 1) + perl -pe "s,^EXTRA_DIST = .*,EXTRA_DIST = `cd $(srcdir) && ls doc/*.asciidoc | grep -v Todo.ascii | xargs echo`," \ + < $(srcdir)/Makefile.am > check-doc-dist.tmp + diff -ur $(srcdir)/Makefile.am check-doc-dist.tmp || \ + (rm -f check-doc-dist.tmp; echo 'error: please update $(srcdir)/Makefile.am to include all docs'; exit 1) + rm -f check-doc-dist.tmp release: @if test -z "$(USER)" || test -z "$(KEYID)"; then \ @@ -93,11 +96,9 @@ release: echo " make release USER=simon@yubico.com KEYID=B9156397"; \ exit 1; \ fi - @if head -3 NEWS | grep -q unreleased; then \ - echo "You need to update NEWS, see doc/MakeRelease.wiki."; \ - exit 1; \ - fi - rm -f ChangeLog + @head -3 $(srcdir)/NEWS | grep -q "Version $(VERSION) .released `date -I`" || \ + (echo 'error: You need to update date/version in $(srcdir)/NEWS, see doc/MakeRelease.wiki.'; exit 1) + rm -f $(srcdir)/ChangeLog make check-doc-dist ChangeLog distcheck gpg --detach-sign --default-key $(KEYID) $(PACKAGE)-$(VERSION).tar.gz gpg --verify $(PACKAGE)-$(VERSION).tar.gz.sig -- 2.39.5