summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/crop/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/crop/Makefile')
-rw-r--r--macros/latex/contrib/crop/Makefile17
1 files changed, 13 insertions, 4 deletions
diff --git a/macros/latex/contrib/crop/Makefile b/macros/latex/contrib/crop/Makefile
index 6b48c0902e..3f0ebd7860 100644
--- a/macros/latex/contrib/crop/Makefile
+++ b/macros/latex/contrib/crop/Makefile
@@ -1,14 +1,18 @@
NAME=crop
-ARCHIVE_NAME=$(NAME).tar.gz
-ARCHIVE_CONTENTS=$(NAME).dtx $(NAME).pdf Makefile README $(NAME).ins $(NAME).sty
+VERSION=`cat VERSION`
+ARCHIVE_NAME=$(NAME).zip
+ARCHIVE_CONTENTS=$(NAME).dtx $(NAME).pdf Makefile README $(NAME).ins
-all: $(NAME).sty $(NAME).pdf
+all: $(NAME).sty $(NAME).pdf VERSION
archive: $(ARCHIVE_CONTENTS)
rm -rf $(NAME)/
mkdir $(NAME)/
cp $(ARCHIVE_CONTENTS) $(NAME)/
- tar -czf $(ARCHIVE_NAME) $(NAME)
+ zip -r $(ARCHIVE_NAME) $(NAME)
+
+$(NAME).dtx: $(NAME).dtx.in
+ nancy $(NAME).dtx.in . > $(NAME).dtx
$(NAME).pdf: $(NAME.dtx)
latexmk $(NAME).dtx
@@ -18,3 +22,8 @@ $(NAME).sty: $(NAME).ins
$(NAME).ins:
pdflatex $(NAME).dtx
+
+release: archive
+ git diff --exit-code && \
+ git tag -a -m "Release tag" "v$(VERSION)" && \
+ git push && git push --tags