-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (31 loc) · 937 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
SRC = ${npm_package_directories_src}
LIB = ${npm_package_directories_lib}
VERSION = v${npm_package_version}
JQUERY_SUMODULE_DIR = lib/jquery
JQUERY = $(JQUERY_SUMODULE_DIR)/dist/jquery.js
NQUERY = ${npm_package_main}
M4_NQUERY = $(basename $(NQUERY)).m4$(suffix $(NQUERY))
.PHONY: build
build: $(NQUERY)
.PHONY: prepublish
prepublish: build mostlyclean
$(NQUERY): $(JQUERY) $(M4_NQUERY)
m4 --prefix-builtins --include $(dir $(JQUERY)) $(M4_NQUERY) > $@
$(JQUERY): $(JQUERY_SUMODULE_DIR)
cd $< && npm install && ./node_modules/.bin/grunt --force && cd $(CURDIR)
$(JQUERY_SUMODULE_DIR): FORCE
git submodule update --init --recursive
$(LIB)/%.js: $(SRC)/%.coffee
coffee --compile --print $< > $@
#.PHONY: test
#test: build
.PHONY: mostlyclean
mostlyclean: FORCE
rm -Rf $(JQUERY_SUMODULE_DIR) $(M4_NQUERY)
.PHONY: clean
clean: mostlyclean
rm -Rf $(NQUERY)
FORCE:
.PHONY: debug
debug:
@echo "debug"