OLD | NEW |
1 # Makefile debugging hack: uncomment the two lines below and make will tell you | 1 # Makefile debugging hack: uncomment the two lines below and make will tell you |
2 # more about what is happening. The output generated is of the form | 2 # more about what is happening. The output generated is of the form |
3 # "FILE:LINE [TARGET (DEPENDENCIES) (NEWER)]" where DEPENDENCIES are all the | 3 # "FILE:LINE [TARGET (DEPENDENCIES) (NEWER)]" where DEPENDENCIES are all the |
4 # things TARGET depends on and NEWER are all the files that are newer than | 4 # things TARGET depends on and NEWER are all the files that are newer than |
5 # TARGET. DEPENDENCIES will be colored green and NEWER will be blue. | 5 # TARGET. DEPENDENCIES will be colored green and NEWER will be blue. |
6 # | 6 # |
7 #OLD_SHELL := $(SHELL) | 7 #OLD_SHELL := $(SHELL) |
8 #SHELL = $(warning [$@ [32m($^) [34m($?)[m ])$(OLD_SHELL) | 8 #SHELL = $(warning [$@ [32m($^) [34m($?)[m ])$(OLD_SHELL) |
9 | 9 |
10 # Build a target for JavaScript files. The find command exclused directories | 10 # Build a target for JavaScript files. The find command exclused directories |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 APPCACHE=build-shared/juju-ui/assets/manifest.appcache | 125 APPCACHE=build-shared/juju-ui/assets/manifest.appcache |
126 | 126 |
127 # Some environments, notably sudo, do not populate the default PWD environment | 127 # Some environments, notably sudo, do not populate the default PWD environment |
128 # variable, which is used to set $(PWD). Worse, in some situations, such as | 128 # variable, which is used to set $(PWD). Worse, in some situations, such as |
129 # using make -C [directory], $(PWD) is set to a value we don't want: the | 129 # using make -C [directory], $(PWD) is set to a value we don't want: the |
130 # directory in which make was invoked, rather than the directory of this file. | 130 # directory in which make was invoked, rather than the directory of this file. |
131 # Therefore, we want to run the shell's pwd to get this Makefile's directory. | 131 # Therefore, we want to run the shell's pwd to get this Makefile's directory. |
132 # As an optimization, we stash this value in the local PWD variable. | 132 # As an optimization, we stash this value in the local PWD variable. |
133 PWD=$(shell pwd) | 133 PWD=$(shell pwd) |
134 | 134 |
135 all: build | 135 all: build bin/test-charm |
136 @echo "\nDebug and production environments built." | 136 @echo "\nDebug and production environments built." |
137 @echo "Run 'make help' to list the main available targets." | 137 @echo "Run 'make help' to list the main available targets." |
138 | 138 |
139 help: | 139 help: |
140 @echo "Main targets:" | 140 @echo "Main targets:" |
141 @echo "[no target] or build: build the debug and production environments
" | 141 @echo "[no target] or build: build the debug and production environments
" |
142 @echo "devel: run the development environment (dynamic templates/CSS)" | 142 @echo "devel: run the development environment (dynamic templates/CSS)" |
143 @echo "debug: run the debugging environment (static templates/CSS)" | 143 @echo "debug: run the debugging environment (static templates/CSS)" |
144 @echo "prod: run the production environment (aggregated, compressed file
s)" | 144 @echo "prod: run the production environment (aggregated, compressed file
s)" |
145 @echo "clean: remove the generated build directories" | 145 @echo "clean: remove the generated build directories" |
146 @echo "clean-all: remove build, deps and doc directories" | 146 @echo "clean-all: remove build, deps and doc directories" |
147 @echo "test-debug: run tests on the cli from the debug environment" | 147 @echo "test-debug: run tests on the cli from the debug environment" |
148 @echo "test-prod: run tests on the cli from the production environment" | 148 @echo "test-prod: run tests on the cli from the production environment" |
| 149 @echo "test-misc: run tests of project infrastructure bits" |
149 @echo "test-server: run tests in the browser from the debug environment" | 150 @echo "test-server: run tests in the browser from the debug environment" |
150 @echo "prep: beautify and lint the source" | 151 @echo "prep: beautify and lint the source" |
151 @echo "docs: generate project and code documentation" | 152 @echo "docs: generate project and code documentation" |
152 @echo "view-docs: generate both doc sets and view them in the browser" | 153 @echo "view-docs: generate both doc sets and view them in the browser" |
153 @echo "help: this description" | 154 @echo "help: this description" |
154 » @echo "Other, less common targets are available, see Makefile." | 155 » @echo "Other targets are available, see the Makefile." |
155 | 156 |
156 build-shared/juju-ui/templates.js: $(TEMPLATE_TARGETS) bin/generateTemplates | 157 build-shared/juju-ui/templates.js: $(TEMPLATE_TARGETS) bin/generateTemplates |
157 mkdir -p build-shared/juju-ui/assets | 158 mkdir -p build-shared/juju-ui/assets |
158 bin/generateTemplates | 159 bin/generateTemplates |
159 | 160 |
160 yuidoc/index.html: node_modules/yuidocjs $(JSFILES) | 161 yuidoc/index.html: node_modules/yuidocjs $(JSFILES) |
161 node_modules/.bin/yuidoc -o yuidoc -x assets app | 162 node_modules/.bin/yuidoc -o yuidoc -x assets app |
162 | 163 |
163 main-doc: | 164 main-doc: |
164 make -C docs html | 165 make -C docs html |
165 | 166 |
166 view-main-doc: main-doc | 167 view-main-doc: main-doc |
167 xdg-open docs/_build/html/index.html | 168 xdg-open docs/_build/html/index.html |
168 | 169 |
| 170 sphinx: |
| 171 @echo "Deprecated. Please run 'make main-doc' or 'make view-main-doc'." |
| 172 |
169 code-doc: yuidoc/index.html | 173 code-doc: yuidoc/index.html |
170 | 174 |
171 view-code-doc: code-doc | 175 view-code-doc: code-doc |
172 xdg-open yuidoc/index.html | 176 xdg-open yuidoc/index.html |
173 | 177 |
| 178 yuidoc: |
| 179 @echo "Deprecated. Please run 'make code-doc' or 'make view-code-doc'." |
| 180 |
174 docs: code-doc main-doc | 181 docs: code-doc main-doc |
175 | 182 |
176 view-docs: docs | 183 view-docs: docs |
177 xdg-open docs/_build/html/index.html | 184 xdg-open docs/_build/html/index.html |
178 xdg-open yuidoc/index.html | 185 xdg-open yuidoc/index.html |
179 | 186 |
180 $(SPRITE_GENERATED_FILES): node_modules/grunt node_modules/node-spritesheet \ | 187 $(SPRITE_GENERATED_FILES): node_modules/grunt node_modules/node-spritesheet \ |
181 $(SPRITE_SOURCE_FILES) | 188 $(SPRITE_SOURCE_FILES) |
182 node_modules/grunt/bin/grunt spritegen | 189 node_modules/grunt/bin/grunt spritegen |
183 | 190 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 bin/lint-yuidoc | 246 bin/lint-yuidoc |
240 | 247 |
241 recess: node_modules/recess | 248 recess: node_modules/recess |
242 # We need to grep for "Perfect" because recess does not set a non-zero | 249 # We need to grep for "Perfect" because recess does not set a non-zero |
243 # exit code if it rejects a file. If this fails, run the recess command | 250 # exit code if it rejects a file. If this fails, run the recess command |
244 # below without the grep to get recess' report. | 251 # below without the grep to get recess' report. |
245 node_modules/recess/bin/recess lib/views/stylesheet.less --config recess
.json | grep -q Perfect | 252 node_modules/recess/bin/recess lib/views/stylesheet.less --config recess
.json | grep -q Perfect |
246 | 253 |
247 lint: gjslint jshint recess yuidoc-lint | 254 lint: gjslint jshint recess yuidoc-lint |
248 | 255 |
249 virtualenv/bin/gjslint virtualenv/bin/fixjsstyle: | 256 virtualenv/bin/python: |
250 virtualenv virtualenv | 257 virtualenv virtualenv |
| 258 |
| 259 bin/py: virtualenv/bin/python |
| 260 ln -s $(PWD)/virtualenv/bin/python bin/py |
| 261 |
| 262 bin/test-charm: bin/py python-shelltoolbox selenium |
| 263 |
| 264 virtualenv/bin/gjslint virtualenv/bin/fixjsstyle: virtualenv/bin/python |
251 virtualenv/bin/easy_install archives/closure_linter-latest.tar.gz | 265 virtualenv/bin/easy_install archives/closure_linter-latest.tar.gz |
252 | 266 |
| 267 python-shelltoolbox: virtualenv/bin/python |
| 268 [ -d python-shelltoolbox ] || bzr branch --standalone lp:python-shelltoo
lbox |
| 269 virtualenv/bin/easy_install ./python-shelltoolbox |
| 270 |
| 271 virtualenv/lib/python2.7/site-packages/selenium-2.29.0-py2.7.egg: |
| 272 virtualenv/bin/easy_install archives/selenium-2.29.0.tar.gz |
| 273 |
| 274 selenium: virtualenv/bin/python virtualenv/lib/python2.7/site-packages/selenium-
2.29.0-py2.7.egg |
| 275 |
253 beautify: virtualenv/bin/fixjsstyle | 276 beautify: virtualenv/bin/fixjsstyle |
254 virtualenv/bin/fixjsstyle --strict --nojsdoc --jslint_error=all $(JSFILE
S) | 277 virtualenv/bin/fixjsstyle --strict --nojsdoc --jslint_error=all $(JSFILE
S) |
255 | 278 |
256 spritegen: $(SPRITE_GENERATED_FILES) | 279 spritegen: $(SPRITE_GENERATED_FILES) |
257 | 280 |
258 $(BUILD_FILES): $(JSFILES) $(THIRD_PARTY_JS) build-shared/juju-ui/templates.js \ | 281 $(BUILD_FILES): $(JSFILES) $(THIRD_PARTY_JS) build-shared/juju-ui/templates.js \ |
259 bin/merge-files lib/merge-files.js | $(JAVASCRIPT_LIBRARIES) | 282 bin/merge-files lib/merge-files.js | $(JAVASCRIPT_LIBRARIES) |
260 rm -f $(BUILD_FILES) | 283 rm -f $(BUILD_FILES) |
261 mkdir -p build-shared/juju-ui/assets/combined-css/ | 284 mkdir -p build-shared/juju-ui/assets/combined-css/ |
262 ln -sf "$(PWD)/node_modules/yui/assets/skins/sam/rail-x.png" \ | 285 ln -sf "$(PWD)/node_modules/yui/assets/skins/sam/rail-x.png" \ |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 | 367 |
345 test-debug: build-debug | 368 test-debug: build-debug |
346 ./test-server.sh debug | 369 ./test-server.sh debug |
347 | 370 |
348 test-prod: build-prod | 371 test-prod: build-prod |
349 ./test-server.sh prod | 372 ./test-server.sh prod |
350 | 373 |
351 test-server: build-debug | 374 test-server: build-debug |
352 ./test-server.sh debug true | 375 ./test-server.sh debug true |
353 | 376 |
| 377 test-misc: bin/py python-shelltoolbox |
| 378 PYTHONPATH=lib bin/py test/test_deploy_charm_for_testing.py |
| 379 |
354 test: | 380 test: |
355 @echo "Deprecated. Please run either 'make test-prod' or 'make" | 381 @echo "Deprecated. Please run either 'make test-prod' or 'make" |
356 @echo "test-debug', to test the production or debug environments" | 382 @echo "test-debug', to test the production or debug environments" |
357 @echo "respectively. Run 'make help' to list the main available " | 383 @echo "respectively. Run 'make help' to list the main available " |
358 @echo "targets." | 384 @echo "targets." |
359 | 385 |
360 server: | 386 server: |
361 @echo "Deprecated. Please run either 'make prod' or 'make debug'," | 387 @echo "Deprecated. Please run either 'make prod' or 'make debug'," |
362 @echo "to start the production or debug environments respectively." | 388 @echo "to start the production or debug environments respectively." |
363 @echo "Run 'make help' to list the main available targets." | 389 @echo "Run 'make help' to list the main available targets." |
(...skipping 12 matching lines...) Expand all Loading... |
376 cd build-debug && python -m SimpleHTTPServer 8888 | 402 cd build-debug && python -m SimpleHTTPServer 8888 |
377 | 403 |
378 # prod is for deployment of aggregated and minimized code. | 404 # prod is for deployment of aggregated and minimized code. |
379 prod: build-prod | 405 prod: build-prod |
380 @echo "Running the production environment from a SimpleHTTPServer" | 406 @echo "Running the production environment from a SimpleHTTPServer" |
381 cd build-prod && python -m SimpleHTTPServer 8888 | 407 cd build-prod && python -m SimpleHTTPServer 8888 |
382 | 408 |
383 clean: | 409 clean: |
384 rm -rf build-shared build-debug build-prod | 410 rm -rf build-shared build-debug build-prod |
385 find app/assets/javascripts/ -type l | xargs rm -rf | 411 find app/assets/javascripts/ -type l | xargs rm -rf |
| 412 rm -f bin/py |
386 | 413 |
387 clean-deps: | 414 clean-deps: |
388 rm -rf node_modules virtualenv | 415 rm -rf node_modules virtualenv |
| 416 rm -rf python-shelltoolbox |
389 | 417 |
390 clean-docs: | 418 clean-docs: |
391 make -C docs clean | 419 make -C docs clean |
392 rm -rf yuidoc | 420 rm -rf yuidoc |
393 | 421 |
394 clean-all: clean clean-deps clean-docs | 422 clean-all: clean clean-deps clean-docs |
395 | 423 |
396 build: build-prod build-debug build-devel | 424 build: build-prod build-debug build-devel |
397 | 425 |
398 build-shared: $(APPCACHE) $(NODE_TARGETS) spritegen \ | 426 build-shared: $(APPCACHE) $(NODE_TARGETS) spritegen \ |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 touch manifest.appcache.in | 505 touch manifest.appcache.in |
478 | 506 |
479 # This is the real target. appcache-touch needs to be executed before | 507 # This is the real target. appcache-touch needs to be executed before |
480 # appcache, and this provides the correct order. | 508 # appcache, and this provides the correct order. |
481 appcache-force: appcache-touch $(APPCACHE) | 509 appcache-force: appcache-touch $(APPCACHE) |
482 | 510 |
483 # targets are alphabetically sorted, they like it that way :-) | 511 # targets are alphabetically sorted, they like it that way :-) |
484 .PHONY: appcache-force appcache-touch beautify build build-files \ | 512 .PHONY: appcache-force appcache-touch beautify build build-files \ |
485 build-devel clean clean-all clean-deps clean-docs code-doc \ | 513 build-devel clean clean-all clean-deps clean-docs code-doc \ |
486 debug devel docs dist gjslint help jshint lint main-doc prep prod \ | 514 debug devel docs dist gjslint help jshint lint main-doc prep prod \ |
487 » recess server spritegen test test-debug test-prod undocumented \ | 515 » recess selenium server spritegen test test-debug test-prod undocumented
\ |
488 view-code-doc view-docs view-main-doc yuidoc-lint | 516 view-code-doc view-docs view-main-doc yuidoc-lint |
489 | 517 |
490 .DEFAULT_GOAL := all | 518 .DEFAULT_GOAL := all |
OLD | NEW |