forked from vkaravir/bib-publication-list
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (31 loc) · 1.24 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
RM = rm -rf
LIB = lib
MINIMIZE_JS = java -jar tools/yuicompressor-2.4.6.jar --nomunge --preserve-semi -o $(TARGET)/js/bib-list.min.js $(TARGET)/js/bib-list.js
MINIMIZE_CSS = java -jar tools/yuicompressor-2.4.6.jar -o $(TARGET)/css/bib-list.min.css $(TARGET)/css/bib-list.css
CAT = cat
SRC = src
TARGET = build
SOURCES_JS = $(LIB)/js/BibTex-0.1.2.js $(LIB)/js/jquery.dataTables.js $(LIB)/js/moment.js $(LIB)/js/jquery.popup.js $(SRC)/bib-publication-list.js
SOURCES_CSS = $(LIB)/css/jquery.dataTables.css $(LIB)/css/popup.css $(SRC)/bib-publication-list.css
all: build
clean:
$(RM) build/*
build: $(TARGET)/bib-list.js minimize_js $(TARGET)/bib-list.css minimize_css
###############################
# Compile JS Files
###############################
$(TARGET)/bib-list.js: $(SOURCES_JS)
-mkdir -p $(TARGET)/js
$(CAT) $(SOURCES_JS) > $(TARGET)/js/bib-list.js
minimize_js: $(TARGET)/bib-list.min.js
$(TARGET)/bib-list.min.js: $(SOURCES_JS)
$(MINIMIZE_JS)
###############################
# Compile CSS Files
###############################
$(TARGET)/bib-list.css: $(SOURCES_CSS)
-mkdir -p $(TARGET)/css
$(CAT) $(SOURCES_CSS) > $(TARGET)/css/bib-list.css
minimize_css: $(TARGET)/bib-list.min.css
$(TARGET)/bib-list.min.css: $(SOURCES_CSS)
$(MINIMIZE_CSS)