Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(18)

Delta Between Two Patch Sets: Makefile

Issue 9499043: Add AGPL license
Left Patch Set: Created 11 years, 10 months ago
Right Patch Set: Add AGPL license Created 11 years, 10 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « COPYING ('k') | [revision details] » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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 [$@ ($^) ($?) ])$(OLD_SHELL) 8 #SHELL = $(warning [$@ ($^) ($?) ])$(OLD_SHELL)
9 9
10 # Build a target for JavaScript files. The find command excludes directories 10 # Build a target for JavaScript files. The find command excludes directories
(...skipping 15 matching lines...) Expand all
26 -o -name '*.json' \ 26 -o -name '*.json' \
27 -o -name 'generateTemplates' \ 27 -o -name 'generateTemplates' \
28 \) -print \ 28 \) -print \
29 | sort | sed -e 's/^\.\///' \ 29 | sort | sed -e 's/^\.\///' \
30 | grep -Ev -e '^manifest\.json$$' \ 30 | grep -Ev -e '^manifest\.json$$' \
31 -e '^app/assets/javascripts/d3\.v2(\.min)?\.js$$' \ 31 -e '^app/assets/javascripts/d3\.v2(\.min)?\.js$$' \
32 -e '^app/assets/javascripts/spin\.min\.js$$' \ 32 -e '^app/assets/javascripts/spin\.min\.js$$' \
33 -e '^app/assets/javascripts/js-yaml\.min\.js$$' \ 33 -e '^app/assets/javascripts/js-yaml\.min\.js$$' \
34 -e '^app/assets/javascripts/reconnecting-websocket\.js$$' \ 34 -e '^app/assets/javascripts/reconnecting-websocket\.js$$' \
35 -e '^app/assets/javascripts/prettify.js$$' \ 35 -e '^app/assets/javascripts/prettify.js$$' \
36 -e '^app/assets/javascripts/FileSaver.js$$' \
36 -e '^app/assets/javascripts/gallery-.*\.js$$' \ 37 -e '^app/assets/javascripts/gallery-.*\.js$$' \
37 -e '^server.js$$') 38 -e '^server.js$$')
38 THIRD_PARTY_JS=app/assets/javascripts/reconnecting-websocket.js 39 THIRD_PARTY_JS=app/assets/javascripts/reconnecting-websocket.js
39 LINT_IGNORE='app/assets/javascripts/prettify.js, app/assets/javascripts/FileSave r.js' 40 LINT_IGNORE='app/assets/javascripts/prettify.js, app/assets/javascripts/FileSave r.js'
40 NODE_TARGETS=node_modules/chai node_modules/cryptojs node_modules/d3 \ 41 NODE_TARGETS=node_modules/chai node_modules/cryptojs node_modules/d3 \
41 node_modules/expect.js node_modules/express \ 42 node_modules/expect.js node_modules/express \
42 node_modules/graceful-fs node_modules/grunt node_modules/jshint \ 43 node_modules/graceful-fs node_modules/grunt node_modules/jshint \
43 node_modules/less node_modules/minimatch node_modules/mocha \ 44 node_modules/less node_modules/minimatch node_modules/mocha \
44 node_modules/node-markdown node_modules/node-minify \ 45 node_modules/node-markdown node_modules/node-minify \
45 node_modules/node-spritesheet node_modules/recess \ 46 node_modules/node-spritesheet node_modules/recess \
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 SPRITE_SOURCE_FILES=$(shell find app/assets/images -type f ! -name '.*' ! -name '*.swp' ! -name '*~' ! -name '\#*' -print) 126 SPRITE_SOURCE_FILES=$(shell find app/assets/images -type f ! -name '.*' ! -name '*.swp' ! -name '*~' ! -name '\#*' -print)
126 SPRITE_GENERATED_FILES=build-shared/juju-ui/assets/sprite.css \ 127 SPRITE_GENERATED_FILES=build-shared/juju-ui/assets/sprite.css \
127 build-shared/juju-ui/assets/sprite.png 128 build-shared/juju-ui/assets/sprite.png
128 NON_SPRITE_IMAGES=build-shared/juju-ui/assets/images 129 NON_SPRITE_IMAGES=build-shared/juju-ui/assets/images
129 BUILD_FILES=build-shared/juju-ui/assets/modules.js \ 130 BUILD_FILES=build-shared/juju-ui/assets/modules.js \
130 build-shared/juju-ui/assets/all-yui.js \ 131 build-shared/juju-ui/assets/all-yui.js \
131 build-shared/juju-ui/assets/combined-css/all-static.css 132 build-shared/juju-ui/assets/combined-css/all-static.css
132 JAVASCRIPT_LIBRARIES=app/assets/javascripts/d3.v2.js \ 133 JAVASCRIPT_LIBRARIES=app/assets/javascripts/d3.v2.js \
133 app/assets/javascripts/d3.v2.min.js app/assets/javascripts/yui 134 app/assets/javascripts/d3.v2.min.js app/assets/javascripts/yui
134 DATE=$(shell date -u) 135 DATE=$(shell date -u)
135 APPCACHE=build-shared/juju-ui/assets/manifest.appcache
136 136
137 # Some environments, notably sudo, do not populate the default PWD environment 137 # Some environments, notably sudo, do not populate the default PWD environment
138 # variable, which is used to set $(PWD). Worse, in some situations, such as 138 # variable, which is used to set $(PWD). Worse, in some situations, such as
139 # using make -C [directory], $(PWD) is set to a value we don't want: the 139 # using make -C [directory], $(PWD) is set to a value we don't want: the
140 # directory in which make was invoked, rather than the directory of this file. 140 # directory in which make was invoked, rather than the directory of this file.
141 # Therefore, we want to run the shell's pwd to get this Makefile's directory. 141 # Therefore, we want to run the shell's pwd to get this Makefile's directory.
142 # As an optimization, we stash this value in the local PWD variable. 142 # As an optimization, we stash this value in the local PWD variable.
143 PWD=$(shell pwd) 143 PWD=$(shell pwd)
144 144
145 all: build 145 all: build
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 # This leaves out all of the individual YUI assets, because we can't have them 300 # This leaves out all of the individual YUI assets, because we can't have them
301 # the first time the Makefile is run in a clean tree. 301 # the first time the Makefile is run in a clean tree.
302 shared-link-files-list=build-$(1)/juju-ui/assets/combined-css \ 302 shared-link-files-list=build-$(1)/juju-ui/assets/combined-css \
303 build-$(1)/favicon.ico \ 303 build-$(1)/favicon.ico \
304 build-$(1)/index.html \ 304 build-$(1)/index.html \
305 build-$(1)/juju-ui/assets/config.js \ 305 build-$(1)/juju-ui/assets/config.js \
306 build-$(1)/juju-ui/assets/modules.js \ 306 build-$(1)/juju-ui/assets/modules.js \
307 build-$(1)/juju-ui/assets/images \ 307 build-$(1)/juju-ui/assets/images \
308 build-$(1)/juju-ui/assets/svgs \ 308 build-$(1)/juju-ui/assets/svgs \
309 build-$(1)/juju-ui/version.js \ 309 build-$(1)/juju-ui/version.js \
310 build-$(1)/juju-ui/assets/manifest.appcache \
311 build-$(1)/juju-ui/assets/combined-css/all-static.css \ 310 build-$(1)/juju-ui/assets/combined-css/all-static.css \
312 build-$(1)/juju-ui/assets/juju-gui.css \ 311 build-$(1)/juju-ui/assets/juju-gui.css \
313 build-$(1)/juju-ui/assets/sprite.css \ 312 build-$(1)/juju-ui/assets/sprite.css \
314 build-$(1)/juju-ui/assets/sprite.png \ 313 build-$(1)/juju-ui/assets/sprite.png \
315 build-$(1)/juju-ui/assets/combined-css/rail-x.png \ 314 build-$(1)/juju-ui/assets/combined-css/rail-x.png \
316 build-$(1)/juju-ui/assets/all-yui.js 315 build-$(1)/juju-ui/assets/all-yui.js
317 316
318 LINK_DEBUG_FILES=$(call shared-link-files-list,debug) \ 317 LINK_DEBUG_FILES=$(call shared-link-files-list,debug) \
319 build-debug/juju-ui/app.js \ 318 build-debug/juju-ui/app.js \
320 build-debug/juju-ui/models \ 319 build-debug/juju-ui/models \
321 build-debug/juju-ui/store \ 320 build-debug/juju-ui/store \
322 build-debug/juju-ui/subapps \ 321 build-debug/juju-ui/subapps \
323 build-debug/juju-ui/views \ 322 build-debug/juju-ui/views \
324 build-debug/juju-ui/widgets \ 323 build-debug/juju-ui/widgets \
325 build-debug/juju-ui/assets/javascripts \ 324 build-debug/juju-ui/assets/javascripts \
326 build-debug/juju-ui/templates.js 325 build-debug/juju-ui/templates.js
327 326
328 LINK_PROD_FILES=$(call shared-link-files-list,prod) 327 LINK_PROD_FILES=$(call shared-link-files-list,prod)
329 328
330 # These are shared instructions between link-debug-files and link-prod-files. 329 # These are shared instructions between link-debug-files and link-prod-files.
331 define link-files 330 define link-files
332 mkdir -p build-$(1)/juju-ui/assets/combined-css 331 mkdir -p build-$(1)/juju-ui/assets/combined-css
333 ln -sf "$(PWD)/app/favicon.ico" build-$(1)/ 332 ln -sf "$(PWD)/app/favicon.ico" build-$(1)/
334 ln -sf "$(PWD)/app/index.html" build-$(1)/ 333 ln -sf "$(PWD)/app/index.html" build-$(1)/
335 ln -sf "$(PWD)/app/config-$(1).js" build-$(1)/juju-ui/assets/config.js 334 ln -sf "$(PWD)/app/config-$(1).js" build-$(1)/juju-ui/assets/config.js
336 ln -sf "$(PWD)/app/assets/images" build-$(1)/juju-ui/assets/ 335 ln -sf "$(PWD)/app/assets/images" build-$(1)/juju-ui/assets/
337 ln -sf "$(PWD)/app/assets/svgs" build-$(1)/juju-ui/assets/ 336 ln -sf "$(PWD)/app/assets/svgs" build-$(1)/juju-ui/assets/
338 ln -sf "$(PWD)/app/assets/javascripts" build-$(1)/juju-ui/assets/ 337 ln -sf "$(PWD)/app/assets/javascripts" build-$(1)/juju-ui/assets/
339 ln -sf "$(PWD)/build-shared/juju-ui/version.js" build-$(1)/juju-ui/ 338 ln -sf "$(PWD)/build-shared/juju-ui/version.js" build-$(1)/juju-ui/
340 ln -sf "$(PWD)/build-shared/juju-ui/assets/manifest.appcache" \
341 build-$(1)/juju-ui/assets/
342 ln -sf "$(PWD)/build-shared/juju-ui/assets/combined-css/all-static.css" \ 339 ln -sf "$(PWD)/build-shared/juju-ui/assets/combined-css/all-static.css" \
343 build-$(1)/juju-ui/assets/combined-css/ 340 build-$(1)/juju-ui/assets/combined-css/
344 ln -sf "$(PWD)/build-shared/juju-ui/assets/combined-css/rail-x.png" \ 341 ln -sf "$(PWD)/build-shared/juju-ui/assets/combined-css/rail-x.png" \
345 build-$(1)/juju-ui/assets/combined-css/ 342 build-$(1)/juju-ui/assets/combined-css/
346 ln -sf "$(PWD)/build-shared/juju-ui/assets/juju-gui.css" build-$(1)/juju -ui/assets/ 343 ln -sf "$(PWD)/build-shared/juju-ui/assets/juju-gui.css" build-$(1)/juju -ui/assets/
347 ln -sf "$(PWD)/build-shared/juju-ui/assets/sprite.css" build-$(1)/juju-u i/assets/ 344 ln -sf "$(PWD)/build-shared/juju-ui/assets/sprite.css" build-$(1)/juju-u i/assets/
348 ln -sf "$(PWD)/build-shared/juju-ui/assets/sprite.png" build-$(1)/juju-u i/assets/ 345 ln -sf "$(PWD)/build-shared/juju-ui/assets/sprite.png" build-$(1)/juju-u i/assets/
349 ln -sf "$(PWD)/node_modules/yui/event-simulate/event-simulate.js" \ 346 ln -sf "$(PWD)/node_modules/yui/event-simulate/event-simulate.js" \
350 build-$(1)/juju-ui/assets/ 347 build-$(1)/juju-ui/assets/
351 ln -sf "$(PWD)/node_modules/yui/node-event-simulate/node-event-simulate. js" \ 348 ln -sf "$(PWD)/node_modules/yui/node-event-simulate/node-event-simulate. js" \
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 rm -rf node_modules virtualenv 458 rm -rf node_modules virtualenv
462 459
463 clean-docs: 460 clean-docs:
464 make -C docs clean 461 make -C docs clean
465 rm -rf yuidoc 462 rm -rf yuidoc
466 463
467 clean-all: clean clean-deps clean-docs 464 clean-all: clean clean-deps clean-docs
468 465
469 build: build-prod build-debug build-devel 466 build: build-prod build-debug build-devel
470 467
471 build-shared: $(APPCACHE) $(NODE_TARGETS) spritegen \ 468 build-shared: build-shared/juju-ui/assets $(NODE_TARGETS) spritegen \
472 $(NON_SPRITE_IMAGES) $(BUILD_FILES) build-shared/juju-ui/version.js 469 $(NON_SPRITE_IMAGES) $(BUILD_FILES) build-shared/juju-ui/version.js
473 470
474 # build-devel is phony. build-shared, build-debug, and build-common are real. 471 # build-devel is phony. build-shared, build-debug, and build-common are real.
475 build-devel: build-shared 472 build-devel: build-shared
476 473
477 build-debug: build-shared | $(LINK_DEBUG_FILES) 474 build-debug: build-shared | $(LINK_DEBUG_FILES)
478 475
479 build-prod: build-shared | $(LINK_PROD_FILES) 476 build-prod: build-shared | $(LINK_PROD_FILES)
480 477
481 $(APPCACHE): manifest.appcache.in 478 build-shared/juju-ui/assets:
482 mkdir -p build-shared/juju-ui/assets 479 mkdir -p build-shared/juju-ui/assets
483 cp manifest.appcache.in $(APPCACHE)
484 sed -re 's/^\# TIMESTAMP .+$$/\# TIMESTAMP $(DATE)/' -i $(APPCACHE)
485 480
486 # This really depends on CHANGES.yaml, the bzr revno changing, and the build 481 # This really depends on CHANGES.yaml, the bzr revno changing, and the build
487 # /juju-ui directory existing. We are vaguely trying to approximate the second 482 # /juju-ui directory existing. We are vaguely trying to approximate the second
488 # one by connecting it to our pertinent versioned files. The appcache target 483 # one by connecting it to our pertinent versioned files. The first target
489 # creates the third, and directories are a bit tricky with Makefiles so we are 484 # creates the directory, and directories are a bit tricky with Makefiles so we
490 # OK with that. The ULTIMATE_VERSION is used here because we always want the 485 # are OK with that. The ULTIMATE_VERSION is used here because we always want
491 # version.js file to reflect the top-most entry in the CHANGES.yaml file, 486 # the version.js file to reflect the top-most entry in the CHANGES.yaml file,
492 # regardless of whether we are doing a "Stable" or "Development" release. 487 # regardless of whether we are doing a "Stable" or "Development" release.
493 build-shared/juju-ui/version.js: $(APPCACHE) CHANGES.yaml $(JSFILES) $(TEMPLATE_ TARGETS) \ 488 build-shared/juju-ui/version.js: build-shared/juju-ui/assets CHANGES.yaml $(JSFI LES) $(TEMPLATE_TARGETS) \
494 $(SPRITE_SOURCE_FILES) 489 $(SPRITE_SOURCE_FILES)
495 echo "var jujuGuiVersionInfo=['$(ULTIMATE_VERSION)', '$(BZR_REVNO)'];" \ 490 echo "var jujuGuiVersionInfo=['$(ULTIMATE_VERSION)', '$(BZR_REVNO)'];" \
496 > build-shared/juju-ui/version.js 491 > build-shared/juju-ui/version.js
497 492
498 upload_release.py: 493 upload_release.py:
499 bzr cat lp:launchpadlib/contrib/upload_release_tarball.py \ 494 bzr cat lp:launchpadlib/contrib/upload_release_tarball.py \
500 > upload_release.py 495 > upload_release.py
501 496
502 $(RELEASE_FILE): build 497 $(RELEASE_FILE): build
503 @echo "$(BRANCH_IS_CLEAN)" 498 @echo "$(BRANCH_IS_CLEAN)"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 @echo "To create and upload an NPM cache file to Launchpad you must" 572 @echo "To create and upload an NPM cache file to Launchpad you must"
578 @echo "be in a branch of lp:juju-gui without uncommitted/unpushed" 573 @echo "be in a branch of lp:juju-gui without uncommitted/unpushed"
579 @echo "changes, or you must override one of the pertinent variable " 574 @echo "changes, or you must override one of the pertinent variable "
580 @echo "names to force an upload." 575 @echo "names to force an upload."
581 @echo 576 @echo
582 @echo "See docs/process.rst for more information" 577 @echo "See docs/process.rst for more information"
583 @echo 578 @echo
584 @false 579 @false
585 endif 580 endif
586 581
587 appcache: $(APPCACHE)
588
589 # A target used only for forcibly updating the appcache.
590 appcache-touch:
591 touch app/index.html
592 touch manifest.appcache.in
593
594 # This is the real target. appcache-touch needs to be executed before
595 # appcache, and this provides the correct order.
596 appcache-force: appcache-touch $(APPCACHE)
597
598 # targets are alphabetically sorted, they like it that way :-) 582 # targets are alphabetically sorted, they like it that way :-)
599 .PHONY: appcache-force appcache-touch beautify build build-files \ 583 .PHONY: beautify build build-files build-devel clean clean-all clean-deps \
600 » build-devel clean clean-all clean-deps clean-docs code-doc debug \ 584 » clean-docs code-doc debug devel docs dist gjslint help \
601 » devel docs dist gjslint help install-npm-packages jshint lint \ 585 » install-npm-packages jshint lint main-doc npm-cache npm-cache-file \
602 » main-doc npm-cache npm-cache-file prep prod recess server spritegen \ 586 » prep prod recess server spritegen test test-debug test-prep \
603 » test test-debug test-prep test-prod undocumented view-code-doc \ 587 » test-prod undocumented view-code-doc view-docs view-main-doc \
604 » view-docs view-main-doc yuidoc-lint 588 » yuidoc-lint
605 589
606 .DEFAULT_GOAL := all 590 .DEFAULT_GOAL := all
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b