summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2013-07-24 12:09:32 +0200
committerPhilipp Gesang <phg42.2a@gmail.com>2013-07-24 12:09:32 +0200
commitff5713713486017314a0ff9ab200dc2cfc7c7fba (patch)
treed260436f673628589b060c83269e10aabe8d1812
parent0f6be8a260b3dce2b2031cd2dce40b629b3fd9fe (diff)
downloadluaotfload-ff5713713486017314a0ff9ab200dc2cfc7c7fba.tar.gz
adapt makefile to preferred CTAN zip scheme
according to Robin Fairbairns: > btw, the least error-prone format for the zip file is: > > xyz.zip -> > xyz.tds.zip (if available) > xyz/ > [actual distribution of package xyz]
-rw-r--r--Makefile12
1 files changed, 11 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 944fc12..2d618e7 100644
--- a/Makefile
+++ b/Makefile
@@ -60,6 +60,9 @@ MANDIR = $(TEXMFROOT)/doc/man/man1/
SRCDIR = $(TEXMFROOT)/source/$(FORMAT)/$(NAME)
TEXMFROOT = $(shell kpsewhich --var-value TEXMFHOME)
+# CTAN-friendly subdirectory for packaging
+DISTDIR = ./luaotfload
+
CTAN_ZIP = $(NAME).zip
TDS_ZIP = $(NAME).tds.zip
ZIPS = $(CTAN_ZIP) $(TDS_ZIP)
@@ -110,10 +113,16 @@ $(UNPACKED): $(DTX)
$(MAN): $(MANSOURCE)
$(DO_DOCUTILS)
+define make-ctandir
+@$(RM) -rf $(DISTDIR)
+@mkdir -p $(DISTDIR) && cp $(SOURCE) $(COMPILED) $(DISTDIR)
+endef
+
$(CTAN_ZIP): $(SOURCE) $(COMPILED) $(TDS_ZIP)
@echo "Making $@ for CTAN upload."
@$(RM) -- $@
- @zip -9 $@ $^ >/dev/null
+ $(make-ctandir)
+ @zip -r -9 $@ $(TDS_ZIP) $(DISTDIR) >/dev/null
define run-install
@mkdir -p $(SCRIPTDIR) && cp $(SCRIPTSTATUS) $(SCRIPTDIR)
@@ -164,4 +173,5 @@ clean:
mrproper: clean
@$(RM) -- $(GENERATED) $(ZIPS) $(GLYPHSOURCE) $(TESTDIR)/*.pdf
+ @$(RM) -r -- $(DISTDIR)