summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/download/Makefile
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-10-03 03:00:57 +0000
committerNorbert Preining <norbert@preining.info>2019-10-03 03:00:57 +0000
commit93c3758895674cc9ea3e8aaeeb3cf5d1bdc0e3be (patch)
tree5150bfff26491c4e57ddff629e62b4066295a925 /macros/latex/contrib/download/Makefile
parentd94b7a8c132734a1bc4046d54a75c7882c4c2619 (diff)
CTAN sync 201910030300
Diffstat (limited to 'macros/latex/contrib/download/Makefile')
-rw-r--r--macros/latex/contrib/download/Makefile45
1 files changed, 33 insertions, 12 deletions
diff --git a/macros/latex/contrib/download/Makefile b/macros/latex/contrib/download/Makefile
index 229e714e72..b6c5e88d6d 100644
--- a/macros/latex/contrib/download/Makefile
+++ b/macros/latex/contrib/download/Makefile
@@ -1,23 +1,36 @@
+ZIP_NOATTRS :=
+ifeq ($(shell uname -s),Darwin)
+ ZIP_NOATTRS += -X
+endif
+
+TAR_NOATTRS :=
+ifeq ($(shell uname -s),Darwin)
+ TAR_NOATTRS += --disable-copyfile
+endif
+
TEXMFHOME ?= $(shell kpsewhich -var-value TEXMFHOME)
-.PHONY: all clean distclean install dist
-all: download.pdf
-clean:
+.PHONY: all clean distclean install dist test clean-test
+all: download.tex download.pdf download.sty README
+clean: clean-test
rm -f *.gl? *.id? *.aux # problematic files
rm -f *.bbl *.bcf *.bib *.blg *.xdy # biblatex
rm -f *.fls *.log *.out *.run.xml *.toc # junk
distclean: clean
- rm -f *.cls *.sty *.clo *.tar.gz *.tds.zip
+ rm -f *.cls *.sty *.clo *.tar.gz *.tds.zip README
git reset --hard
%.pdf: %.tex %.sty
makeglossaries $*
biber $*
- pdflatex -shell-escape $<
+ pdflatex -interaction=nonstopmode -halt-on-error -shell-escape $<
makeglossaries $*
- pdflatex -shell-escape $<
+ pdflatex -interaction=nonstopmode -halt-on-error -shell-escape $<
%.sty: %.tex
- pdflatex $<
+ pdflatex -interaction=nonstopmode -halt-on-error $<
+
+README: README.md
+ sed -e '1,4d;$$d' $< > $@
install: all
install -m 0644 download.sty $(TEXMFHOME)/tex/latex/download/download.sty
@@ -26,22 +39,30 @@ install: all
install -m 0644 README $(TEXMFHOME)/doc/latex/download/README
-mktexlsr
-download.tds.zip: download.tex download.pdf download.sty
- mkdir -p download/{tex,doc,source}/latex/download
+download.tds.zip: all
+ mkdir -p download/tex/latex/download
cp download.sty download/tex/latex/download/download.sty
+ mkdir -p download/doc/latex/download
cp download.pdf download/doc/latex/download/download.pdf
+ mkdir -p download/source/latex/download
cp download.tex download/source/latex/download/download.tex
cp README download/doc/latex/download/README
- cd download && zip -r ../download.tds.zip *
+ cd download && zip $(ZIP_NOATTRS) -r ../download.tds.zip *
rm -rf download
-download.tar.gz: download.tds.zip download.tex download.pdf
+download.tar.gz: all download.tds.zip
mkdir -p download
cp download.tex download/download.tex
cp download.pdf download/download.pdf
cp README download/README
cp Makefile download/Makefile
- tar -czf $@ download download.tds.zip
+ tar $(TAR_NOATTRS) -czf $@ download download.tds.zip
rm -rf download
dist: download.tar.gz
+
+test:
+ $(MAKE) -C tests
+
+clean-test:
+ $(MAKE) -C tests clean