r20517: re-add cleaned-up webapps
[kai/samba.git] / webapps / qooxdoo-0.6.3-sdk / frontend / framework / Makefile
1 ###################################################################################
2 # VARIABLES
3 ###################################################################################
4
5 FRAMEWORK=.
6 GENERATOR=$(FRAMEWORK)/tool/generator.py
7 CACHE=$(FRAMEWORK)/.cache
8 SOURCELOADER=
9 NICE=10
10 TIMEFLAG = `date +'%s'`
11
12 ifneq ($(SOURCELOADER),)
13   SOURCELDR = --source-loader-type $(SOURCELOADER)
14 else
15   SOURCELDR =
16 endif
17
18
19 ###################################################################################
20 # DEFAULT TARGET
21 ###################################################################################
22
23 all: build
24
25
26
27 ###################################################################################
28 # COMMON TARGETS
29 ###################################################################################
30
31 source: generate-source
32 build: generate-build
33 debug: generate-debug
34 pretty: generate-pretty
35 fix: generate-fix
36
37
38 ###################################################################################
39 # CLEANUP TARGETS
40 ###################################################################################
41
42 clean:
43         @echo
44         @echo "  CLEANUP OF GENERATED FILES"
45         @echo "----------------------------------------------------------------------------"
46         @echo "  * Deleting files..."
47         @rm -f build/script/qx.js source/script/qx.js
48
49 realclean: clean
50         @echo
51         @echo "  CLEANUP OF GENERATED FILES (REAL)"
52         @echo "----------------------------------------------------------------------------"
53         @echo "  * Deleting files..."
54         @nice -n $(NICE) rm -rf build source/script
55         @nice -n $(NICE) rm -rf debug-tokens debug-tree
56
57 distclean: realclean
58         @echo
59         @echo "  CLEANUP OF GENERATED FILES (DIST)"
60         @echo "----------------------------------------------------------------------------"
61         @echo "  * Deleting files..."
62         @nice -n $(NICE) find tool -name "*.pyc" | xargs rm -f
63         @nice -n $(NICE) find . -name "*~" -o -name "*.bak" -o -name "*.old" -o -name "*.compiled" | xargs rm -rf
64         @nice -n $(NICE) rm -rf $(CACHE)
65
66
67
68
69 ###################################################################################
70 # GENERATOR TARGETS
71 ###################################################################################
72
73 generate-all:
74         @chmod u+x $(GENERATOR) && nice -n $(NICE) $(GENERATOR) \
75           --script-input source/class \
76           --generate-compiled-script \
77           --compiled-script-file build/script/qx.js \
78           --optimize-strings \
79           --optimize-variables \
80           --copy-resources \
81           --resource-input source/resource \
82           --resource-output build/resource \
83           --source-script-path ../class \
84           --generate-source-script $(SOURCELDR) \
85           --source-script-file source/script/qx.js \
86           --cache-directory $(CACHE)
87
88 generate-compile:
89         @chmod u+x $(GENERATOR) && nice -n $(NICE) $(GENERATOR) \
90           --script-input source/class \
91           --generate-compiled-script \
92           --compiled-script-file build/script/qx.js \
93           --optimize-strings \
94           --optimize-variables \
95           --cache-directory $(CACHE)
96
97 generate-resource:
98         @chmod u+x $(GENERATOR) && nice -n $(NICE) $(GENERATOR) \
99           --script-input source/class \
100           --copy-resources \
101           --resource-input source/resource \
102           --resource-output build/resource \
103           --cache-directory $(CACHE)
104
105 generate-build:
106         @chmod u+x $(GENERATOR) && nice -n $(NICE) $(GENERATOR) \
107           --script-input source/class \
108           --generate-compiled-script \
109           --compiled-script-file build/script/qx.js \
110           --optimize-strings \
111           --optimize-variables \
112           --copy-resources \
113           --resource-input source/resource \
114           --resource-output build/resource \
115           --cache-directory $(CACHE)
116
117 generate-source:
118         @chmod u+x $(GENERATOR) && nice -n $(NICE) $(GENERATOR) \
119           --script-input source/class \
120           --source-script-path ../class \
121           --generate-source-script $(SOURCELDR) \
122           --source-script-file source/script/qx.js \
123           --cache-directory $(CACHE)
124
125 generate-tree:
126         @chmod u+x $(GENERATOR) && nice -n $(NICE) $(GENERATOR) \
127           --script-input source/class \
128           --tree-output-directory debug-tree \
129           --store-tree \
130           --cache-directory $(CACHE)
131
132 generate-tokens:
133         @chmod u+x $(GENERATOR) && nice -n $(NICE) $(GENERATOR) \
134           --script-input source/class \
135           --token-output-directory debug-tokens \
136           --store-tokens \
137           --cache-directory $(CACHE)
138
139 generate-debug:
140         @chmod u+x $(GENERATOR) && nice -n $(NICE) $(GENERATOR) \
141           --script-input source/class \
142           --tree-output-directory debug-tree \
143           --token-output-directory debug-tokens \
144           --store-tree \
145           --store-tokens \
146           --cache-directory $(CACHE)
147
148 generate-pretty:
149         @chmod u+x $(GENERATOR) && nice -n $(NICE) $(GENERATOR) \
150           --script-input source/class \
151           --pretty-print \
152           --cache-directory $(CACHE)
153
154 generate-fix:
155         @chmod u+x $(GENERATOR) && nice -n $(NICE) $(GENERATOR) \
156           --script-input source/class \
157           --fix-source \
158           --cache-directory $(CACHE)
159
160 revision-bump:
161         @echo
162         @echo "  REVISION BUMP"
163         @echo "----------------------------------------------------------------------------"
164         @echo "  * Updating version file..."
165         @tool/modules/tagtool.py source/class/qx/core/Version.js
166         @echo "  * Committing to SVN..."
167         @svn commit -m 'Revision bump: Online demo update' source/class/qx/core/Version.js