-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
38 lines (30 loc) · 1.04 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
PACKAGE = ginjs
VERSION = ` date "+%Y.%m.%d" `
RELEASE_DIR = bin
RELEASE_FILE = $(PACKAGE)-$(VERSION)
# Notice that the variable LOGNAME comes from the environment in
# POSIX shells.
#
# target: all - Default target. Does nothing.
all:
@echo "Building a combined file..."
@if [ ! -d $(RELEASE_DIR) ]; then mkdir $(RELEASE_DIR); fi
@-cat src/routes/* src/* > $(RELEASE_DIR)/$(RELEASE_FILE).coffee 2> /dev/null
@echo "Compiling Coffee..."
@coffee -c $(RELEASE_DIR)/$(RELEASE_FILE).coffee
@echo "Copying Newest Build to $(RELEASE_DIR)/gin.js..."
@if [ -f $(RELEASE_DIR)/gin.js ]; then rm $(RELEASE_DIR)/gin.js; fi
@cd $(RELEASE_DIR); \
cp $(RELEASE_FILE).js gin.js
@echo "Great Success!"
routes:
@echo "Building a combined file..."
@if [ ! -d $(RELEASE_DIR) ]; then mkdir $(RELEASE_DIR); fi
@cat src/_init.coffee src/routes/* > $(RELEASE_DIR)/routes.coffee
@echo "Compiling Coffee..."
@coffee -c $(RELEASE_DIR)/routes.coffee
# target: help - Display callable targets.
help:
egrep "^# target:" [Mm]akefile
clean:
rm $(RELEASE_DIR)/*