summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2009-05-01 17:14:11 +0200
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2009-05-01 17:14:11 +0200
commit5821436af1c522206c3faf90e0813415445ea6c7 (patch)
treee2af38ae8ba0a5e7cb963f0384d580199f6ea953
parent9ee3a06ebb974328de7511d9402cfd634d999450 (diff)
downloadluaotfload-5821436af1c522206c3faf90e0813415445ea6c7.tar.gz
New target `install TEXMF=/path/to/root'.
-rw-r--r--Makefile32
1 files changed, 20 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 3f9b2f6..8c37fda 100644
--- a/Makefile
+++ b/Makefile
@@ -22,10 +22,10 @@ ALL_FILES = $(GENERATED) $(SOURCE)
# Installation locations
FORMAT = luatex
-RUNDIR = tex/$(FORMAT)/$(NAME)
-DOCDIR = doc/$(FORMAT)/$(NAME)
-SRCDIR = source/$(FORMAT)/$(NAME)
-ALL_DIRS = $(RUNDIR) $(DOCDIR) $(SRCDIR)
+RUNDIR = $(TEXMF)/tex/$(FORMAT)/$(NAME)
+DOCDIR = $(TEXMF)/doc/$(FORMAT)/$(NAME)
+SRCDIR = $(TEXMF)/source/$(FORMAT)/$(NAME)
+TEXMF = ./texmf
CTAN_ZIP = $(NAME).zip
TDS_ZIP = $(NAME).tds.zip
@@ -56,17 +56,25 @@ $(CTAN_ZIP): $(SOURCE) $(COMPILED) $(TDS_ZIP)
@$(RM) -- $@
@zip -9 $@ $^ >/dev/null
+define run-install
+@mkdir -p $(RUNDIR) && cp $(RUNFILES) $(RUNDIR)
+@mkdir -p $(DOCDIR) && cp $(DOCFILES) $(DOCDIR)
+@mkdir -p $(SRCDIR) && cp $(SRCFILES) $(SRCDIR)
+endef
+
+$(TDS_ZIP): TEXMF=./tmp-texmf
$(TDS_ZIP): $(ALL_FILES)
@echo "Making TDS-ready archive $@."
@$(RM) -- $@
- @mkdir -p $(ALL_DIRS)
- @cp $(RUNFILES) $(RUNDIR)
- @cp $(DOCFILES) $(DOCDIR)
- @cp $(SRCFILES) $(SRCDIR)
- @zip -9 $@ -r $(ALL_DIRS) >/dev/null
- @$(RM) -r tex doc source
-
-.PHONY: manifest clean mrproper
+ $(run-install)
+ @cd $(TEXMF) && zip -9 ../$@ -r . >/dev/null
+ @$(RM) -r -- $(TEXMF)
+
+.PHONY: install manifest clean mrproper
+
+install: $(ALL_FILES)
+ @echo "Installing in '$(TEXMF)'."
+ $(run-install)
manifest:
@echo "Source files:"