summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2013-07-27 13:36:16 -0700
committerPhilipp Gesang <phg42.2a@gmail.com>2013-07-27 13:36:16 -0700
commit515a4cf2df2d070af12bf6e4d332cd906d4dd031 (patch)
tree5fc53bfd3f2733b9867d32b0fde45c91dc49732e /Makefile
parentdaeb3c1fddf826deb325cbe2a6567083c828ca13 (diff)
parentc186e7575989bcf18cada97c0f4310aa287f44b8 (diff)
downloadluaotfload-515a4cf2df2d070af12bf6e4d332cd906d4dd031.tar.gz
Merge pull request #114 from phi-gamma/master
directory handling; environment variables
Diffstat (limited to 'Makefile')
-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)