diff --git a/Makefile.am b/Makefile.am index 1d483f6..64487d3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,27 +4,14 @@ EXTRA_DIST = $(doc_DATA) kernel DISTCLEANFILES = *~ *.d ACLOCAL_AMFLAGS = -I m4 +TAG = $(top_srcdir)/.git/refs/tags/$(PACKAGE_VERSION) -## Check if tagged in git -release-hook: - if [ ! `git tag -l $(PACKAGE_VERSION) | grep $(PACKAGE_VERSION)` ]; then \ - echo; \ - printf "\e[1m\e[41mCannot find release tag $(PACKAGE_VERSION)\e[0m\n"; \ - printf "\e[1m\e[5mDo release anyway?\e[0m "; read yorn; \ - if [ "$$yorn" != "y" -a "$$yorn" != "Y" ]; then \ - printf "OK, aborting release.\n"; \ - exit 1; \ - fi; \ - echo; \ - else \ - echo; \ - printf "\e[1m\e[42mFound GIT release tag $(PACKAGE_VERSION)\e[0m\n"; \ - printf "\e[1m\e[44m>>Remember to push tags!\e[0m\n"; \ - echo; \ - fi +$(TAG): + @printf "\e[1m\e[41mPlease create the \"$(PACKAGE_VERSION)\" tag first\e[0m\n" + @exit 1 -## Target to run when building a release -release: release-hook distcheck +release: $(TAG) distcheck + @git status @for file in $(DIST_ARCHIVES); do \ md5sum $$file > ../$$file.md5; \ sha1sum $$file > ../$$file.sha1; \