This is an automated email from the ASF dual-hosted git repository.

randall pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-annotator.git

commit af1c6f112ed9ff7f8b2fd493b2142bf14c9768f0
Author: Randall Leeds <[email protected]>
AuthorDate: Sat Apr 23 19:19:24 2022 -0700

    Reduce Makefile repitition with dist variables
---
 Makefile | 24 ++++++++++--------------
 1 file changed, 10 insertions(+), 14 deletions(-)

diff --git a/Makefile b/Makefile
index 791350c..146e494 100644
--- a/Makefile
+++ b/Makefile
@@ -28,7 +28,8 @@ vsn_tag = $(shell git describe --tags --always --first-parent 
\
        | grep -Eo -- '^v[0-9]+\.[0-9]\.[0-9]+(-rc.[0-9]+)?$$' \
        2>/dev/null)
 
-annotator_vsn = $(vsn_rel)
+distdir = apache-annotator-$(vsn_rel)-incubating
+disttar = apache-annotator-$(vsn_rel)$(vsn_pre)-incubating.tar.gz
 
 .PHONY: all
 all: build
@@ -62,24 +63,19 @@ else
 
 .PHONY: dist
 dist:
-       @rm -rf apache-annotator-$(annotator_vsn)-incubating
-       @git archive \
-               --output 
apache-annotator-$(annotator_vsn)$(vsn_pre)-incubating.tar.gz \
-               --prefix apache-annotator-$(annotator_vsn)-incubating/ \
-               $(vsn_tag)
-       @echo "Done: 
apache-annotator-$(annotator_vsn)$(vsn_pre)-incubating.tar.gz"
+       @rm -rf $(distdir)
+       @git archive --output $(disttar) --prefix $(distdir)/ $(vsn_tag)
+       @echo "Done: $(disttar)"
 
 endif
 
 .PHONY: distcheck
 distcheck: dist
-       @tar xzf apache-annotator-$(annotator_vsn)$(vsn_pre)-incubating.tar.gz
-       @make -C apache-annotator-$(annotator_vsn)-incubating check
+       @tar xzf $(disttar)
+       @make -C $(distdir) check
 
 .PHONY: distsign
 distsign: dist
-       @gpg -ab apache-annotator-$(annotator_vsn)$(vsn_pre)-incubating.tar.gz
-       @sha256sum 
apache-annotator-$(annotator_vsn)$(vsn_pre)-incubating.tar.gz \
-               > 
apache-annotator-$(annotator_vsn)$(vsn_pre)-incubating.tar.gz.sha256
-       @sha512sum 
apache-annotator-$(annotator_vsn)$(vsn_pre)-incubating.tar.gz \
-               > 
apache-annotator-$(annotator_vsn)$(vsn_pre)-incubating.tar.gz.sha512
+       @gpg -ab $(disttar)
+       @sha256sum $(disttar) > $(disttar).sha256
+       @sha512sum $(disttar) > $(disttar).sha512

Reply via email to