summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2013-07-24 11:44:32 +0200
committerPhilipp Gesang <phg42.2a@gmail.com>2013-07-24 11:44:32 +0200
commit2c4bb4e4fee25ed79f6183bff9200eba168c021d (patch)
tree01b9cbdfccd8a12c60d66903e6a65dae3b55703b /Makefile
parentf2f3234465dd965a9915b97bc8b3ac77bd40c464 (diff)
downloadlualibs-2c4bb4e4fee25ed79f6183bff9200eba168c021d.tar.gz
adapt makefile to conform to CTAN preferences
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]
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 11 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 6916f1e..556e56f 100644
--- a/Makefile
+++ b/Makefile
@@ -23,13 +23,14 @@ SRCFILES = $(DTX) $(SRC_TEX) Makefile $(SCRIPTS)
# The following definitions should be equivalent
# ALL_FILES = $(RUNFILES) $(DOCFILES) $(SRCFILES)
-ALL_FILES = $(GENERATED) $(SOURCE)
+ALL_FILES = $(SOURCE) $(filter-out $(SOURCE),$(GENERATED))
# Installation locations
FORMAT = luatex
RUNDIR = $(TEXMFROOT)/tex/$(FORMAT)/$(NAME)
DOCDIR = $(TEXMFROOT)/doc/$(FORMAT)/$(NAME)
SRCDIR = $(TEXMFROOT)/source/$(FORMAT)/$(NAME)
+DISTDIR = ./lualibs
TEXMFROOT = ./texmf
CTAN_ZIP = $(NAME).zip
@@ -54,7 +55,7 @@ check: $(TESTSCRIPT)
news: $(DIFFSCRIPT)
@texlua $(DIFFSCRIPT)
-.PHONY: all doc unpack ctan tds world
+.PHONY: all doc unpack ctan tds world check news
%.pdf: %.dtx
$(DO_PDFLATEX)
@@ -68,10 +69,16 @@ news: $(DIFFSCRIPT)
$(UNPACKED): lualibs.dtx
$(DO_TEX)
-$(CTAN_ZIP): $(SOURCE) $(COMPILED) $(GENERATED) $(TDS_ZIP)
+define make-ctandir
+@rm -r $(DISTDIR)
+@mkdir $(DISTDIR) && cp $(ALL_FILES) $(DISTDIR)
+endef
+
+$(CTAN_ZIP): $(ALL_FILES) $(TDS_ZIP)
@echo "Making $@ for CTAN upload."
@$(RM) -- $@
- @zip -9 $@ $^ >/dev/null
+ $(make-ctandir)
+ @zip -r -9 $@ $(DISTDIR) $(TDS_ZIP) >/dev/null
define run-install
@mkdir -p $(RUNDIR) && cp $(RUNFILES) $(RUNDIR)