summaryrefslogtreecommitdiff
path: root/webapps/qooxdoo-0.6.3-sdk/frontend/framework/Makefile
blob: 97b4ada374da958dabd195ea5f411a6cd008cff0 (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
###################################################################################
# VARIABLES
###################################################################################

FRAMEWORK=.
GENERATOR=$(FRAMEWORK)/tool/generator.py
CACHE=$(FRAMEWORK)/.cache
SOURCELOADER=
NICE=10
TIMEFLAG = `date +'%s'`

ifneq ($(SOURCELOADER),)
  SOURCELDR = --source-loader-type $(SOURCELOADER)
else
  SOURCELDR =
endif


###################################################################################
# DEFAULT TARGET
###################################################################################

all: build



###################################################################################
# COMMON TARGETS
###################################################################################

source: generate-source
build: generate-build
debug: generate-debug
pretty: generate-pretty
fix: generate-fix


###################################################################################
# CLEANUP TARGETS
###################################################################################

clean:
	@echo
	@echo "  CLEANUP OF GENERATED FILES"
	@echo "----------------------------------------------------------------------------"
	@echo "  * Deleting files..."
	@rm -f build/script/qx.js source/script/qx.js

realclean: clean
	@echo
	@echo "  CLEANUP OF GENERATED FILES (REAL)"
	@echo "----------------------------------------------------------------------------"
	@echo "  * Deleting files..."
	@nice -n $(NICE) rm -rf build source/script
	@nice -n $(NICE) rm -rf debug-tokens debug-tree

distclean: realclean
	@echo
	@echo "  CLEANUP OF GENERATED FILES (DIST)"
	@echo "----------------------------------------------------------------------------"
	@echo "  * Deleting files..."
	@nice -n $(NICE) find tool -name "*.pyc" | xargs rm -f
	@nice -n $(NICE) find . -name "*~" -o -name "*.bak" -o -name "*.old" -o -name "*.compiled" | xargs rm -rf
	@nice -n $(NICE) rm -rf $(CACHE)




###################################################################################
# GENERATOR TARGETS
###################################################################################

generate-all:
	@chmod u+x $(GENERATOR) && nice -n $(NICE) $(GENERATOR) \
	  --script-input source/class \
	  --generate-compiled-script \
	  --compiled-script-file build/script/qx.js \
	  --optimize-strings \
	  --optimize-variables \
	  --copy-resources \
	  --resource-input source/resource \
	  --resource-output build/resource \
	  --source-script-path ../class \
	  --generate-source-script $(SOURCELDR) \
	  --source-script-file source/script/qx.js \
	  --cache-directory $(CACHE)

generate-compile:
	@chmod u+x $(GENERATOR) && nice -n $(NICE) $(GENERATOR) \
	  --script-input source/class \
	  --generate-compiled-script \
	  --compiled-script-file build/script/qx.js \
	  --optimize-strings \
	  --optimize-variables \
	  --cache-directory $(CACHE)

generate-resource:
	@chmod u+x $(GENERATOR) && nice -n $(NICE) $(GENERATOR) \
	  --script-input source/class \
	  --copy-resources \
	  --resource-input source/resource \
	  --resource-output build/resource \
	  --cache-directory $(CACHE)

generate-build:
	@chmod u+x $(GENERATOR) && nice -n $(NICE) $(GENERATOR) \
	  --script-input source/class \
	  --generate-compiled-script \
	  --compiled-script-file build/script/qx.js \
	  --optimize-strings \
	  --optimize-variables \
	  --copy-resources \
	  --resource-input source/resource \
	  --resource-output build/resource \
	  --cache-directory $(CACHE)

generate-source:
	@chmod u+x $(GENERATOR) && nice -n $(NICE) $(GENERATOR) \
	  --script-input source/class \
	  --source-script-path ../class \
	  --generate-source-script $(SOURCELDR) \
	  --source-script-file source/script/qx.js \
	  --cache-directory $(CACHE)

generate-tree:
	@chmod u+x $(GENERATOR) && nice -n $(NICE) $(GENERATOR) \
	  --script-input source/class \
	  --tree-output-directory debug-tree \
	  --store-tree \
	  --cache-directory $(CACHE)

generate-tokens:
	@chmod u+x $(GENERATOR) && nice -n $(NICE) $(GENERATOR) \
	  --script-input source/class \
	  --token-output-directory debug-tokens \
	  --store-tokens \
	  --cache-directory $(CACHE)

generate-debug:
	@chmod u+x $(GENERATOR) && nice -n $(NICE) $(GENERATOR) \
	  --script-input source/class \
	  --tree-output-directory debug-tree \
	  --token-output-directory debug-tokens \
	  --store-tree \
	  --store-tokens \
	  --cache-directory $(CACHE)

generate-pretty:
	@chmod u+x $(GENERATOR) && nice -n $(NICE) $(GENERATOR) \
	  --script-input source/class \
	  --pretty-print \
	  --cache-directory $(CACHE)

generate-fix:
	@chmod u+x $(GENERATOR) && nice -n $(NICE) $(GENERATOR) \
	  --script-input source/class \
	  --fix-source \
	  --cache-directory $(CACHE)

revision-bump:
	@echo
	@echo "  REVISION BUMP"
	@echo "----------------------------------------------------------------------------"
	@echo "  * Updating version file..."
	@tool/modules/tagtool.py source/class/qx/core/Version.js
	@echo "  * Committing to SVN..."
	@svn commit -m 'Revision bump: Online demo update' source/class/qx/core/Version.js