]> err.no Git - yubikey-personalization/commitdiff
release: Make work with build dir != src dir. v1.4.1
authorFredrik Thulin <fredrik@yubico.com>
Wed, 19 Jan 2011 09:39:31 +0000 (10:39 +0100)
committerFredrik Thulin <fredrik@yubico.com>
Wed, 19 Jan 2011 09:49:11 +0000 (10:49 +0100)
Makefile.am

index 20d807dfc4975dac8df3d90879dadddcd5daf1cb..8b49c86bfee49b802ea67a85f47c69d15a0056de 100644 (file)
@@ -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