From 2c4bb4e4fee25ed79f6183bff9200eba168c021d Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Wed, 24 Jul 2013 11:44:32 +0200 Subject: 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] --- Makefile | 15 +++++++++++---- 1 file 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) -- cgit v1.2.3