forked from xavihart/SJTUThesis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
29 lines (20 loc) · 760 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Makefile for SJTUThesis
PACKAGE = sjtuthesis
SOURCE_DIR = source
LOGO_DIR = logos
RELEASE_DIR = release
SAMPLE_DIR = sample
THESIS = thesis
SOURCE = $(SOURCE_DIR)/$(PACKAGE).dtx
SCRIPTS = $(SOURCE_DIR)/latexmkrc.pl $(SOURCE_DIR)/sample.bat $(SOURCE_DIR)/sample.mk
LOGOS = $(LOGO_DIR)/sjtu-badge.pdf $(LOGO_DIR)/sjtu-logo.pdf $(LOGO_DIR)/sjtu-name.pdf
VERSION = $(shell git describe --tags)
TEXMF = $(shell kpsewhich --var-value TEXMFHOME)
TDS_ARCHIVE = $(RELEASE_DIR)/$(PACKAGE).tds.zip
PACK = scripts/pack.sh
.PHONY : all install
all : $(TDS_ARCHIVE)
$(TDS_ARCHIVE) : $(PACK) $(SOURCE) $(SCRIPTS) $(LOGOS)
@$(PACK) $(SOURCE_DIR) $(LOGO_DIR) $(SAMPLE_DIR) $(RELEASE_DIR) $(VERSION)
install : $(TDS_ARCHIVE)
unzip -o -q $(TDS_ARCHIVE) -d $(TEXMF)/