summaryrefslogtreecommitdiffstats
path: root/jquery/Makefile
blob: 996f472d146fd2a5283445b717f4a746689a67a8 (plain)
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
JQUERY_VERSION = 1.7.1
JQUERY_UI_VERSION = 1.8.18
HASHCHANGE_VERSION = 1.3
SCROLL_VERSION = 1.4.2
POWERTIP_VERSION = 1.2.0

MINIFIER ?= /usr/local/bin/yuicompressor-2.4.7
SCRIPTS = jquery-$(JQUERY_VERSION).js \
          jquery.ui-$(JQUERY_UI_VERSION).core.js \
          jquery.ui-$(JQUERY_UI_VERSION).widget.js \
          jquery.ui-$(JQUERY_UI_VERSION).mouse.js \
          jquery.ui-$(JQUERY_UI_VERSION).resizable.js \
          jquery.ba-$(HASHCHANGE_VERSION)-hashchange.js \
          jquery.scrollTo-$(SCROLL_VERSION).js \
	  jquery.powertip-$(POWERTIP_VERSION).js
RESULTS = jquery.js

SCRIPTS_MIN = $(SCRIPTS:%.js=%-min.js)

all: $(RESULTS)

install: $(RESULTS)
	cp $(RESULTS) ../templates/html/

jquery.js: scripts
	cat $(SCRIPTS_MIN) > jquery.js

scripts: $(SCRIPTS_MIN)

clean:
	rm -f $(SCRIPTS_MIN) $(RESULTS)

%-min.js: %.js
	java -jar $(MINIFIER).jar $^ > $@