embeditor-rails 1.1.1 → 2.0.0.beta
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +25 -17
- data/app/assets/javascripts/embeditor/adapter.js.coffee +21 -2
- data/app/assets/javascripts/embeditor/adapters/embedly.js.coffee +4 -40
- data/app/assets/javascripts/embeditor/adapters/oembed.js.coffee +37 -2
- data/app/assets/javascripts/embeditor/embeditor.js.coffee +16 -4
- data/lib/embeditor-rails/version.rb +1 -1
- data/lib/node_modules/npm/AUTHORS +158 -0
- data/lib/node_modules/npm/CONTRIBUTING.md +9 -0
- data/lib/node_modules/npm/LICENSE +235 -0
- data/lib/node_modules/npm/Makefile +216 -0
- data/lib/node_modules/npm/README.md +241 -0
- data/lib/node_modules/npm/bin/node-gyp-bin/node-gyp +2 -0
- data/lib/node_modules/npm/bin/node-gyp-bin/node-gyp.cmd +1 -0
- data/lib/node_modules/npm/bin/npm +13 -0
- data/lib/node_modules/npm/bin/npm-cli.js +87 -0
- data/lib/node_modules/npm/bin/npm.cmd +6 -0
- data/lib/node_modules/npm/bin/read-package-json.js +22 -0
- data/lib/node_modules/npm/cli.js +2 -0
- data/lib/node_modules/npm/configure +33 -0
- data/lib/node_modules/npm/doc/api/npm-bin.md +13 -0
- data/lib/node_modules/npm/doc/api/npm-bugs.md +19 -0
- data/lib/node_modules/npm/doc/api/npm-commands.md +22 -0
- data/lib/node_modules/npm/doc/api/npm-config.md +45 -0
- data/lib/node_modules/npm/doc/api/npm-deprecate.md +34 -0
- data/lib/node_modules/npm/doc/api/npm-docs.md +19 -0
- data/lib/node_modules/npm/doc/api/npm-edit.md +24 -0
- data/lib/node_modules/npm/doc/api/npm-explore.md +18 -0
- data/lib/node_modules/npm/doc/api/npm-help-search.md +30 -0
- data/lib/node_modules/npm/doc/api/npm-init.md +29 -0
- data/lib/node_modules/npm/doc/api/npm-install.md +19 -0
- data/lib/node_modules/npm/doc/api/npm-link.md +33 -0
- data/lib/node_modules/npm/doc/api/npm-load.md +26 -0
- data/lib/node_modules/npm/doc/api/npm-ls.md +56 -0
- data/lib/node_modules/npm/doc/api/npm-outdated.md +13 -0
- data/lib/node_modules/npm/doc/api/npm-owner.md +31 -0
- data/lib/node_modules/npm/doc/api/npm-pack.md +19 -0
- data/lib/node_modules/npm/doc/api/npm-prefix.md +15 -0
- data/lib/node_modules/npm/doc/api/npm-prune.md +17 -0
- data/lib/node_modules/npm/doc/api/npm-publish.md +30 -0
- data/lib/node_modules/npm/doc/api/npm-rebuild.md +16 -0
- data/lib/node_modules/npm/doc/api/npm-repo.md +19 -0
- data/lib/node_modules/npm/doc/api/npm-restart.md +22 -0
- data/lib/node_modules/npm/doc/api/npm-root.md +15 -0
- data/lib/node_modules/npm/doc/api/npm-run-script.md +27 -0
- data/lib/node_modules/npm/doc/api/npm-search.md +35 -0
- data/lib/node_modules/npm/doc/api/npm-shrinkwrap.md +20 -0
- data/lib/node_modules/npm/doc/api/npm-start.md +13 -0
- data/lib/node_modules/npm/doc/api/npm-stop.md +13 -0
- data/lib/node_modules/npm/doc/api/npm-submodule.md +28 -0
- data/lib/node_modules/npm/doc/api/npm-tag.md +23 -0
- data/lib/node_modules/npm/doc/api/npm-test.md +16 -0
- data/lib/node_modules/npm/doc/api/npm-uninstall.md +16 -0
- data/lib/node_modules/npm/doc/api/npm-unpublish.md +20 -0
- data/lib/node_modules/npm/doc/api/npm-update.md +11 -0
- data/lib/node_modules/npm/doc/api/npm-version.md +18 -0
- data/lib/node_modules/npm/doc/api/npm-view.md +93 -0
- data/lib/node_modules/npm/doc/api/npm-whoami.md +15 -0
- data/lib/node_modules/npm/doc/api/npm.md +116 -0
- data/lib/node_modules/npm/doc/cli/npm-adduser.md +38 -0
- data/lib/node_modules/npm/doc/cli/npm-bin.md +19 -0
- data/lib/node_modules/npm/doc/cli/npm-bugs.md +42 -0
- data/lib/node_modules/npm/doc/cli/npm-build.md +22 -0
- data/lib/node_modules/npm/doc/cli/npm-bundle.md +14 -0
- data/lib/node_modules/npm/doc/cli/npm-cache.md +72 -0
- data/lib/node_modules/npm/doc/cli/npm-completion.md +29 -0
- data/lib/node_modules/npm/doc/cli/npm-config.md +71 -0
- data/lib/node_modules/npm/doc/cli/npm-dedupe.md +58 -0
- data/lib/node_modules/npm/doc/cli/npm-deprecate.md +26 -0
- data/lib/node_modules/npm/doc/cli/npm-docs.md +44 -0
- data/lib/node_modules/npm/doc/cli/npm-edit.md +37 -0
- data/lib/node_modules/npm/doc/cli/npm-explore.md +40 -0
- data/lib/node_modules/npm/doc/cli/npm-help-search.md +35 -0
- data/lib/node_modules/npm/doc/cli/npm-help.md +40 -0
- data/lib/node_modules/npm/doc/cli/npm-init.md +25 -0
- data/lib/node_modules/npm/doc/cli/npm-install.md +252 -0
- data/lib/node_modules/npm/doc/cli/npm-link.md +63 -0
- data/lib/node_modules/npm/doc/cli/npm-ls.md +80 -0
- data/lib/node_modules/npm/doc/cli/npm-outdated.md +58 -0
- data/lib/node_modules/npm/doc/cli/npm-owner.md +33 -0
- data/lib/node_modules/npm/doc/cli/npm-pack.md +27 -0
- data/lib/node_modules/npm/doc/cli/npm-prefix.md +19 -0
- data/lib/node_modules/npm/doc/cli/npm-prune.md +25 -0
- data/lib/node_modules/npm/doc/cli/npm-publish.md +30 -0
- data/lib/node_modules/npm/doc/cli/npm-rebuild.md +21 -0
- data/lib/node_modules/npm/doc/cli/npm-repo.md +28 -0
- data/lib/node_modules/npm/doc/cli/npm-restart.md +22 -0
- data/lib/node_modules/npm/doc/cli/npm-rm.md +23 -0
- data/lib/node_modules/npm/doc/cli/npm-root.md +19 -0
- data/lib/node_modules/npm/doc/cli/npm-run-script.md +21 -0
- data/lib/node_modules/npm/doc/cli/npm-search.md +36 -0
- data/lib/node_modules/npm/doc/cli/npm-shrinkwrap.md +185 -0
- data/lib/node_modules/npm/doc/cli/npm-star.md +22 -0
- data/lib/node_modules/npm/doc/cli/npm-stars.md +22 -0
- data/lib/node_modules/npm/doc/cli/npm-start.md +18 -0
- data/lib/node_modules/npm/doc/cli/npm-stop.md +18 -0
- data/lib/node_modules/npm/doc/cli/npm-submodule.md +28 -0
- data/lib/node_modules/npm/doc/cli/npm-tag.md +34 -0
- data/lib/node_modules/npm/doc/cli/npm-test.md +22 -0
- data/lib/node_modules/npm/doc/cli/npm-uninstall.md +21 -0
- data/lib/node_modules/npm/doc/cli/npm-unpublish.md +32 -0
- data/lib/node_modules/npm/doc/cli/npm-update.md +24 -0
- data/lib/node_modules/npm/doc/cli/npm-version.md +45 -0
- data/lib/node_modules/npm/doc/cli/npm-view.md +90 -0
- data/lib/node_modules/npm/doc/cli/npm-whoami.md +17 -0
- data/lib/node_modules/npm/doc/cli/npm.md +153 -0
- data/lib/node_modules/npm/doc/files/npm-folders.md +211 -0
- data/lib/node_modules/npm/doc/files/npmrc.md +59 -0
- data/lib/node_modules/npm/doc/files/package.json.md +576 -0
- data/lib/node_modules/npm/doc/misc/npm-coding-style.md +181 -0
- data/lib/node_modules/npm/doc/misc/npm-config.md +820 -0
- data/lib/node_modules/npm/doc/misc/npm-developers.md +207 -0
- data/lib/node_modules/npm/doc/misc/npm-disputes.md +99 -0
- data/lib/node_modules/npm/doc/misc/npm-faq.md +364 -0
- data/lib/node_modules/npm/doc/misc/npm-index.md +411 -0
- data/lib/node_modules/npm/doc/misc/npm-registry.md +69 -0
- data/lib/node_modules/npm/doc/misc/npm-scripts.md +245 -0
- data/lib/node_modules/npm/doc/misc/removing-npm.md +54 -0
- data/lib/node_modules/npm/doc/misc/semver.md +111 -0
- data/lib/node_modules/npm/html/doc/README.html +276 -0
- data/lib/node_modules/npm/html/doc/api/npm-bin.html +53 -0
- data/lib/node_modules/npm/html/doc/api/npm-bugs.html +59 -0
- data/lib/node_modules/npm/html/doc/api/npm-commands.html +62 -0
- data/lib/node_modules/npm/html/doc/api/npm-config.html +67 -0
- data/lib/node_modules/npm/html/doc/api/npm-deprecate.html +66 -0
- data/lib/node_modules/npm/html/doc/api/npm-docs.html +59 -0
- data/lib/node_modules/npm/html/doc/api/npm-edit.html +64 -0
- data/lib/node_modules/npm/html/doc/api/npm-explore.html +58 -0
- data/lib/node_modules/npm/html/doc/api/npm-help-search.html +66 -0
- data/lib/node_modules/npm/html/doc/api/npm-init.html +69 -0
- data/lib/node_modules/npm/html/doc/api/npm-install.html +59 -0
- data/lib/node_modules/npm/html/doc/api/npm-link.html +73 -0
- data/lib/node_modules/npm/html/doc/api/npm-load.html +66 -0
- data/lib/node_modules/npm/html/doc/api/npm-ls.html +93 -0
- data/lib/node_modules/npm/html/doc/api/npm-outdated.html +53 -0
- data/lib/node_modules/npm/html/doc/api/npm-owner.html +68 -0
- data/lib/node_modules/npm/html/doc/api/npm-pack.html +59 -0
- data/lib/node_modules/npm/html/doc/api/npm-prefix.html +55 -0
- data/lib/node_modules/npm/html/doc/api/npm-prune.html +57 -0
- data/lib/node_modules/npm/html/doc/api/npm-publish.html +66 -0
- data/lib/node_modules/npm/html/doc/api/npm-rebuild.html +56 -0
- data/lib/node_modules/npm/html/doc/api/npm-repo.html +59 -0
- data/lib/node_modules/npm/html/doc/api/npm-restart.html +61 -0
- data/lib/node_modules/npm/html/doc/api/npm-root.html +55 -0
- data/lib/node_modules/npm/html/doc/api/npm-run-script.html +63 -0
- data/lib/node_modules/npm/html/doc/api/npm-search.html +66 -0
- data/lib/node_modules/npm/html/doc/api/npm-shrinkwrap.html +60 -0
- data/lib/node_modules/npm/html/doc/api/npm-start.html +53 -0
- data/lib/node_modules/npm/html/doc/api/npm-stop.html +53 -0
- data/lib/node_modules/npm/html/doc/api/npm-submodule.html +67 -0
- data/lib/node_modules/npm/html/doc/api/npm-tag.html +63 -0
- data/lib/node_modules/npm/html/doc/api/npm-test.html +56 -0
- data/lib/node_modules/npm/html/doc/api/npm-uninstall.html +56 -0
- data/lib/node_modules/npm/html/doc/api/npm-unpublish.html +60 -0
- data/lib/node_modules/npm/html/doc/api/npm-update.html +52 -0
- data/lib/node_modules/npm/html/doc/api/npm-version.html +58 -0
- data/lib/node_modules/npm/html/doc/api/npm-view.html +133 -0
- data/lib/node_modules/npm/html/doc/api/npm-whoami.html +55 -0
- data/lib/node_modules/npm/html/doc/api/npm.html +126 -0
- data/lib/node_modules/npm/html/doc/cli/npm-adduser.html +73 -0
- data/lib/node_modules/npm/html/doc/cli/npm-bin.html +54 -0
- data/lib/node_modules/npm/html/doc/cli/npm-bugs.html +72 -0
- data/lib/node_modules/npm/html/doc/cli/npm-build.html +59 -0
- data/lib/node_modules/npm/html/doc/cli/npm-bundle.html +54 -0
- data/lib/node_modules/npm/html/doc/cli/npm-cache.html +100 -0
- data/lib/node_modules/npm/html/doc/cli/npm-completion.html +67 -0
- data/lib/node_modules/npm/html/doc/cli/npm-config.html +107 -0
- data/lib/node_modules/npm/html/doc/cli/npm-dedupe.html +96 -0
- data/lib/node_modules/npm/html/doc/cli/npm-deprecate.html +65 -0
- data/lib/node_modules/npm/html/doc/cli/npm-docs.html +75 -0
- data/lib/node_modules/npm/html/doc/cli/npm-edit.html +71 -0
- data/lib/node_modules/npm/html/doc/cli/npm-explore.html +74 -0
- data/lib/node_modules/npm/html/doc/cli/npm-help-search.html +72 -0
- data/lib/node_modules/npm/html/doc/cli/npm-help.html +70 -0
- data/lib/node_modules/npm/html/doc/cli/npm-init.html +63 -0
- data/lib/node_modules/npm/html/doc/cli/npm-install.html +183 -0
- data/lib/node_modules/npm/html/doc/cli/npm-link.html +96 -0
- data/lib/node_modules/npm/html/doc/cli/npm-ls.html +108 -0
- data/lib/node_modules/npm/html/doc/cli/npm-outdated.html +92 -0
- data/lib/node_modules/npm/html/doc/cli/npm-owner.html +68 -0
- data/lib/node_modules/npm/html/doc/cli/npm-pack.html +63 -0
- data/lib/node_modules/npm/html/doc/cli/npm-prefix.html +54 -0
- data/lib/node_modules/npm/html/doc/cli/npm-prune.html +63 -0
- data/lib/node_modules/npm/html/doc/cli/npm-publish.html +63 -0
- data/lib/node_modules/npm/html/doc/cli/npm-rebuild.html +60 -0
- data/lib/node_modules/npm/html/doc/cli/npm-repo.html +66 -0
- data/lib/node_modules/npm/html/doc/cli/npm-restart.html +58 -0
- data/lib/node_modules/npm/html/doc/cli/npm-rm.html +58 -0
- data/lib/node_modules/npm/html/doc/cli/npm-root.html +54 -0
- data/lib/node_modules/npm/html/doc/cli/npm-run-script.html +57 -0
- data/lib/node_modules/npm/html/doc/cli/npm-search.html +71 -0
- data/lib/node_modules/npm/html/doc/cli/npm-shrinkwrap.html +217 -0
- data/lib/node_modules/npm/html/doc/cli/npm-star.html +60 -0
- data/lib/node_modules/npm/html/doc/cli/npm-stars.html +59 -0
- data/lib/node_modules/npm/html/doc/cli/npm-start.html +54 -0
- data/lib/node_modules/npm/html/doc/cli/npm-stop.html +54 -0
- data/lib/node_modules/npm/html/doc/cli/npm-submodule.html +67 -0
- data/lib/node_modules/npm/html/doc/cli/npm-tag.html +68 -0
- data/lib/node_modules/npm/html/doc/cli/npm-test.html +58 -0
- data/lib/node_modules/npm/html/doc/cli/npm-uninstall.html +56 -0
- data/lib/node_modules/npm/html/doc/cli/npm-unpublish.html +68 -0
- data/lib/node_modules/npm/html/doc/cli/npm-update.html +60 -0
- data/lib/node_modules/npm/html/doc/cli/npm-version.html +83 -0
- data/lib/node_modules/npm/html/doc/cli/npm-view.html +125 -0
- data/lib/node_modules/npm/html/doc/cli/npm-whoami.html +54 -0
- data/lib/node_modules/npm/html/doc/cli/npm.html +165 -0
- data/lib/node_modules/npm/html/doc/files/npm-folders.html +239 -0
- data/lib/node_modules/npm/html/doc/files/npm-global.html +239 -0
- data/lib/node_modules/npm/html/doc/files/npm-json.html +580 -0
- data/lib/node_modules/npm/html/doc/files/npmrc.html +93 -0
- data/lib/node_modules/npm/html/doc/files/package.json.html +580 -0
- data/lib/node_modules/npm/html/doc/index.html +450 -0
- data/lib/node_modules/npm/html/doc/misc/npm-coding-style.html +216 -0
- data/lib/node_modules/npm/html/doc/misc/npm-config.html +744 -0
- data/lib/node_modules/npm/html/doc/misc/npm-developers.html +208 -0
- data/lib/node_modules/npm/html/doc/misc/npm-disputes.html +126 -0
- data/lib/node_modules/npm/html/doc/misc/npm-faq.html +382 -0
- data/lib/node_modules/npm/html/doc/misc/npm-index.html +450 -0
- data/lib/node_modules/npm/html/doc/misc/npm-registry.html +105 -0
- data/lib/node_modules/npm/html/doc/misc/npm-scripts.html +257 -0
- data/lib/node_modules/npm/html/doc/misc/removing-npm.html +92 -0
- data/lib/node_modules/npm/html/doc/misc/semver.html +128 -0
- data/lib/node_modules/npm/html/docfoot-script.html +31 -0
- data/lib/node_modules/npm/html/docfoot.html +2 -0
- data/lib/node_modules/npm/html/dochead.html +8 -0
- data/lib/node_modules/npm/html/favicon.ico +0 -0
- data/lib/node_modules/npm/html/index.html +95 -0
- data/lib/node_modules/npm/html/static/style.css +329 -0
- data/lib/node_modules/npm/lib/adduser.js +138 -0
- data/lib/node_modules/npm/lib/bin.js +18 -0
- data/lib/node_modules/npm/lib/bugs.js +61 -0
- data/lib/node_modules/npm/lib/build.js +228 -0
- data/lib/node_modules/npm/lib/cache.js +1318 -0
- data/lib/node_modules/npm/lib/completion.js +253 -0
- data/lib/node_modules/npm/lib/config.js +285 -0
- data/lib/node_modules/npm/lib/dedupe.js +357 -0
- data/lib/node_modules/npm/lib/deprecate.js +47 -0
- data/lib/node_modules/npm/lib/docs.js +62 -0
- data/lib/node_modules/npm/lib/edit.js +32 -0
- data/lib/node_modules/npm/lib/explore.js +36 -0
- data/lib/node_modules/npm/lib/faq.js +8 -0
- data/lib/node_modules/npm/lib/get.js +12 -0
- data/lib/node_modules/npm/lib/help-search.js +218 -0
- data/lib/node_modules/npm/lib/help.js +231 -0
- data/lib/node_modules/npm/lib/init.js +36 -0
- data/lib/node_modules/npm/lib/install.js +979 -0
- data/lib/node_modules/npm/lib/link.js +173 -0
- data/lib/node_modules/npm/lib/ls.js +357 -0
- data/lib/node_modules/npm/lib/npm.js +528 -0
- data/lib/node_modules/npm/lib/outdated.js +303 -0
- data/lib/node_modules/npm/lib/owner.js +205 -0
- data/lib/node_modules/npm/lib/pack.js +65 -0
- data/lib/node_modules/npm/lib/prefix.js +11 -0
- data/lib/node_modules/npm/lib/prune.js +53 -0
- data/lib/node_modules/npm/lib/publish.js +118 -0
- data/lib/node_modules/npm/lib/rebuild.js +75 -0
- data/lib/node_modules/npm/lib/repo.js +54 -0
- data/lib/node_modules/npm/lib/restart.js +1 -0
- data/lib/node_modules/npm/lib/root.js +11 -0
- data/lib/node_modules/npm/lib/run-script.js +102 -0
- data/lib/node_modules/npm/lib/search.js +265 -0
- data/lib/node_modules/npm/lib/set.js +13 -0
- data/lib/node_modules/npm/lib/shrinkwrap.js +86 -0
- data/lib/node_modules/npm/lib/star.js +33 -0
- data/lib/node_modules/npm/lib/stars.js +27 -0
- data/lib/node_modules/npm/lib/start.js +1 -0
- data/lib/node_modules/npm/lib/stop.js +1 -0
- data/lib/node_modules/npm/lib/submodule.js +119 -0
- data/lib/node_modules/npm/lib/substack.js +20 -0
- data/lib/node_modules/npm/lib/tag.js +18 -0
- data/lib/node_modules/npm/lib/test.js +14 -0
- data/lib/node_modules/npm/lib/unbuild.js +112 -0
- data/lib/node_modules/npm/lib/uninstall.js +127 -0
- data/lib/node_modules/npm/lib/unpublish.js +83 -0
- data/lib/node_modules/npm/lib/update.js +43 -0
- data/lib/node_modules/npm/lib/utils/completion.sh +54 -0
- data/lib/node_modules/npm/lib/utils/completion/file-completion.js +26 -0
- data/lib/node_modules/npm/lib/utils/completion/installed-deep.js +50 -0
- data/lib/node_modules/npm/lib/utils/completion/installed-shallow.js +79 -0
- data/lib/node_modules/npm/lib/utils/error-handler.js +343 -0
- data/lib/node_modules/npm/lib/utils/fetch.js +93 -0
- data/lib/node_modules/npm/lib/utils/find-prefix.js +57 -0
- data/lib/node_modules/npm/lib/utils/gently-rm.js +61 -0
- data/lib/node_modules/npm/lib/utils/is-git-url.js +13 -0
- data/lib/node_modules/npm/lib/utils/lifecycle.js +360 -0
- data/lib/node_modules/npm/lib/utils/link.js +39 -0
- data/lib/node_modules/npm/lib/utils/tar.js +323 -0
- data/lib/node_modules/npm/lib/version.js +120 -0
- data/lib/node_modules/npm/lib/view.js +246 -0
- data/lib/node_modules/npm/lib/visnup.js +42 -0
- data/lib/node_modules/npm/lib/whoami.js +13 -0
- data/lib/node_modules/npm/lib/xmas.js +56 -0
- data/lib/node_modules/npm/make.bat +3 -0
- data/lib/node_modules/npm/man/man1/npm-README.1 +328 -0
- data/lib/node_modules/npm/man/man1/npm-adduser.1 +63 -0
- data/lib/node_modules/npm/man/man1/npm-bin.1 +40 -0
- data/lib/node_modules/npm/man/man1/npm-bugs.1 +78 -0
- data/lib/node_modules/npm/man/man1/npm-build.1 +43 -0
- data/lib/node_modules/npm/man/man1/npm-bundle.1 +23 -0
- data/lib/node_modules/npm/man/man1/npm-cache.1 +104 -0
- data/lib/node_modules/npm/man/man1/npm-completion.1 +47 -0
- data/lib/node_modules/npm/man/man1/npm-config.1 +113 -0
- data/lib/node_modules/npm/man/man1/npm-dedupe.1 +96 -0
- data/lib/node_modules/npm/man/man1/npm-deprecate.1 +48 -0
- data/lib/node_modules/npm/man/man1/npm-docs.1 +78 -0
- data/lib/node_modules/npm/man/man1/npm-edit.1 +66 -0
- data/lib/node_modules/npm/man/man1/npm-explore.1 +76 -0
- data/lib/node_modules/npm/man/man1/npm-help-search.1 +59 -0
- data/lib/node_modules/npm/man/man1/npm-help.1 +77 -0
- data/lib/node_modules/npm/man/man1/npm-init.1 +43 -0
- data/lib/node_modules/npm/man/man1/npm-install.1 +434 -0
- data/lib/node_modules/npm/man/man1/npm-link.1 +119 -0
- data/lib/node_modules/npm/man/man1/npm-ls.1 +146 -0
- data/lib/node_modules/npm/man/man1/npm-outdated.1 +102 -0
- data/lib/node_modules/npm/man/man1/npm-owner.1 +58 -0
- data/lib/node_modules/npm/man/man1/npm-pack.1 +48 -0
- data/lib/node_modules/npm/man/man1/npm-prefix.1 +40 -0
- data/lib/node_modules/npm/man/man1/npm-prune.1 +42 -0
- data/lib/node_modules/npm/man/man1/npm-publish.1 +53 -0
- data/lib/node_modules/npm/man/man1/npm-rebuild.1 +37 -0
- data/lib/node_modules/npm/man/man1/npm-repo.1 +47 -0
- data/lib/node_modules/npm/man/man1/npm-restart.1 +42 -0
- data/lib/node_modules/npm/man/man1/npm-rm.1 +44 -0
- data/lib/node_modules/npm/man/man1/npm-root.1 +40 -0
- data/lib/node_modules/npm/man/man1/npm-run-script.1 +41 -0
- data/lib/node_modules/npm/man/man1/npm-search.1 +62 -0
- data/lib/node_modules/npm/man/man1/npm-shrinkwrap.1 +275 -0
- data/lib/node_modules/npm/man/man1/npm-star.1 +39 -0
- data/lib/node_modules/npm/man/man1/npm-stars.1 +40 -0
- data/lib/node_modules/npm/man/man1/npm-start.1 +37 -0
- data/lib/node_modules/npm/man/man1/npm-stop.1 +37 -0
- data/lib/node_modules/npm/man/man1/npm-submodule.1 +42 -0
- data/lib/node_modules/npm/man/man1/npm-tag.1 +74 -0
- data/lib/node_modules/npm/man/man1/npm-test.1 +42 -0
- data/lib/node_modules/npm/man/man1/npm-uninstall.1 +42 -0
- data/lib/node_modules/npm/man/man1/npm-unpublish.1 +53 -0
- data/lib/node_modules/npm/man/man1/npm-update.1 +45 -0
- data/lib/node_modules/npm/man/man1/npm-version.1 +75 -0
- data/lib/node_modules/npm/man/man1/npm-view.1 +186 -0
- data/lib/node_modules/npm/man/man1/npm-whoami.1 +34 -0
- data/lib/node_modules/npm/man/man1/npm.1 +230 -0
- data/lib/node_modules/npm/man/man3/npm-bin.3 +21 -0
- data/lib/node_modules/npm/man/man3/npm-bugs.3 +28 -0
- data/lib/node_modules/npm/man/man3/npm-commands.3 +35 -0
- data/lib/node_modules/npm/man/man3/npm-config.3 +69 -0
- data/lib/node_modules/npm/man/man3/npm-deprecate.3 +57 -0
- data/lib/node_modules/npm/man/man3/npm-docs.3 +28 -0
- data/lib/node_modules/npm/man/man3/npm-edit.3 +35 -0
- data/lib/node_modules/npm/man/man3/npm-explore.3 +28 -0
- data/lib/node_modules/npm/man/man3/npm-help-search.3 +51 -0
- data/lib/node_modules/npm/man/man3/npm-init.3 +39 -0
- data/lib/node_modules/npm/man/man3/npm-install.3 +29 -0
- data/lib/node_modules/npm/man/man3/npm-link.3 +53 -0
- data/lib/node_modules/npm/man/man3/npm-load.3 +44 -0
- data/lib/node_modules/npm/man/man3/npm-ls.3 +86 -0
- data/lib/node_modules/npm/man/man3/npm-outdated.3 +21 -0
- data/lib/node_modules/npm/man/man3/npm-owner.3 +52 -0
- data/lib/node_modules/npm/man/man3/npm-pack.3 +28 -0
- data/lib/node_modules/npm/man/man3/npm-prefix.3 +24 -0
- data/lib/node_modules/npm/man/man3/npm-prune.3 +27 -0
- data/lib/node_modules/npm/man/man3/npm-publish.3 +51 -0
- data/lib/node_modules/npm/man/man3/npm-rebuild.3 +22 -0
- data/lib/node_modules/npm/man/man3/npm-repo.3 +28 -0
- data/lib/node_modules/npm/man/man3/npm-restart.3 +37 -0
- data/lib/node_modules/npm/man/man3/npm-root.3 +24 -0
- data/lib/node_modules/npm/man/man3/npm-run-script.3 +48 -0
- data/lib/node_modules/npm/man/man3/npm-search.3 +64 -0
- data/lib/node_modules/npm/man/man3/npm-shrinkwrap.3 +30 -0
- data/lib/node_modules/npm/man/man3/npm-start.3 +21 -0
- data/lib/node_modules/npm/man/man3/npm-stop.3 +21 -0
- data/lib/node_modules/npm/man/man3/npm-submodule.3 +42 -0
- data/lib/node_modules/npm/man/man3/npm-tag.3 +31 -0
- data/lib/node_modules/npm/man/man3/npm-test.3 +25 -0
- data/lib/node_modules/npm/man/man3/npm-uninstall.3 +25 -0
- data/lib/node_modules/npm/man/man3/npm-unpublish.3 +30 -0
- data/lib/node_modules/npm/man/man3/npm-update.3 +18 -0
- data/lib/node_modules/npm/man/man3/npm-version.3 +27 -0
- data/lib/node_modules/npm/man/man3/npm-view.3 +176 -0
- data/lib/node_modules/npm/man/man3/npm-whoami.3 +24 -0
- data/lib/node_modules/npm/man/man3/npm.3 +162 -0
- data/lib/node_modules/npm/man/man5/npm-folders.5 +264 -0
- data/lib/node_modules/npm/man/man5/npm-global.5 +264 -0
- data/lib/node_modules/npm/man/man5/npm-json.5 +807 -0
- data/lib/node_modules/npm/man/man5/npmrc.5 +89 -0
- data/lib/node_modules/npm/man/man5/package.json.5 +807 -0
- data/lib/node_modules/npm/man/man7/npm-coding-style.7 +254 -0
- data/lib/node_modules/npm/man/man7/npm-config.7 +1445 -0
- data/lib/node_modules/npm/man/man7/npm-developers.7 +335 -0
- data/lib/node_modules/npm/man/man7/npm-disputes.7 +146 -0
- data/lib/node_modules/npm/man/man7/npm-faq.7 +479 -0
- data/lib/node_modules/npm/man/man7/npm-index.7 +307 -0
- data/lib/node_modules/npm/man/man7/npm-registry.7 +82 -0
- data/lib/node_modules/npm/man/man7/npm-scripts.7 +354 -0
- data/lib/node_modules/npm/man/man7/removing-npm.7 +107 -0
- data/lib/node_modules/npm/man/man7/semver.7 +172 -0
- data/lib/node_modules/npm/node_modules/abbrev/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/abbrev/README.md +23 -0
- data/lib/node_modules/npm/node_modules/abbrev/lib/abbrev.js +111 -0
- data/lib/node_modules/npm/node_modules/abbrev/package.json +25 -0
- data/lib/node_modules/npm/node_modules/ansi/README.md +91 -0
- data/lib/node_modules/npm/node_modules/ansi/color-spaces.pl +67 -0
- data/lib/node_modules/npm/node_modules/ansi/examples/beep/index.js +16 -0
- data/lib/node_modules/npm/node_modules/ansi/examples/clear/index.js +15 -0
- data/lib/node_modules/npm/node_modules/ansi/examples/cursorPosition.js +32 -0
- data/lib/node_modules/npm/node_modules/ansi/examples/progress/index.js +87 -0
- data/lib/node_modules/npm/node_modules/ansi/examples/starwars.js +46 -0
- data/lib/node_modules/npm/node_modules/ansi/lib/ansi.js +405 -0
- data/lib/node_modules/npm/node_modules/ansi/lib/newlines.js +71 -0
- data/lib/node_modules/npm/node_modules/ansi/package.json +50 -0
- data/lib/node_modules/npm/node_modules/ansicolors/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/ansicolors/README.md +62 -0
- data/lib/node_modules/npm/node_modules/ansicolors/ansicolors.js +65 -0
- data/lib/node_modules/npm/node_modules/ansicolors/package.json +34 -0
- data/lib/node_modules/npm/node_modules/ansistyles/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/ansistyles/README.md +71 -0
- data/lib/node_modules/npm/node_modules/ansistyles/ansistyles.js +38 -0
- data/lib/node_modules/npm/node_modules/ansistyles/package.json +38 -0
- data/lib/node_modules/npm/node_modules/archy/README.markdown +92 -0
- data/lib/node_modules/npm/node_modules/archy/index.js +35 -0
- data/lib/node_modules/npm/node_modules/archy/package.json +52 -0
- data/lib/node_modules/npm/node_modules/block-stream/LICENCE +25 -0
- data/lib/node_modules/npm/node_modules/block-stream/README.md +14 -0
- data/lib/node_modules/npm/node_modules/block-stream/bench/block-stream-pause.js +70 -0
- data/lib/node_modules/npm/node_modules/block-stream/bench/block-stream.js +68 -0
- data/lib/node_modules/npm/node_modules/block-stream/bench/dropper-pause.js +70 -0
- data/lib/node_modules/npm/node_modules/block-stream/bench/dropper.js +68 -0
- data/lib/node_modules/npm/node_modules/block-stream/block-stream.js +209 -0
- data/lib/node_modules/npm/node_modules/block-stream/package.json +35 -0
- data/lib/node_modules/npm/node_modules/child-process-close/README.md +45 -0
- data/lib/node_modules/npm/node_modules/child-process-close/index.js +48 -0
- data/lib/node_modules/npm/node_modules/child-process-close/package.json +37 -0
- data/lib/node_modules/npm/node_modules/chmodr/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/chmodr/README.md +3 -0
- data/lib/node_modules/npm/node_modules/chmodr/chmodr.js +54 -0
- data/lib/node_modules/npm/node_modules/chmodr/package.json +28 -0
- data/lib/node_modules/npm/node_modules/chownr/LICENCE +25 -0
- data/lib/node_modules/npm/node_modules/chownr/README.md +3 -0
- data/lib/node_modules/npm/node_modules/chownr/chownr.js +41 -0
- data/lib/node_modules/npm/node_modules/chownr/package.json +42 -0
- data/lib/node_modules/npm/node_modules/cmd-shim/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/cmd-shim/README.md +42 -0
- data/lib/node_modules/npm/node_modules/cmd-shim/index.js +180 -0
- data/lib/node_modules/npm/node_modules/cmd-shim/package.json +35 -0
- data/lib/node_modules/npm/node_modules/columnify/Readme.md +189 -0
- data/lib/node_modules/npm/node_modules/columnify/index.js +210 -0
- data/lib/node_modules/npm/node_modules/columnify/package.json +42 -0
- data/lib/node_modules/npm/node_modules/columnify/utils.js +76 -0
- data/lib/node_modules/npm/node_modules/editor/LICENSE +18 -0
- data/lib/node_modules/npm/node_modules/editor/README.markdown +54 -0
- data/lib/node_modules/npm/node_modules/editor/example/beep.json +5 -0
- data/lib/node_modules/npm/node_modules/editor/example/edit.js +4 -0
- data/lib/node_modules/npm/node_modules/editor/index.js +26 -0
- data/lib/node_modules/npm/node_modules/editor/package.json +43 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/LICENCE +25 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/README.md +18 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/example/bundle.js +13 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/example/dir-tar.js +19 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/example/dir.js +25 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/example/example.js +12 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/example/ig-tar.js +19 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/example/tar.js +25 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/fstream-npm.js +323 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/README.md +22 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/example/basic.js +13 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/ignore.js +275 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/package.json +40 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/package.json +27 -0
- data/lib/node_modules/npm/node_modules/fstream/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/fstream/README.md +76 -0
- data/lib/node_modules/npm/node_modules/fstream/examples/filter-pipe.js +131 -0
- data/lib/node_modules/npm/node_modules/fstream/examples/pipe.js +115 -0
- data/lib/node_modules/npm/node_modules/fstream/examples/reader.js +54 -0
- data/lib/node_modules/npm/node_modules/fstream/examples/symlink-write.js +24 -0
- data/lib/node_modules/npm/node_modules/fstream/fstream.js +31 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/abstract.js +85 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/collect.js +67 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/dir-reader.js +251 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js +171 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/file-reader.js +147 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/file-writer.js +100 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/get-type.js +32 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/link-reader.js +54 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/link-writer.js +95 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/proxy-reader.js +93 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/proxy-writer.js +109 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/reader.js +260 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/socket-reader.js +38 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/writer.js +389 -0
- data/lib/node_modules/npm/node_modules/fstream/package.json +43 -0
- data/lib/node_modules/npm/node_modules/github-url-from-git/History.md +10 -0
- data/lib/node_modules/npm/node_modules/github-url-from-git/Makefile +5 -0
- data/lib/node_modules/npm/node_modules/github-url-from-git/Readme.md +41 -0
- data/lib/node_modules/npm/node_modules/github-url-from-git/index.js +12 -0
- data/lib/node_modules/npm/node_modules/github-url-from-git/package.json +31 -0
- data/lib/node_modules/npm/node_modules/github-url-from-git/test.js +40 -0
- data/lib/node_modules/npm/node_modules/github-url-from-username-repo/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/github-url-from-username-repo/README.md +14 -0
- data/lib/node_modules/npm/node_modules/github-url-from-username-repo/index.js +9 -0
- data/lib/node_modules/npm/node_modules/github-url-from-username-repo/package.json +33 -0
- data/lib/node_modules/npm/node_modules/glob/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/glob/README.md +250 -0
- data/lib/node_modules/npm/node_modules/glob/examples/g.js +9 -0
- data/lib/node_modules/npm/node_modules/glob/examples/usr-local.js +9 -0
- data/lib/node_modules/npm/node_modules/glob/glob.js +680 -0
- data/lib/node_modules/npm/node_modules/glob/package.json +39 -0
- data/lib/node_modules/npm/node_modules/graceful-fs/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/graceful-fs/README.md +26 -0
- data/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js +161 -0
- data/lib/node_modules/npm/node_modules/graceful-fs/package.json +48 -0
- data/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js +228 -0
- data/lib/node_modules/npm/node_modules/inherits/LICENSE +16 -0
- data/lib/node_modules/npm/node_modules/inherits/README.md +42 -0
- data/lib/node_modules/npm/node_modules/inherits/inherits.js +1 -0
- data/lib/node_modules/npm/node_modules/inherits/inherits_browser.js +23 -0
- data/lib/node_modules/npm/node_modules/inherits/package.json +32 -0
- data/lib/node_modules/npm/node_modules/inherits/test.js +25 -0
- data/lib/node_modules/npm/node_modules/ini/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/ini/README.md +79 -0
- data/lib/node_modules/npm/node_modules/ini/ini.js +166 -0
- data/lib/node_modules/npm/node_modules/ini/package.json +29 -0
- data/lib/node_modules/npm/node_modules/init-package-json/README.md +43 -0
- data/lib/node_modules/npm/node_modules/init-package-json/default-input.js +181 -0
- data/lib/node_modules/npm/node_modules/init-package-json/example/example-basic.js +8 -0
- data/lib/node_modules/npm/node_modules/init-package-json/example/example-default.js +7 -0
- data/lib/node_modules/npm/node_modules/init-package-json/example/example-npm.js +13 -0
- data/lib/node_modules/npm/node_modules/init-package-json/example/init/basic-init.js +1 -0
- data/lib/node_modules/npm/node_modules/init-package-json/init-package-json.js +129 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/LICENSE +15 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/README.md +133 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/example/index.js +11 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/example/npm-init/README.md +8 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/example/npm-init/init-input.js +191 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/example/npm-init/init.js +37 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/example/npm-init/package.json +10 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/example/substack-input.js +61 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/package.json +32 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/promzard.js +216 -0
- data/lib/node_modules/npm/node_modules/init-package-json/package.json +48 -0
- data/lib/node_modules/npm/node_modules/lockfile/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/lockfile/README.md +81 -0
- data/lib/node_modules/npm/node_modules/lockfile/lockfile.js +272 -0
- data/lib/node_modules/npm/node_modules/lockfile/package.json +45 -0
- data/lib/node_modules/npm/node_modules/lru-cache/CONTRIBUTORS +14 -0
- data/lib/node_modules/npm/node_modules/lru-cache/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/lru-cache/README.md +97 -0
- data/lib/node_modules/npm/node_modules/lru-cache/lib/lru-cache.js +252 -0
- data/lib/node_modules/npm/node_modules/lru-cache/package.json +33 -0
- data/lib/node_modules/npm/node_modules/minimatch/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/minimatch/README.md +218 -0
- data/lib/node_modules/npm/node_modules/minimatch/minimatch.js +1055 -0
- data/lib/node_modules/npm/node_modules/minimatch/node_modules/sigmund/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/minimatch/node_modules/sigmund/README.md +53 -0
- data/lib/node_modules/npm/node_modules/minimatch/node_modules/sigmund/bench.js +283 -0
- data/lib/node_modules/npm/node_modules/minimatch/node_modules/sigmund/package.json +42 -0
- data/lib/node_modules/npm/node_modules/minimatch/node_modules/sigmund/sigmund.js +39 -0
- data/lib/node_modules/npm/node_modules/minimatch/package.json +40 -0
- data/lib/node_modules/npm/node_modules/mkdirp/LICENSE +21 -0
- data/lib/node_modules/npm/node_modules/mkdirp/README.markdown +63 -0
- data/lib/node_modules/npm/node_modules/mkdirp/examples/pow.js +6 -0
- data/lib/node_modules/npm/node_modules/mkdirp/index.js +82 -0
- data/lib/node_modules/npm/node_modules/mkdirp/package.json +33 -0
- data/lib/node_modules/npm/node_modules/node-gyp/LICENSE +24 -0
- data/lib/node_modules/npm/node_modules/node-gyp/README.md +163 -0
- data/lib/node_modules/npm/node_modules/node-gyp/addon.gypi +59 -0
- data/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js +133 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/AUTHORS +10 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/DEPS +24 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/OWNERS +1 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/PRESUBMIT.py +115 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/buildbot/buildbot_run.py +148 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/codereview.settings +10 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/data/win/large-pdb-shim.cc +12 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp +7 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp.bat +5 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_dummy.c +7 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py +18 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/gyptest.py +274 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py +340 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py +208 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py +1051 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py +1482 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py +58 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py +147 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py +267 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py +407 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py +537 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/common.py +513 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/common_test.py +72 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py +157 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py +103 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py +49 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/__init__.py +0 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py +1069 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py +81 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py +308 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py +87 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py +56 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py +2172 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py +3270 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py +37 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py +2150 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py +44 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py +1224 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py +23 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py +2809 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input_test.py +90 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py +264 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py +870 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py +160 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py +176 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py +1324 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py +2888 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py +69 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylintrc +307 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/samples/samples +81 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/samples/samples.bat +5 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/setup.py +19 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/README +15 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/Xcode/README +5 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.pbfilespec +27 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.xclangspec +226 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/emacs/README +12 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/emacs/gyp-tests.el +63 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/emacs/gyp.el +252 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/emacs/run-unit-tests.sh +7 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp +1105 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp.fontified +1107 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/graphviz.py +100 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/pretty_gyp.py +155 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/pretty_sln.py +168 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/pretty_vcproj.py +329 -0
- data/lib/node_modules/npm/node_modules/node-gyp/lib/build.js +275 -0
- data/lib/node_modules/npm/node_modules/node-gyp/lib/clean.js +22 -0
- data/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js +344 -0
- data/lib/node_modules/npm/node_modules/node-gyp/lib/install.js +362 -0
- data/lib/node_modules/npm/node_modules/node-gyp/lib/list.js +33 -0
- data/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js +225 -0
- data/lib/node_modules/npm/node_modules/node-gyp/lib/rebuild.js +16 -0
- data/lib/node_modules/npm/node_modules/node-gyp/lib/remove.js +56 -0
- data/lib/node_modules/npm/node_modules/node-gyp/package.json +55 -0
- data/lib/node_modules/npm/node_modules/nopt/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/nopt/README.md +210 -0
- data/lib/node_modules/npm/node_modules/nopt/bin/nopt.js +51 -0
- data/lib/node_modules/npm/node_modules/nopt/examples/my-program.js +30 -0
- data/lib/node_modules/npm/node_modules/nopt/lib/nopt.js +407 -0
- data/lib/node_modules/npm/node_modules/nopt/package.json +39 -0
- data/lib/node_modules/npm/node_modules/npm-install-checks/LICENSE +234 -0
- data/lib/node_modules/npm/node_modules/npm-install-checks/README.md +25 -0
- data/lib/node_modules/npm/node_modules/npm-install-checks/index.js +146 -0
- data/lib/node_modules/npm/node_modules/npm-install-checks/package.json +43 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/README.md +176 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/index.js +55 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/adduser.js +138 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/bugs.js +9 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/deprecate.js +28 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js +184 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/publish.js +156 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js +270 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/star.js +29 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/stars.js +9 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/tag.js +6 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/unpublish.js +104 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/upload.js +22 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/package.json +43 -0
- data/lib/node_modules/npm/node_modules/npm-user-validate/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/npm-user-validate/README.md +6 -0
- data/lib/node_modules/npm/node_modules/npm-user-validate/npm-user-validate.js +49 -0
- data/lib/node_modules/npm/node_modules/npm-user-validate/package.json +37 -0
- data/lib/node_modules/npm/node_modules/npmconf/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/npmconf/README.md +33 -0
- data/lib/node_modules/npm/node_modules/npmconf/config-defs.js +353 -0
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/LICENCE +22 -0
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/index.js +282 -0
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/README.md +3 -0
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/package.json +33 -0
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/proto-list.js +81 -0
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/package.json +32 -0
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/readme.markdown +228 -0
- data/lib/node_modules/npm/node_modules/npmconf/npmconf.js +338 -0
- data/lib/node_modules/npm/node_modules/npmconf/package.json +50 -0
- data/lib/node_modules/npm/node_modules/npmlog/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/npmlog/README.md +153 -0
- data/lib/node_modules/npm/node_modules/npmlog/example.js +39 -0
- data/lib/node_modules/npm/node_modules/npmlog/log.js +154 -0
- data/lib/node_modules/npm/node_modules/npmlog/package.json +32 -0
- data/lib/node_modules/npm/node_modules/once/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/once/README.md +51 -0
- data/lib/node_modules/npm/node_modules/once/once.js +20 -0
- data/lib/node_modules/npm/node_modules/once/package.json +39 -0
- data/lib/node_modules/npm/node_modules/opener/LICENSE.txt +14 -0
- data/lib/node_modules/npm/node_modules/opener/README.md +44 -0
- data/lib/node_modules/npm/node_modules/opener/opener.js +55 -0
- data/lib/node_modules/npm/node_modules/opener/package.json +34 -0
- data/lib/node_modules/npm/node_modules/osenv/LICENSE +25 -0
- data/lib/node_modules/npm/node_modules/osenv/README.md +63 -0
- data/lib/node_modules/npm/node_modules/osenv/osenv.js +80 -0
- data/lib/node_modules/npm/node_modules/osenv/package.json +38 -0
- data/lib/node_modules/npm/node_modules/path-is-inside/LICENSE.txt +14 -0
- data/lib/node_modules/npm/node_modules/path-is-inside/README.md +35 -0
- data/lib/node_modules/npm/node_modules/path-is-inside/lib/path-is-inside.js +24 -0
- data/lib/node_modules/npm/node_modules/path-is-inside/package.json +39 -0
- data/lib/node_modules/npm/node_modules/read-installed/LICENSE +16 -0
- data/lib/node_modules/npm/node_modules/read-installed/README.md +25 -0
- data/lib/node_modules/npm/node_modules/read-installed/package.json +39 -0
- data/lib/node_modules/npm/node_modules/read-installed/read-installed.js +338 -0
- data/lib/node_modules/npm/node_modules/read-package-json/LICENSE +15 -0
- data/lib/node_modules/npm/node_modules/read-package-json/README.md +166 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/AUTHORS +4 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/LICENSE +30 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/README.md +101 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/core_module_names.json +29 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/extract_description.js +14 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/fixer.js +392 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/normalize.js +36 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/safe_format.js +9 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/typos.json +25 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/warning_messages.json +28 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/package.json +53 -0
- data/lib/node_modules/npm/node_modules/read-package-json/package.json +39 -0
- data/lib/node_modules/npm/node_modules/read-package-json/read-json.js +368 -0
- data/lib/node_modules/npm/node_modules/read/LICENCE +25 -0
- data/lib/node_modules/npm/node_modules/read/README.md +53 -0
- data/lib/node_modules/npm/node_modules/read/example/example.js +13 -0
- data/lib/node_modules/npm/node_modules/read/lib/read.js +113 -0
- data/lib/node_modules/npm/node_modules/read/node_modules/mute-stream/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/read/node_modules/mute-stream/README.md +68 -0
- data/lib/node_modules/npm/node_modules/read/node_modules/mute-stream/mute.js +140 -0
- data/lib/node_modules/npm/node_modules/read/node_modules/mute-stream/package.json +37 -0
- data/lib/node_modules/npm/node_modules/read/package.json +35 -0
- data/lib/node_modules/npm/node_modules/read/rs.js +4 -0
- data/lib/node_modules/npm/node_modules/request/LICENSE +55 -0
- data/lib/node_modules/npm/node_modules/request/README.md +364 -0
- data/lib/node_modules/npm/node_modules/request/index.js +157 -0
- data/lib/node_modules/npm/node_modules/request/lib/copy.js +8 -0
- data/lib/node_modules/npm/node_modules/request/lib/debug.js +7 -0
- data/lib/node_modules/npm/node_modules/request/lib/getSafe.js +34 -0
- data/lib/node_modules/npm/node_modules/request/lib/optional.js +5 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/aws-sign2/LICENSE +55 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/aws-sign2/README.md +4 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/aws-sign2/index.js +202 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/aws-sign2/package.json +28 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/forever-agent/LICENSE +55 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/forever-agent/README.md +4 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/forever-agent/index.js +119 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/forever-agent/package.json +28 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/License +19 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/Readme.md +163 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/lib/form_data.js +325 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/async/LICENSE +19 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/async/README.md +1414 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/async/component.json +11 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js +955 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/async/package.json +43 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/License +19 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/Makefile +7 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/Readme.md +132 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/lib/combined_stream.js +185 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/License +19 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Makefile +7 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Readme.md +154 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/lib/delayed_stream.js +99 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json +31 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json +32 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/package.json +46 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/LICENSE +24 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/Makefile +10 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/README.md +627 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/example/usage.js +78 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/images/hawk.png +0 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/images/logo.png +0 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/index.js +1 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/lib/browser.js +485 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/lib/client.js +367 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/lib/crypto.js +111 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/lib/index.js +15 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/lib/server.js +524 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/lib/utils.js +183 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/boom/LICENSE +24 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/boom/Makefile +11 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/boom/README.md +6 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/boom/images/boom.png +0 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/boom/index.js +1 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js +207 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/boom/package.json +47 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/LICENSE +24 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/Makefile +11 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/README.md +6 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/index.js +1 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/lib/index.js +68 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json +48 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/LICENSE +33 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/Makefile +10 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/README.md +436 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/images/hoek.png +0 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/index.js +1 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/lib/escape.js +132 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/lib/index.js +585 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/package.json +49 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/LICENSE +24 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/Makefile +11 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/README.md +68 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/examples/offset.js +16 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/examples/time.js +25 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/index.js +1 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/lib/index.js +409 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/package.json +48 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/package.json +53 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/LICENSE +18 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/README.md +75 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/http_signing.md +296 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/lib/index.js +25 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/lib/parser.js +304 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/lib/signer.js +179 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/lib/util.js +249 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/lib/verify.js +42 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/LICENSE +19 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/README.md +50 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/errors.js +13 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/index.js +27 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/reader.js +267 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/types.js +36 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/writer.js +317 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/index.js +20 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json +43 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/reader.test.js +172 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/writer.test.js +296 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/README.md +126 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/assert.js +196 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json +20 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/CHANGELOG +71 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/LICENSE +24 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/README +82 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/README.old +298 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/ctf.js +245 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/ctio.js +1485 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/ctype.js +944 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/man/man3ctype/ctio.3ctype +241 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json +18 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsl.conf +129 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsstyle +839 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/float.json +13 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/int.json +13 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/psinfo.json +104 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/struct.json +19 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.fail.js +39 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.float.js +14 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.int.js +14 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.psinfo.js +17 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.struct.js +18 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.typedef.js +15 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/typedef.json +14 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.rfloat.js +767 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.wfloat.js +753 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.64.js +638 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.rint.js +101 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wbounds.js +53 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wint.js +92 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.64.js +451 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.roundtrip.js +81 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.ruint.js +95 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.wuint.js +156 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicr.js +50 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicw.js +44 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.char.js +42 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.endian.js +45 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.oldwrite.js +28 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.readSize.js +128 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.structw.js +28 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.writeStruct.js +31 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/package.json +36 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/json-stringify-safe/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/json-stringify-safe/README.md +49 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/json-stringify-safe/package.json +33 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/json-stringify-safe/stringify.js +39 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/json-stringify-safe/test.js +128 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/mime/LICENSE +19 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/mime/README.md +66 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/mime/mime.js +114 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/mime/package.json +36 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/mime/test.js +84 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/mime/types/mime.types +1588 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/mime/types/node.types +77 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/LICENSE.md +2 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/README.md +207 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/benchmark/README.md +53 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/benchmark/bench.gnu +174 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/benchmark/bench.sh +34 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/benchmark/benchmark-native.c +34 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/benchmark/benchmark.js +84 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/component.json +18 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/package.json +35 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/uuid.js +245 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/oauth-sign/LICENSE +55 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/oauth-sign/README.md +4 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/oauth-sign/index.js +43 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/oauth-sign/package.json +31 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/oauth-sign/test.js +49 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/qs/Readme.md +58 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/qs/index.js +366 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/qs/package.json +38 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/LICENSE +78 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/README.md +380 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js +230 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/lib/cookie.js +947 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/lib/memstore.js +102 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js +69 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-GPL.txt +278 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt +20 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json +73 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js +508 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.min.js +2 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/LICENSE.txt +20 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/README.md +35 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/README.md +69 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/parse.php +35 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/docdown.php +38 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Alias.php +226 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Entry.php +442 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Generator.php +563 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/package.json +46 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/public-suffix.txt +5229 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/test.js +1340 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tunnel-agent/LICENSE +55 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tunnel-agent/README.md +4 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tunnel-agent/index.js +227 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tunnel-agent/package.json +28 -0
- data/lib/node_modules/npm/node_modules/request/package.json +57 -0
- data/lib/node_modules/npm/node_modules/request/request.js +1260 -0
- data/lib/node_modules/npm/node_modules/retry/License +21 -0
- data/lib/node_modules/npm/node_modules/retry/Makefile +7 -0
- data/lib/node_modules/npm/node_modules/retry/Readme.md +167 -0
- data/lib/node_modules/npm/node_modules/retry/equation.gif +0 -0
- data/lib/node_modules/npm/node_modules/retry/example/dns.js +31 -0
- data/lib/node_modules/npm/node_modules/retry/index.js +1 -0
- data/lib/node_modules/npm/node_modules/retry/lib/retry.js +50 -0
- data/lib/node_modules/npm/node_modules/retry/lib/retry_operation.js +109 -0
- data/lib/node_modules/npm/node_modules/retry/package.json +29 -0
- data/lib/node_modules/npm/node_modules/rimraf/AUTHORS +6 -0
- data/lib/node_modules/npm/node_modules/rimraf/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/rimraf/README.md +30 -0
- data/lib/node_modules/npm/node_modules/rimraf/bin.js +33 -0
- data/lib/node_modules/npm/node_modules/rimraf/package.json +56 -0
- data/lib/node_modules/npm/node_modules/rimraf/rimraf.js +178 -0
- data/lib/node_modules/npm/node_modules/semver/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/semver/Makefile +24 -0
- data/lib/node_modules/npm/node_modules/semver/README.md +142 -0
- data/lib/node_modules/npm/node_modules/semver/bin/semver +124 -0
- data/lib/node_modules/npm/node_modules/semver/foot.js +6 -0
- data/lib/node_modules/npm/node_modules/semver/head.js +2 -0
- data/lib/node_modules/npm/node_modules/semver/package.json +32 -0
- data/lib/node_modules/npm/node_modules/semver/semver.browser.js +1007 -0
- data/lib/node_modules/npm/node_modules/semver/semver.browser.js.gz +0 -0
- data/lib/node_modules/npm/node_modules/semver/semver.js +1011 -0
- data/lib/node_modules/npm/node_modules/semver/semver.min.js +1 -0
- data/lib/node_modules/npm/node_modules/semver/semver.min.js.gz +0 -0
- data/lib/node_modules/npm/node_modules/sha/LICENSE +46 -0
- data/lib/node_modules/npm/node_modules/sha/README.md +49 -0
- data/lib/node_modules/npm/node_modules/sha/index.js +120 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/README.md +768 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/duplex.js +1 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/float.patch +68 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_duplex.js +69 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_passthrough.js +41 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_readable.js +927 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_transform.js +205 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_writable.js +369 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/package.json +36 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/passthrough.js +1 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/readable.js +6 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/transform.js +1 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/writable.js +1 -0
- data/lib/node_modules/npm/node_modules/sha/package.json +32 -0
- data/lib/node_modules/npm/node_modules/slide/LICENSE +15 -0
- data/lib/node_modules/npm/node_modules/slide/README.md +143 -0
- data/lib/node_modules/npm/node_modules/slide/index.js +1 -0
- data/lib/node_modules/npm/node_modules/slide/lib/async-map-ordered.js +65 -0
- data/lib/node_modules/npm/node_modules/slide/lib/async-map.js +56 -0
- data/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js +16 -0
- data/lib/node_modules/npm/node_modules/slide/lib/chain.js +20 -0
- data/lib/node_modules/npm/node_modules/slide/lib/slide.js +3 -0
- data/lib/node_modules/npm/node_modules/slide/package.json +35 -0
- data/lib/node_modules/npm/node_modules/tar/LICENCE +25 -0
- data/lib/node_modules/npm/node_modules/tar/README.md +46 -0
- data/lib/node_modules/npm/node_modules/tar/examples/extracter.js +11 -0
- data/lib/node_modules/npm/node_modules/tar/examples/reader.js +36 -0
- data/lib/node_modules/npm/node_modules/tar/lib/buffer-entry.js +30 -0
- data/lib/node_modules/npm/node_modules/tar/lib/entry-writer.js +169 -0
- data/lib/node_modules/npm/node_modules/tar/lib/entry.js +213 -0
- data/lib/node_modules/npm/node_modules/tar/lib/extended-header-writer.js +191 -0
- data/lib/node_modules/npm/node_modules/tar/lib/extended-header.js +140 -0
- data/lib/node_modules/npm/node_modules/tar/lib/extract.js +78 -0
- data/lib/node_modules/npm/node_modules/tar/lib/global-header-writer.js +14 -0
- data/lib/node_modules/npm/node_modules/tar/lib/header.js +385 -0
- data/lib/node_modules/npm/node_modules/tar/lib/pack.js +231 -0
- data/lib/node_modules/npm/node_modules/tar/lib/parse.js +270 -0
- data/lib/node_modules/npm/node_modules/tar/package.json +40 -0
- data/lib/node_modules/npm/node_modules/tar/tar.js +173 -0
- data/lib/node_modules/npm/node_modules/text-table/LICENSE +18 -0
- data/lib/node_modules/npm/node_modules/text-table/example/align.js +8 -0
- data/lib/node_modules/npm/node_modules/text-table/example/center.js +8 -0
- data/lib/node_modules/npm/node_modules/text-table/example/dotalign.js +9 -0
- data/lib/node_modules/npm/node_modules/text-table/example/doubledot.js +11 -0
- data/lib/node_modules/npm/node_modules/text-table/example/table.js +6 -0
- data/lib/node_modules/npm/node_modules/text-table/index.js +86 -0
- data/lib/node_modules/npm/node_modules/text-table/package.json +52 -0
- data/lib/node_modules/npm/node_modules/text-table/readme.markdown +134 -0
- data/lib/node_modules/npm/node_modules/uid-number/LICENCE +25 -0
- data/lib/node_modules/npm/node_modules/uid-number/README.md +17 -0
- data/lib/node_modules/npm/node_modules/uid-number/get-uid-gid.js +24 -0
- data/lib/node_modules/npm/node_modules/uid-number/package.json +35 -0
- data/lib/node_modules/npm/node_modules/uid-number/uid-number.js +54 -0
- data/lib/node_modules/npm/node_modules/which/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/which/README.md +5 -0
- data/lib/node_modules/npm/node_modules/which/bin/which +14 -0
- data/lib/node_modules/npm/node_modules/which/package.json +34 -0
- data/lib/node_modules/npm/node_modules/which/which.js +104 -0
- data/lib/node_modules/npm/package.json +155 -0
- data/lib/node_modules/npm/scripts/clean-old.sh +165 -0
- data/lib/node_modules/npm/scripts/doc-build.sh +84 -0
- data/lib/node_modules/npm/scripts/index-build.js +62 -0
- data/lib/node_modules/npm/scripts/install.sh +313 -0
- data/lib/node_modules/npm/scripts/release.sh +36 -0
- data/lib/node_modules/npm/scripts/relocate.sh +26 -0
- metadata +1052 -36
- checksums.yaml +0 -7
@@ -0,0 +1,160 @@
|
|
1
|
+
# This file comes from
|
2
|
+
# https://github.com/martine/ninja/blob/master/misc/ninja_syntax.py
|
3
|
+
# Do not edit! Edit the upstream one instead.
|
4
|
+
|
5
|
+
"""Python module for generating .ninja files.
|
6
|
+
|
7
|
+
Note that this is emphatically not a required piece of Ninja; it's
|
8
|
+
just a helpful utility for build-file-generation systems that already
|
9
|
+
use Python.
|
10
|
+
"""
|
11
|
+
|
12
|
+
import textwrap
|
13
|
+
import re
|
14
|
+
|
15
|
+
def escape_path(word):
|
16
|
+
return word.replace('$ ','$$ ').replace(' ','$ ').replace(':', '$:')
|
17
|
+
|
18
|
+
class Writer(object):
|
19
|
+
def __init__(self, output, width=78):
|
20
|
+
self.output = output
|
21
|
+
self.width = width
|
22
|
+
|
23
|
+
def newline(self):
|
24
|
+
self.output.write('\n')
|
25
|
+
|
26
|
+
def comment(self, text):
|
27
|
+
for line in textwrap.wrap(text, self.width - 2):
|
28
|
+
self.output.write('# ' + line + '\n')
|
29
|
+
|
30
|
+
def variable(self, key, value, indent=0):
|
31
|
+
if value is None:
|
32
|
+
return
|
33
|
+
if isinstance(value, list):
|
34
|
+
value = ' '.join(filter(None, value)) # Filter out empty strings.
|
35
|
+
self._line('%s = %s' % (key, value), indent)
|
36
|
+
|
37
|
+
def pool(self, name, depth):
|
38
|
+
self._line('pool %s' % name)
|
39
|
+
self.variable('depth', depth, indent=1)
|
40
|
+
|
41
|
+
def rule(self, name, command, description=None, depfile=None,
|
42
|
+
generator=False, pool=None, restat=False, rspfile=None,
|
43
|
+
rspfile_content=None, deps=None):
|
44
|
+
self._line('rule %s' % name)
|
45
|
+
self.variable('command', command, indent=1)
|
46
|
+
if description:
|
47
|
+
self.variable('description', description, indent=1)
|
48
|
+
if depfile:
|
49
|
+
self.variable('depfile', depfile, indent=1)
|
50
|
+
if generator:
|
51
|
+
self.variable('generator', '1', indent=1)
|
52
|
+
if pool:
|
53
|
+
self.variable('pool', pool, indent=1)
|
54
|
+
if restat:
|
55
|
+
self.variable('restat', '1', indent=1)
|
56
|
+
if rspfile:
|
57
|
+
self.variable('rspfile', rspfile, indent=1)
|
58
|
+
if rspfile_content:
|
59
|
+
self.variable('rspfile_content', rspfile_content, indent=1)
|
60
|
+
if deps:
|
61
|
+
self.variable('deps', deps, indent=1)
|
62
|
+
|
63
|
+
def build(self, outputs, rule, inputs=None, implicit=None, order_only=None,
|
64
|
+
variables=None):
|
65
|
+
outputs = self._as_list(outputs)
|
66
|
+
all_inputs = self._as_list(inputs)[:]
|
67
|
+
out_outputs = list(map(escape_path, outputs))
|
68
|
+
all_inputs = list(map(escape_path, all_inputs))
|
69
|
+
|
70
|
+
if implicit:
|
71
|
+
implicit = map(escape_path, self._as_list(implicit))
|
72
|
+
all_inputs.append('|')
|
73
|
+
all_inputs.extend(implicit)
|
74
|
+
if order_only:
|
75
|
+
order_only = map(escape_path, self._as_list(order_only))
|
76
|
+
all_inputs.append('||')
|
77
|
+
all_inputs.extend(order_only)
|
78
|
+
|
79
|
+
self._line('build %s: %s' % (' '.join(out_outputs),
|
80
|
+
' '.join([rule] + all_inputs)))
|
81
|
+
|
82
|
+
if variables:
|
83
|
+
if isinstance(variables, dict):
|
84
|
+
iterator = iter(variables.items())
|
85
|
+
else:
|
86
|
+
iterator = iter(variables)
|
87
|
+
|
88
|
+
for key, val in iterator:
|
89
|
+
self.variable(key, val, indent=1)
|
90
|
+
|
91
|
+
return outputs
|
92
|
+
|
93
|
+
def include(self, path):
|
94
|
+
self._line('include %s' % path)
|
95
|
+
|
96
|
+
def subninja(self, path):
|
97
|
+
self._line('subninja %s' % path)
|
98
|
+
|
99
|
+
def default(self, paths):
|
100
|
+
self._line('default %s' % ' '.join(self._as_list(paths)))
|
101
|
+
|
102
|
+
def _count_dollars_before_index(self, s, i):
|
103
|
+
"""Returns the number of '$' characters right in front of s[i]."""
|
104
|
+
dollar_count = 0
|
105
|
+
dollar_index = i - 1
|
106
|
+
while dollar_index > 0 and s[dollar_index] == '$':
|
107
|
+
dollar_count += 1
|
108
|
+
dollar_index -= 1
|
109
|
+
return dollar_count
|
110
|
+
|
111
|
+
def _line(self, text, indent=0):
|
112
|
+
"""Write 'text' word-wrapped at self.width characters."""
|
113
|
+
leading_space = ' ' * indent
|
114
|
+
while len(leading_space) + len(text) > self.width:
|
115
|
+
# The text is too wide; wrap if possible.
|
116
|
+
|
117
|
+
# Find the rightmost space that would obey our width constraint and
|
118
|
+
# that's not an escaped space.
|
119
|
+
available_space = self.width - len(leading_space) - len(' $')
|
120
|
+
space = available_space
|
121
|
+
while True:
|
122
|
+
space = text.rfind(' ', 0, space)
|
123
|
+
if space < 0 or \
|
124
|
+
self._count_dollars_before_index(text, space) % 2 == 0:
|
125
|
+
break
|
126
|
+
|
127
|
+
if space < 0:
|
128
|
+
# No such space; just use the first unescaped space we can find.
|
129
|
+
space = available_space - 1
|
130
|
+
while True:
|
131
|
+
space = text.find(' ', space + 1)
|
132
|
+
if space < 0 or \
|
133
|
+
self._count_dollars_before_index(text, space) % 2 == 0:
|
134
|
+
break
|
135
|
+
if space < 0:
|
136
|
+
# Give up on breaking.
|
137
|
+
break
|
138
|
+
|
139
|
+
self.output.write(leading_space + text[0:space] + ' $\n')
|
140
|
+
text = text[space+1:]
|
141
|
+
|
142
|
+
# Subsequent lines are continuations, so indent them.
|
143
|
+
leading_space = ' ' * (indent+2)
|
144
|
+
|
145
|
+
self.output.write(leading_space + text + '\n')
|
146
|
+
|
147
|
+
def _as_list(self, input):
|
148
|
+
if input is None:
|
149
|
+
return []
|
150
|
+
if isinstance(input, list):
|
151
|
+
return input
|
152
|
+
return [input]
|
153
|
+
|
154
|
+
|
155
|
+
def escape(string):
|
156
|
+
"""Escape a string such that it can be embedded into a Ninja file without
|
157
|
+
further interpretation."""
|
158
|
+
assert '\n' not in string, 'Ninja syntax does not allow newlines'
|
159
|
+
# We only have one special metacharacter: '$'.
|
160
|
+
return string.replace('$', '$$')
|
@@ -0,0 +1,176 @@
|
|
1
|
+
#!/usr/bin/env python
|
2
|
+
|
3
|
+
# Copyright (c) 2012 Google Inc. All rights reserved.
|
4
|
+
# Use of this source code is governed by a BSD-style license that can be
|
5
|
+
# found in the LICENSE file.
|
6
|
+
|
7
|
+
"""Utility functions for Windows builds.
|
8
|
+
|
9
|
+
These functions are executed via gyp-win-tool when using the ninja generator.
|
10
|
+
"""
|
11
|
+
|
12
|
+
import os
|
13
|
+
import shutil
|
14
|
+
import subprocess
|
15
|
+
import sys
|
16
|
+
|
17
|
+
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
|
18
|
+
|
19
|
+
|
20
|
+
def main(args):
|
21
|
+
executor = WinTool()
|
22
|
+
exit_code = executor.Dispatch(args)
|
23
|
+
if exit_code is not None:
|
24
|
+
sys.exit(exit_code)
|
25
|
+
|
26
|
+
|
27
|
+
class WinTool(object):
|
28
|
+
"""This class performs all the Windows tooling steps. The methods can either
|
29
|
+
be executed directly, or dispatched from an argument list."""
|
30
|
+
|
31
|
+
def Dispatch(self, args):
|
32
|
+
"""Dispatches a string command to a method."""
|
33
|
+
if len(args) < 1:
|
34
|
+
raise Exception("Not enough arguments")
|
35
|
+
|
36
|
+
method = "Exec%s" % self._CommandifyName(args[0])
|
37
|
+
return getattr(self, method)(*args[1:])
|
38
|
+
|
39
|
+
def _CommandifyName(self, name_string):
|
40
|
+
"""Transforms a tool name like recursive-mirror to RecursiveMirror."""
|
41
|
+
return name_string.title().replace('-', '')
|
42
|
+
|
43
|
+
def _GetEnv(self, arch):
|
44
|
+
"""Gets the saved environment from a file for a given architecture."""
|
45
|
+
# The environment is saved as an "environment block" (see CreateProcess
|
46
|
+
# and msvs_emulation for details). We convert to a dict here.
|
47
|
+
# Drop last 2 NULs, one for list terminator, one for trailing vs. separator.
|
48
|
+
pairs = open(arch).read()[:-2].split('\0')
|
49
|
+
kvs = [item.split('=', 1) for item in pairs]
|
50
|
+
return dict(kvs)
|
51
|
+
|
52
|
+
def ExecStamp(self, path):
|
53
|
+
"""Simple stamp command."""
|
54
|
+
open(path, 'w').close()
|
55
|
+
|
56
|
+
def ExecRecursiveMirror(self, source, dest):
|
57
|
+
"""Emulation of rm -rf out && cp -af in out."""
|
58
|
+
if os.path.exists(dest):
|
59
|
+
if os.path.isdir(dest):
|
60
|
+
shutil.rmtree(dest)
|
61
|
+
else:
|
62
|
+
os.unlink(dest)
|
63
|
+
if os.path.isdir(source):
|
64
|
+
shutil.copytree(source, dest)
|
65
|
+
else:
|
66
|
+
shutil.copy2(source, dest)
|
67
|
+
|
68
|
+
def ExecLinkWrapper(self, arch, *args):
|
69
|
+
"""Filter diagnostic output from link that looks like:
|
70
|
+
' Creating library ui.dll.lib and object ui.dll.exp'
|
71
|
+
This happens when there are exports from the dll or exe.
|
72
|
+
"""
|
73
|
+
env = self._GetEnv(arch)
|
74
|
+
popen = subprocess.Popen(args, shell=True, env=env,
|
75
|
+
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
76
|
+
out, _ = popen.communicate()
|
77
|
+
for line in out.splitlines():
|
78
|
+
if not line.startswith(' Creating library '):
|
79
|
+
print line
|
80
|
+
return popen.returncode
|
81
|
+
|
82
|
+
def ExecManifestWrapper(self, arch, *args):
|
83
|
+
"""Run manifest tool with environment set. Strip out undesirable warning
|
84
|
+
(some XML blocks are recognized by the OS loader, but not the manifest
|
85
|
+
tool)."""
|
86
|
+
env = self._GetEnv(arch)
|
87
|
+
popen = subprocess.Popen(args, shell=True, env=env,
|
88
|
+
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
89
|
+
out, _ = popen.communicate()
|
90
|
+
for line in out.splitlines():
|
91
|
+
if line and 'manifest authoring warning 81010002' not in line:
|
92
|
+
print line
|
93
|
+
return popen.returncode
|
94
|
+
|
95
|
+
def ExecManifestToRc(self, arch, *args):
|
96
|
+
"""Creates a resource file pointing a SxS assembly manifest.
|
97
|
+
|args| is tuple containing path to resource file, path to manifest file
|
98
|
+
and resource name which can be "1" (for executables) or "2" (for DLLs)."""
|
99
|
+
manifest_path, resource_path, resource_name = args
|
100
|
+
with open(resource_path, 'wb') as output:
|
101
|
+
output.write('#include <windows.h>\n%s RT_MANIFEST "%s"' % (
|
102
|
+
resource_name,
|
103
|
+
os.path.abspath(manifest_path).replace('\\', '/')))
|
104
|
+
|
105
|
+
def ExecMidlWrapper(self, arch, outdir, tlb, h, dlldata, iid, proxy, idl,
|
106
|
+
*flags):
|
107
|
+
"""Filter noisy filenames output from MIDL compile step that isn't
|
108
|
+
quietable via command line flags.
|
109
|
+
"""
|
110
|
+
args = ['midl', '/nologo'] + list(flags) + [
|
111
|
+
'/out', outdir,
|
112
|
+
'/tlb', tlb,
|
113
|
+
'/h', h,
|
114
|
+
'/dlldata', dlldata,
|
115
|
+
'/iid', iid,
|
116
|
+
'/proxy', proxy,
|
117
|
+
idl]
|
118
|
+
env = self._GetEnv(arch)
|
119
|
+
popen = subprocess.Popen(args, shell=True, env=env,
|
120
|
+
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
121
|
+
out, _ = popen.communicate()
|
122
|
+
# Filter junk out of stdout, and write filtered versions. Output we want
|
123
|
+
# to filter is pairs of lines that look like this:
|
124
|
+
# Processing C:\Program Files (x86)\Microsoft SDKs\...\include\objidl.idl
|
125
|
+
# objidl.idl
|
126
|
+
lines = out.splitlines()
|
127
|
+
prefix = 'Processing '
|
128
|
+
processing = set(os.path.basename(x) for x in lines if x.startswith(prefix))
|
129
|
+
for line in lines:
|
130
|
+
if not line.startswith(prefix) and line not in processing:
|
131
|
+
print line
|
132
|
+
return popen.returncode
|
133
|
+
|
134
|
+
def ExecAsmWrapper(self, arch, *args):
|
135
|
+
"""Filter logo banner from invocations of asm.exe."""
|
136
|
+
env = self._GetEnv(arch)
|
137
|
+
# MSVS doesn't assemble x64 asm files.
|
138
|
+
if arch == 'environment.x64':
|
139
|
+
return 0
|
140
|
+
popen = subprocess.Popen(args, shell=True, env=env,
|
141
|
+
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
142
|
+
out, _ = popen.communicate()
|
143
|
+
for line in out.splitlines():
|
144
|
+
if (not line.startswith('Copyright (C) Microsoft Corporation') and
|
145
|
+
not line.startswith('Microsoft (R) Macro Assembler') and
|
146
|
+
not line.startswith(' Assembling: ') and
|
147
|
+
line):
|
148
|
+
print line
|
149
|
+
return popen.returncode
|
150
|
+
|
151
|
+
def ExecRcWrapper(self, arch, *args):
|
152
|
+
"""Filter logo banner from invocations of rc.exe. Older versions of RC
|
153
|
+
don't support the /nologo flag."""
|
154
|
+
env = self._GetEnv(arch)
|
155
|
+
popen = subprocess.Popen(args, shell=True, env=env,
|
156
|
+
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
157
|
+
out, _ = popen.communicate()
|
158
|
+
for line in out.splitlines():
|
159
|
+
if (not line.startswith('Microsoft (R) Windows (R) Resource Compiler') and
|
160
|
+
not line.startswith('Copyright (C) Microsoft Corporation') and
|
161
|
+
line):
|
162
|
+
print line
|
163
|
+
return popen.returncode
|
164
|
+
|
165
|
+
def ExecActionWrapper(self, arch, rspfile, *dir):
|
166
|
+
"""Runs an action command line from a response file using the environment
|
167
|
+
for |arch|. If |dir| is supplied, use that as the working directory."""
|
168
|
+
env = self._GetEnv(arch)
|
169
|
+
args = open(rspfile).read()
|
170
|
+
dir = dir[0] if dir else None
|
171
|
+
popen = subprocess.Popen(args, shell=True, env=env, cwd=dir)
|
172
|
+
popen.wait()
|
173
|
+
return popen.returncode
|
174
|
+
|
175
|
+
if __name__ == '__main__':
|
176
|
+
sys.exit(main(sys.argv[1:]))
|
@@ -0,0 +1,1324 @@
|
|
1
|
+
# Copyright (c) 2012 Google Inc. All rights reserved.
|
2
|
+
# Use of this source code is governed by a BSD-style license that can be
|
3
|
+
# found in the LICENSE file.
|
4
|
+
|
5
|
+
"""
|
6
|
+
This module contains classes that help to emulate xcodebuild behavior on top of
|
7
|
+
other build systems, such as make and ninja.
|
8
|
+
"""
|
9
|
+
|
10
|
+
import copy
|
11
|
+
import gyp.common
|
12
|
+
import os.path
|
13
|
+
import re
|
14
|
+
import shlex
|
15
|
+
import subprocess
|
16
|
+
import sys
|
17
|
+
from gyp.common import GypError
|
18
|
+
|
19
|
+
class XcodeSettings(object):
|
20
|
+
"""A class that understands the gyp 'xcode_settings' object."""
|
21
|
+
|
22
|
+
# Populated lazily by _SdkPath(). Shared by all XcodeSettings, so cached
|
23
|
+
# at class-level for efficiency.
|
24
|
+
_sdk_path_cache = {}
|
25
|
+
|
26
|
+
# Populated lazily by GetExtraPlistItems(). Shared by all XcodeSettings, so
|
27
|
+
# cached at class-level for efficiency.
|
28
|
+
_plist_cache = {}
|
29
|
+
|
30
|
+
# Populated lazily by GetIOSPostbuilds. Shared by all XcodeSettings, so
|
31
|
+
# cached at class-level for efficiency.
|
32
|
+
_codesigning_key_cache = {}
|
33
|
+
|
34
|
+
def __init__(self, spec):
|
35
|
+
self.spec = spec
|
36
|
+
|
37
|
+
self.isIOS = False
|
38
|
+
|
39
|
+
# Per-target 'xcode_settings' are pushed down into configs earlier by gyp.
|
40
|
+
# This means self.xcode_settings[config] always contains all settings
|
41
|
+
# for that config -- the per-target settings as well. Settings that are
|
42
|
+
# the same for all configs are implicitly per-target settings.
|
43
|
+
self.xcode_settings = {}
|
44
|
+
configs = spec['configurations']
|
45
|
+
for configname, config in configs.iteritems():
|
46
|
+
self.xcode_settings[configname] = config.get('xcode_settings', {})
|
47
|
+
self._ConvertConditionalKeys(configname)
|
48
|
+
if self.xcode_settings[configname].get('IPHONEOS_DEPLOYMENT_TARGET',
|
49
|
+
None):
|
50
|
+
self.isIOS = True
|
51
|
+
|
52
|
+
# This is only non-None temporarily during the execution of some methods.
|
53
|
+
self.configname = None
|
54
|
+
|
55
|
+
# Used by _AdjustLibrary to match .a and .dylib entries in libraries.
|
56
|
+
self.library_re = re.compile(r'^lib([^/]+)\.(a|dylib)$')
|
57
|
+
|
58
|
+
def _ConvertConditionalKeys(self, configname):
|
59
|
+
"""Converts or warns on conditional keys. Xcode supports conditional keys,
|
60
|
+
such as CODE_SIGN_IDENTITY[sdk=iphoneos*]. This is a partial implementation
|
61
|
+
with some keys converted while the rest force a warning."""
|
62
|
+
settings = self.xcode_settings[configname]
|
63
|
+
conditional_keys = [key for key in settings if key.endswith(']')]
|
64
|
+
for key in conditional_keys:
|
65
|
+
# If you need more, speak up at http://crbug.com/122592
|
66
|
+
if key.endswith("[sdk=iphoneos*]"):
|
67
|
+
if configname.endswith("iphoneos"):
|
68
|
+
new_key = key.split("[")[0]
|
69
|
+
settings[new_key] = settings[key]
|
70
|
+
else:
|
71
|
+
print 'Warning: Conditional keys not implemented, ignoring:', \
|
72
|
+
' '.join(conditional_keys)
|
73
|
+
del settings[key]
|
74
|
+
|
75
|
+
def _Settings(self):
|
76
|
+
assert self.configname
|
77
|
+
return self.xcode_settings[self.configname]
|
78
|
+
|
79
|
+
def _Test(self, test_key, cond_key, default):
|
80
|
+
return self._Settings().get(test_key, default) == cond_key
|
81
|
+
|
82
|
+
def _Appendf(self, lst, test_key, format_str, default=None):
|
83
|
+
if test_key in self._Settings():
|
84
|
+
lst.append(format_str % str(self._Settings()[test_key]))
|
85
|
+
elif default:
|
86
|
+
lst.append(format_str % str(default))
|
87
|
+
|
88
|
+
def _WarnUnimplemented(self, test_key):
|
89
|
+
if test_key in self._Settings():
|
90
|
+
print 'Warning: Ignoring not yet implemented key "%s".' % test_key
|
91
|
+
|
92
|
+
def _IsBundle(self):
|
93
|
+
return int(self.spec.get('mac_bundle', 0)) != 0
|
94
|
+
|
95
|
+
def GetFrameworkVersion(self):
|
96
|
+
"""Returns the framework version of the current target. Only valid for
|
97
|
+
bundles."""
|
98
|
+
assert self._IsBundle()
|
99
|
+
return self.GetPerTargetSetting('FRAMEWORK_VERSION', default='A')
|
100
|
+
|
101
|
+
def GetWrapperExtension(self):
|
102
|
+
"""Returns the bundle extension (.app, .framework, .plugin, etc). Only
|
103
|
+
valid for bundles."""
|
104
|
+
assert self._IsBundle()
|
105
|
+
if self.spec['type'] in ('loadable_module', 'shared_library'):
|
106
|
+
default_wrapper_extension = {
|
107
|
+
'loadable_module': 'bundle',
|
108
|
+
'shared_library': 'framework',
|
109
|
+
}[self.spec['type']]
|
110
|
+
wrapper_extension = self.GetPerTargetSetting(
|
111
|
+
'WRAPPER_EXTENSION', default=default_wrapper_extension)
|
112
|
+
return '.' + self.spec.get('product_extension', wrapper_extension)
|
113
|
+
elif self.spec['type'] == 'executable':
|
114
|
+
return '.' + self.spec.get('product_extension', 'app')
|
115
|
+
else:
|
116
|
+
assert False, "Don't know extension for '%s', target '%s'" % (
|
117
|
+
self.spec['type'], self.spec['target_name'])
|
118
|
+
|
119
|
+
def GetProductName(self):
|
120
|
+
"""Returns PRODUCT_NAME."""
|
121
|
+
return self.spec.get('product_name', self.spec['target_name'])
|
122
|
+
|
123
|
+
def GetFullProductName(self):
|
124
|
+
"""Returns FULL_PRODUCT_NAME."""
|
125
|
+
if self._IsBundle():
|
126
|
+
return self.GetWrapperName()
|
127
|
+
else:
|
128
|
+
return self._GetStandaloneBinaryPath()
|
129
|
+
|
130
|
+
def GetWrapperName(self):
|
131
|
+
"""Returns the directory name of the bundle represented by this target.
|
132
|
+
Only valid for bundles."""
|
133
|
+
assert self._IsBundle()
|
134
|
+
return self.GetProductName() + self.GetWrapperExtension()
|
135
|
+
|
136
|
+
def GetBundleContentsFolderPath(self):
|
137
|
+
"""Returns the qualified path to the bundle's contents folder. E.g.
|
138
|
+
Chromium.app/Contents or Foo.bundle/Versions/A. Only valid for bundles."""
|
139
|
+
if self.isIOS:
|
140
|
+
return self.GetWrapperName()
|
141
|
+
assert self._IsBundle()
|
142
|
+
if self.spec['type'] == 'shared_library':
|
143
|
+
return os.path.join(
|
144
|
+
self.GetWrapperName(), 'Versions', self.GetFrameworkVersion())
|
145
|
+
else:
|
146
|
+
# loadable_modules have a 'Contents' folder like executables.
|
147
|
+
return os.path.join(self.GetWrapperName(), 'Contents')
|
148
|
+
|
149
|
+
def GetBundleResourceFolder(self):
|
150
|
+
"""Returns the qualified path to the bundle's resource folder. E.g.
|
151
|
+
Chromium.app/Contents/Resources. Only valid for bundles."""
|
152
|
+
assert self._IsBundle()
|
153
|
+
if self.isIOS:
|
154
|
+
return self.GetBundleContentsFolderPath()
|
155
|
+
return os.path.join(self.GetBundleContentsFolderPath(), 'Resources')
|
156
|
+
|
157
|
+
def GetBundlePlistPath(self):
|
158
|
+
"""Returns the qualified path to the bundle's plist file. E.g.
|
159
|
+
Chromium.app/Contents/Info.plist. Only valid for bundles."""
|
160
|
+
assert self._IsBundle()
|
161
|
+
if self.spec['type'] in ('executable', 'loadable_module'):
|
162
|
+
return os.path.join(self.GetBundleContentsFolderPath(), 'Info.plist')
|
163
|
+
else:
|
164
|
+
return os.path.join(self.GetBundleContentsFolderPath(),
|
165
|
+
'Resources', 'Info.plist')
|
166
|
+
|
167
|
+
def GetProductType(self):
|
168
|
+
"""Returns the PRODUCT_TYPE of this target."""
|
169
|
+
if self._IsBundle():
|
170
|
+
return {
|
171
|
+
'executable': 'com.apple.product-type.application',
|
172
|
+
'loadable_module': 'com.apple.product-type.bundle',
|
173
|
+
'shared_library': 'com.apple.product-type.framework',
|
174
|
+
}[self.spec['type']]
|
175
|
+
else:
|
176
|
+
return {
|
177
|
+
'executable': 'com.apple.product-type.tool',
|
178
|
+
'loadable_module': 'com.apple.product-type.library.dynamic',
|
179
|
+
'shared_library': 'com.apple.product-type.library.dynamic',
|
180
|
+
'static_library': 'com.apple.product-type.library.static',
|
181
|
+
}[self.spec['type']]
|
182
|
+
|
183
|
+
def GetMachOType(self):
|
184
|
+
"""Returns the MACH_O_TYPE of this target."""
|
185
|
+
# Weird, but matches Xcode.
|
186
|
+
if not self._IsBundle() and self.spec['type'] == 'executable':
|
187
|
+
return ''
|
188
|
+
return {
|
189
|
+
'executable': 'mh_execute',
|
190
|
+
'static_library': 'staticlib',
|
191
|
+
'shared_library': 'mh_dylib',
|
192
|
+
'loadable_module': 'mh_bundle',
|
193
|
+
}[self.spec['type']]
|
194
|
+
|
195
|
+
def _GetBundleBinaryPath(self):
|
196
|
+
"""Returns the name of the bundle binary of by this target.
|
197
|
+
E.g. Chromium.app/Contents/MacOS/Chromium. Only valid for bundles."""
|
198
|
+
assert self._IsBundle()
|
199
|
+
if self.spec['type'] in ('shared_library') or self.isIOS:
|
200
|
+
path = self.GetBundleContentsFolderPath()
|
201
|
+
elif self.spec['type'] in ('executable', 'loadable_module'):
|
202
|
+
path = os.path.join(self.GetBundleContentsFolderPath(), 'MacOS')
|
203
|
+
return os.path.join(path, self.GetExecutableName())
|
204
|
+
|
205
|
+
def _GetStandaloneExecutableSuffix(self):
|
206
|
+
if 'product_extension' in self.spec:
|
207
|
+
return '.' + self.spec['product_extension']
|
208
|
+
return {
|
209
|
+
'executable': '',
|
210
|
+
'static_library': '.a',
|
211
|
+
'shared_library': '.dylib',
|
212
|
+
'loadable_module': '.so',
|
213
|
+
}[self.spec['type']]
|
214
|
+
|
215
|
+
def _GetStandaloneExecutablePrefix(self):
|
216
|
+
return self.spec.get('product_prefix', {
|
217
|
+
'executable': '',
|
218
|
+
'static_library': 'lib',
|
219
|
+
'shared_library': 'lib',
|
220
|
+
# Non-bundled loadable_modules are called foo.so for some reason
|
221
|
+
# (that is, .so and no prefix) with the xcode build -- match that.
|
222
|
+
'loadable_module': '',
|
223
|
+
}[self.spec['type']])
|
224
|
+
|
225
|
+
def _GetStandaloneBinaryPath(self):
|
226
|
+
"""Returns the name of the non-bundle binary represented by this target.
|
227
|
+
E.g. hello_world. Only valid for non-bundles."""
|
228
|
+
assert not self._IsBundle()
|
229
|
+
assert self.spec['type'] in (
|
230
|
+
'executable', 'shared_library', 'static_library', 'loadable_module'), (
|
231
|
+
'Unexpected type %s' % self.spec['type'])
|
232
|
+
target = self.spec['target_name']
|
233
|
+
if self.spec['type'] == 'static_library':
|
234
|
+
if target[:3] == 'lib':
|
235
|
+
target = target[3:]
|
236
|
+
elif self.spec['type'] in ('loadable_module', 'shared_library'):
|
237
|
+
if target[:3] == 'lib':
|
238
|
+
target = target[3:]
|
239
|
+
|
240
|
+
target_prefix = self._GetStandaloneExecutablePrefix()
|
241
|
+
target = self.spec.get('product_name', target)
|
242
|
+
target_ext = self._GetStandaloneExecutableSuffix()
|
243
|
+
return target_prefix + target + target_ext
|
244
|
+
|
245
|
+
def GetExecutableName(self):
|
246
|
+
"""Returns the executable name of the bundle represented by this target.
|
247
|
+
E.g. Chromium."""
|
248
|
+
if self._IsBundle():
|
249
|
+
return self.spec.get('product_name', self.spec['target_name'])
|
250
|
+
else:
|
251
|
+
return self._GetStandaloneBinaryPath()
|
252
|
+
|
253
|
+
def GetExecutablePath(self):
|
254
|
+
"""Returns the directory name of the bundle represented by this target. E.g.
|
255
|
+
Chromium.app/Contents/MacOS/Chromium."""
|
256
|
+
if self._IsBundle():
|
257
|
+
return self._GetBundleBinaryPath()
|
258
|
+
else:
|
259
|
+
return self._GetStandaloneBinaryPath()
|
260
|
+
|
261
|
+
def GetActiveArchs(self, configname):
|
262
|
+
"""Returns the architectures this target should be built for."""
|
263
|
+
# TODO: Look at VALID_ARCHS, ONLY_ACTIVE_ARCH; possibly set
|
264
|
+
# CURRENT_ARCH / NATIVE_ARCH env vars?
|
265
|
+
return self.xcode_settings[configname].get('ARCHS', ['i386'])
|
266
|
+
|
267
|
+
def _GetStdout(self, cmdlist):
|
268
|
+
job = subprocess.Popen(cmdlist, stdout=subprocess.PIPE)
|
269
|
+
out = job.communicate()[0]
|
270
|
+
if job.returncode != 0:
|
271
|
+
sys.stderr.write(out + '\n')
|
272
|
+
raise GypError('Error %d running %s' % (job.returncode, cmdlist[0]))
|
273
|
+
return out.rstrip('\n')
|
274
|
+
|
275
|
+
def _GetSdkVersionInfoItem(self, sdk, infoitem):
|
276
|
+
# xcodebuild requires Xcode and can't run on Command Line Tools-only
|
277
|
+
# systems from 10.7 onward.
|
278
|
+
# Since the CLT has no SDK paths anyway, returning None is the
|
279
|
+
# most sensible route and should still do the right thing.
|
280
|
+
try:
|
281
|
+
return self._GetStdout(['xcodebuild', '-version', '-sdk', sdk, infoitem])
|
282
|
+
except:
|
283
|
+
pass
|
284
|
+
|
285
|
+
def _SdkRoot(self, configname):
|
286
|
+
if configname is None:
|
287
|
+
configname = self.configname
|
288
|
+
return self.GetPerConfigSetting('SDKROOT', configname, default='')
|
289
|
+
|
290
|
+
def _SdkPath(self, configname=None):
|
291
|
+
sdk_root = self._SdkRoot(configname)
|
292
|
+
if sdk_root.startswith('/'):
|
293
|
+
return sdk_root
|
294
|
+
if sdk_root not in XcodeSettings._sdk_path_cache:
|
295
|
+
XcodeSettings._sdk_path_cache[sdk_root] = self._GetSdkVersionInfoItem(
|
296
|
+
sdk_root, 'Path')
|
297
|
+
return XcodeSettings._sdk_path_cache[sdk_root]
|
298
|
+
|
299
|
+
def _AppendPlatformVersionMinFlags(self, lst):
|
300
|
+
self._Appendf(lst, 'MACOSX_DEPLOYMENT_TARGET', '-mmacosx-version-min=%s')
|
301
|
+
if 'IPHONEOS_DEPLOYMENT_TARGET' in self._Settings():
|
302
|
+
# TODO: Implement this better?
|
303
|
+
sdk_path_basename = os.path.basename(self._SdkPath())
|
304
|
+
if sdk_path_basename.lower().startswith('iphonesimulator'):
|
305
|
+
self._Appendf(lst, 'IPHONEOS_DEPLOYMENT_TARGET',
|
306
|
+
'-mios-simulator-version-min=%s')
|
307
|
+
else:
|
308
|
+
self._Appendf(lst, 'IPHONEOS_DEPLOYMENT_TARGET',
|
309
|
+
'-miphoneos-version-min=%s')
|
310
|
+
|
311
|
+
def GetCflags(self, configname, arch=None):
|
312
|
+
"""Returns flags that need to be added to .c, .cc, .m, and .mm
|
313
|
+
compilations."""
|
314
|
+
# This functions (and the similar ones below) do not offer complete
|
315
|
+
# emulation of all xcode_settings keys. They're implemented on demand.
|
316
|
+
|
317
|
+
self.configname = configname
|
318
|
+
cflags = []
|
319
|
+
|
320
|
+
sdk_root = self._SdkPath()
|
321
|
+
if 'SDKROOT' in self._Settings():
|
322
|
+
cflags.append('-isysroot %s' % sdk_root)
|
323
|
+
|
324
|
+
if self._Test('CLANG_WARN_CONSTANT_CONVERSION', 'YES', default='NO'):
|
325
|
+
cflags.append('-Wconstant-conversion')
|
326
|
+
|
327
|
+
if self._Test('GCC_CHAR_IS_UNSIGNED_CHAR', 'YES', default='NO'):
|
328
|
+
cflags.append('-funsigned-char')
|
329
|
+
|
330
|
+
if self._Test('GCC_CW_ASM_SYNTAX', 'YES', default='YES'):
|
331
|
+
cflags.append('-fasm-blocks')
|
332
|
+
|
333
|
+
if 'GCC_DYNAMIC_NO_PIC' in self._Settings():
|
334
|
+
if self._Settings()['GCC_DYNAMIC_NO_PIC'] == 'YES':
|
335
|
+
cflags.append('-mdynamic-no-pic')
|
336
|
+
else:
|
337
|
+
pass
|
338
|
+
# TODO: In this case, it depends on the target. xcode passes
|
339
|
+
# mdynamic-no-pic by default for executable and possibly static lib
|
340
|
+
# according to mento
|
341
|
+
|
342
|
+
if self._Test('GCC_ENABLE_PASCAL_STRINGS', 'YES', default='YES'):
|
343
|
+
cflags.append('-mpascal-strings')
|
344
|
+
|
345
|
+
self._Appendf(cflags, 'GCC_OPTIMIZATION_LEVEL', '-O%s', default='s')
|
346
|
+
|
347
|
+
if self._Test('GCC_GENERATE_DEBUGGING_SYMBOLS', 'YES', default='YES'):
|
348
|
+
dbg_format = self._Settings().get('DEBUG_INFORMATION_FORMAT', 'dwarf')
|
349
|
+
if dbg_format == 'dwarf':
|
350
|
+
cflags.append('-gdwarf-2')
|
351
|
+
elif dbg_format == 'stabs':
|
352
|
+
raise NotImplementedError('stabs debug format is not supported yet.')
|
353
|
+
elif dbg_format == 'dwarf-with-dsym':
|
354
|
+
cflags.append('-gdwarf-2')
|
355
|
+
else:
|
356
|
+
raise NotImplementedError('Unknown debug format %s' % dbg_format)
|
357
|
+
|
358
|
+
if self._Settings().get('GCC_STRICT_ALIASING') == 'YES':
|
359
|
+
cflags.append('-fstrict-aliasing')
|
360
|
+
elif self._Settings().get('GCC_STRICT_ALIASING') == 'NO':
|
361
|
+
cflags.append('-fno-strict-aliasing')
|
362
|
+
|
363
|
+
if self._Test('GCC_SYMBOLS_PRIVATE_EXTERN', 'YES', default='NO'):
|
364
|
+
cflags.append('-fvisibility=hidden')
|
365
|
+
|
366
|
+
if self._Test('GCC_TREAT_WARNINGS_AS_ERRORS', 'YES', default='NO'):
|
367
|
+
cflags.append('-Werror')
|
368
|
+
|
369
|
+
if self._Test('GCC_WARN_ABOUT_MISSING_NEWLINE', 'YES', default='NO'):
|
370
|
+
cflags.append('-Wnewline-eof')
|
371
|
+
|
372
|
+
self._AppendPlatformVersionMinFlags(cflags)
|
373
|
+
|
374
|
+
# TODO:
|
375
|
+
if self._Test('COPY_PHASE_STRIP', 'YES', default='NO'):
|
376
|
+
self._WarnUnimplemented('COPY_PHASE_STRIP')
|
377
|
+
self._WarnUnimplemented('GCC_DEBUGGING_SYMBOLS')
|
378
|
+
self._WarnUnimplemented('GCC_ENABLE_OBJC_EXCEPTIONS')
|
379
|
+
|
380
|
+
# TODO: This is exported correctly, but assigning to it is not supported.
|
381
|
+
self._WarnUnimplemented('MACH_O_TYPE')
|
382
|
+
self._WarnUnimplemented('PRODUCT_TYPE')
|
383
|
+
|
384
|
+
if arch is not None:
|
385
|
+
archs = [arch]
|
386
|
+
else:
|
387
|
+
archs = self._Settings().get('ARCHS', ['i386'])
|
388
|
+
if len(archs) != 1:
|
389
|
+
# TODO: Supporting fat binaries will be annoying.
|
390
|
+
self._WarnUnimplemented('ARCHS')
|
391
|
+
archs = ['i386']
|
392
|
+
cflags.append('-arch ' + archs[0])
|
393
|
+
|
394
|
+
if archs[0] in ('i386', 'x86_64'):
|
395
|
+
if self._Test('GCC_ENABLE_SSE3_EXTENSIONS', 'YES', default='NO'):
|
396
|
+
cflags.append('-msse3')
|
397
|
+
if self._Test('GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS', 'YES',
|
398
|
+
default='NO'):
|
399
|
+
cflags.append('-mssse3') # Note 3rd 's'.
|
400
|
+
if self._Test('GCC_ENABLE_SSE41_EXTENSIONS', 'YES', default='NO'):
|
401
|
+
cflags.append('-msse4.1')
|
402
|
+
if self._Test('GCC_ENABLE_SSE42_EXTENSIONS', 'YES', default='NO'):
|
403
|
+
cflags.append('-msse4.2')
|
404
|
+
|
405
|
+
cflags += self._Settings().get('WARNING_CFLAGS', [])
|
406
|
+
|
407
|
+
if 'SDKROOT' in self._Settings():
|
408
|
+
config = self.spec['configurations'][self.configname]
|
409
|
+
framework_dirs = config.get('mac_framework_dirs', [])
|
410
|
+
for directory in framework_dirs:
|
411
|
+
cflags.append('-F' + directory.replace('$(SDKROOT)', sdk_root))
|
412
|
+
|
413
|
+
self.configname = None
|
414
|
+
return cflags
|
415
|
+
|
416
|
+
def GetCflagsC(self, configname):
|
417
|
+
"""Returns flags that need to be added to .c, and .m compilations."""
|
418
|
+
self.configname = configname
|
419
|
+
cflags_c = []
|
420
|
+
if self._Settings().get('GCC_C_LANGUAGE_STANDARD', '') == 'ansi':
|
421
|
+
cflags_c.append('-ansi')
|
422
|
+
else:
|
423
|
+
self._Appendf(cflags_c, 'GCC_C_LANGUAGE_STANDARD', '-std=%s')
|
424
|
+
cflags_c += self._Settings().get('OTHER_CFLAGS', [])
|
425
|
+
self.configname = None
|
426
|
+
return cflags_c
|
427
|
+
|
428
|
+
def GetCflagsCC(self, configname):
|
429
|
+
"""Returns flags that need to be added to .cc, and .mm compilations."""
|
430
|
+
self.configname = configname
|
431
|
+
cflags_cc = []
|
432
|
+
|
433
|
+
clang_cxx_language_standard = self._Settings().get(
|
434
|
+
'CLANG_CXX_LANGUAGE_STANDARD')
|
435
|
+
# Note: Don't make c++0x to c++11 so that c++0x can be used with older
|
436
|
+
# clangs that don't understand c++11 yet (like Xcode 4.2's).
|
437
|
+
if clang_cxx_language_standard:
|
438
|
+
cflags_cc.append('-std=%s' % clang_cxx_language_standard)
|
439
|
+
|
440
|
+
self._Appendf(cflags_cc, 'CLANG_CXX_LIBRARY', '-stdlib=%s')
|
441
|
+
|
442
|
+
if self._Test('GCC_ENABLE_CPP_RTTI', 'NO', default='YES'):
|
443
|
+
cflags_cc.append('-fno-rtti')
|
444
|
+
if self._Test('GCC_ENABLE_CPP_EXCEPTIONS', 'NO', default='YES'):
|
445
|
+
cflags_cc.append('-fno-exceptions')
|
446
|
+
if self._Test('GCC_INLINES_ARE_PRIVATE_EXTERN', 'YES', default='NO'):
|
447
|
+
cflags_cc.append('-fvisibility-inlines-hidden')
|
448
|
+
if self._Test('GCC_THREADSAFE_STATICS', 'NO', default='YES'):
|
449
|
+
cflags_cc.append('-fno-threadsafe-statics')
|
450
|
+
# Note: This flag is a no-op for clang, it only has an effect for gcc.
|
451
|
+
if self._Test('GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO', 'NO', default='YES'):
|
452
|
+
cflags_cc.append('-Wno-invalid-offsetof')
|
453
|
+
|
454
|
+
other_ccflags = []
|
455
|
+
|
456
|
+
for flag in self._Settings().get('OTHER_CPLUSPLUSFLAGS', ['$(inherited)']):
|
457
|
+
# TODO: More general variable expansion. Missing in many other places too.
|
458
|
+
if flag in ('$inherited', '$(inherited)', '${inherited}'):
|
459
|
+
flag = '$OTHER_CFLAGS'
|
460
|
+
if flag in ('$OTHER_CFLAGS', '$(OTHER_CFLAGS)', '${OTHER_CFLAGS}'):
|
461
|
+
other_ccflags += self._Settings().get('OTHER_CFLAGS', [])
|
462
|
+
else:
|
463
|
+
other_ccflags.append(flag)
|
464
|
+
cflags_cc += other_ccflags
|
465
|
+
|
466
|
+
self.configname = None
|
467
|
+
return cflags_cc
|
468
|
+
|
469
|
+
def _AddObjectiveCGarbageCollectionFlags(self, flags):
|
470
|
+
gc_policy = self._Settings().get('GCC_ENABLE_OBJC_GC', 'unsupported')
|
471
|
+
if gc_policy == 'supported':
|
472
|
+
flags.append('-fobjc-gc')
|
473
|
+
elif gc_policy == 'required':
|
474
|
+
flags.append('-fobjc-gc-only')
|
475
|
+
|
476
|
+
def _AddObjectiveCARCFlags(self, flags):
|
477
|
+
if self._Test('CLANG_ENABLE_OBJC_ARC', 'YES', default='NO'):
|
478
|
+
flags.append('-fobjc-arc')
|
479
|
+
|
480
|
+
def _AddObjectiveCMissingPropertySynthesisFlags(self, flags):
|
481
|
+
if self._Test('CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS',
|
482
|
+
'YES', default='NO'):
|
483
|
+
flags.append('-Wobjc-missing-property-synthesis')
|
484
|
+
|
485
|
+
def GetCflagsObjC(self, configname):
|
486
|
+
"""Returns flags that need to be added to .m compilations."""
|
487
|
+
self.configname = configname
|
488
|
+
cflags_objc = []
|
489
|
+
self._AddObjectiveCGarbageCollectionFlags(cflags_objc)
|
490
|
+
self._AddObjectiveCARCFlags(cflags_objc)
|
491
|
+
self._AddObjectiveCMissingPropertySynthesisFlags(cflags_objc)
|
492
|
+
self.configname = None
|
493
|
+
return cflags_objc
|
494
|
+
|
495
|
+
def GetCflagsObjCC(self, configname):
|
496
|
+
"""Returns flags that need to be added to .mm compilations."""
|
497
|
+
self.configname = configname
|
498
|
+
cflags_objcc = []
|
499
|
+
self._AddObjectiveCGarbageCollectionFlags(cflags_objcc)
|
500
|
+
self._AddObjectiveCARCFlags(cflags_objcc)
|
501
|
+
self._AddObjectiveCMissingPropertySynthesisFlags(cflags_objcc)
|
502
|
+
if self._Test('GCC_OBJC_CALL_CXX_CDTORS', 'YES', default='NO'):
|
503
|
+
cflags_objcc.append('-fobjc-call-cxx-cdtors')
|
504
|
+
self.configname = None
|
505
|
+
return cflags_objcc
|
506
|
+
|
507
|
+
def GetInstallNameBase(self):
|
508
|
+
"""Return DYLIB_INSTALL_NAME_BASE for this target."""
|
509
|
+
# Xcode sets this for shared_libraries, and for nonbundled loadable_modules.
|
510
|
+
if (self.spec['type'] != 'shared_library' and
|
511
|
+
(self.spec['type'] != 'loadable_module' or self._IsBundle())):
|
512
|
+
return None
|
513
|
+
install_base = self.GetPerTargetSetting(
|
514
|
+
'DYLIB_INSTALL_NAME_BASE',
|
515
|
+
default='/Library/Frameworks' if self._IsBundle() else '/usr/local/lib')
|
516
|
+
return install_base
|
517
|
+
|
518
|
+
def _StandardizePath(self, path):
|
519
|
+
"""Do :standardizepath processing for path."""
|
520
|
+
# I'm not quite sure what :standardizepath does. Just call normpath(),
|
521
|
+
# but don't let @executable_path/../foo collapse to foo.
|
522
|
+
if '/' in path:
|
523
|
+
prefix, rest = '', path
|
524
|
+
if path.startswith('@'):
|
525
|
+
prefix, rest = path.split('/', 1)
|
526
|
+
rest = os.path.normpath(rest) # :standardizepath
|
527
|
+
path = os.path.join(prefix, rest)
|
528
|
+
return path
|
529
|
+
|
530
|
+
def GetInstallName(self):
|
531
|
+
"""Return LD_DYLIB_INSTALL_NAME for this target."""
|
532
|
+
# Xcode sets this for shared_libraries, and for nonbundled loadable_modules.
|
533
|
+
if (self.spec['type'] != 'shared_library' and
|
534
|
+
(self.spec['type'] != 'loadable_module' or self._IsBundle())):
|
535
|
+
return None
|
536
|
+
|
537
|
+
default_install_name = \
|
538
|
+
'$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)'
|
539
|
+
install_name = self.GetPerTargetSetting(
|
540
|
+
'LD_DYLIB_INSTALL_NAME', default=default_install_name)
|
541
|
+
|
542
|
+
# Hardcode support for the variables used in chromium for now, to
|
543
|
+
# unblock people using the make build.
|
544
|
+
if '$' in install_name:
|
545
|
+
assert install_name in ('$(DYLIB_INSTALL_NAME_BASE:standardizepath)/'
|
546
|
+
'$(WRAPPER_NAME)/$(PRODUCT_NAME)', default_install_name), (
|
547
|
+
'Variables in LD_DYLIB_INSTALL_NAME are not generally supported '
|
548
|
+
'yet in target \'%s\' (got \'%s\')' %
|
549
|
+
(self.spec['target_name'], install_name))
|
550
|
+
|
551
|
+
install_name = install_name.replace(
|
552
|
+
'$(DYLIB_INSTALL_NAME_BASE:standardizepath)',
|
553
|
+
self._StandardizePath(self.GetInstallNameBase()))
|
554
|
+
if self._IsBundle():
|
555
|
+
# These are only valid for bundles, hence the |if|.
|
556
|
+
install_name = install_name.replace(
|
557
|
+
'$(WRAPPER_NAME)', self.GetWrapperName())
|
558
|
+
install_name = install_name.replace(
|
559
|
+
'$(PRODUCT_NAME)', self.GetProductName())
|
560
|
+
else:
|
561
|
+
assert '$(WRAPPER_NAME)' not in install_name
|
562
|
+
assert '$(PRODUCT_NAME)' not in install_name
|
563
|
+
|
564
|
+
install_name = install_name.replace(
|
565
|
+
'$(EXECUTABLE_PATH)', self.GetExecutablePath())
|
566
|
+
return install_name
|
567
|
+
|
568
|
+
def _MapLinkerFlagFilename(self, ldflag, gyp_to_build_path):
|
569
|
+
"""Checks if ldflag contains a filename and if so remaps it from
|
570
|
+
gyp-directory-relative to build-directory-relative."""
|
571
|
+
# This list is expanded on demand.
|
572
|
+
# They get matched as:
|
573
|
+
# -exported_symbols_list file
|
574
|
+
# -Wl,exported_symbols_list file
|
575
|
+
# -Wl,exported_symbols_list,file
|
576
|
+
LINKER_FILE = '(\S+)'
|
577
|
+
WORD = '\S+'
|
578
|
+
linker_flags = [
|
579
|
+
['-exported_symbols_list', LINKER_FILE], # Needed for NaCl.
|
580
|
+
['-unexported_symbols_list', LINKER_FILE],
|
581
|
+
['-reexported_symbols_list', LINKER_FILE],
|
582
|
+
['-sectcreate', WORD, WORD, LINKER_FILE], # Needed for remoting.
|
583
|
+
]
|
584
|
+
for flag_pattern in linker_flags:
|
585
|
+
regex = re.compile('(?:-Wl,)?' + '[ ,]'.join(flag_pattern))
|
586
|
+
m = regex.match(ldflag)
|
587
|
+
if m:
|
588
|
+
ldflag = ldflag[:m.start(1)] + gyp_to_build_path(m.group(1)) + \
|
589
|
+
ldflag[m.end(1):]
|
590
|
+
# Required for ffmpeg (no idea why they don't use LIBRARY_SEARCH_PATHS,
|
591
|
+
# TODO(thakis): Update ffmpeg.gyp):
|
592
|
+
if ldflag.startswith('-L'):
|
593
|
+
ldflag = '-L' + gyp_to_build_path(ldflag[len('-L'):])
|
594
|
+
return ldflag
|
595
|
+
|
596
|
+
def GetLdflags(self, configname, product_dir, gyp_to_build_path, arch=None):
|
597
|
+
"""Returns flags that need to be passed to the linker.
|
598
|
+
|
599
|
+
Args:
|
600
|
+
configname: The name of the configuration to get ld flags for.
|
601
|
+
product_dir: The directory where products such static and dynamic
|
602
|
+
libraries are placed. This is added to the library search path.
|
603
|
+
gyp_to_build_path: A function that converts paths relative to the
|
604
|
+
current gyp file to paths relative to the build direcotry.
|
605
|
+
"""
|
606
|
+
self.configname = configname
|
607
|
+
ldflags = []
|
608
|
+
|
609
|
+
# The xcode build is relative to a gyp file's directory, and OTHER_LDFLAGS
|
610
|
+
# can contain entries that depend on this. Explicitly absolutify these.
|
611
|
+
for ldflag in self._Settings().get('OTHER_LDFLAGS', []):
|
612
|
+
ldflags.append(self._MapLinkerFlagFilename(ldflag, gyp_to_build_path))
|
613
|
+
|
614
|
+
if self._Test('DEAD_CODE_STRIPPING', 'YES', default='NO'):
|
615
|
+
ldflags.append('-Wl,-dead_strip')
|
616
|
+
|
617
|
+
if self._Test('PREBINDING', 'YES', default='NO'):
|
618
|
+
ldflags.append('-Wl,-prebind')
|
619
|
+
|
620
|
+
self._Appendf(
|
621
|
+
ldflags, 'DYLIB_COMPATIBILITY_VERSION', '-compatibility_version %s')
|
622
|
+
self._Appendf(
|
623
|
+
ldflags, 'DYLIB_CURRENT_VERSION', '-current_version %s')
|
624
|
+
|
625
|
+
self._AppendPlatformVersionMinFlags(ldflags)
|
626
|
+
|
627
|
+
if 'SDKROOT' in self._Settings():
|
628
|
+
ldflags.append('-isysroot ' + self._SdkPath())
|
629
|
+
|
630
|
+
for library_path in self._Settings().get('LIBRARY_SEARCH_PATHS', []):
|
631
|
+
ldflags.append('-L' + gyp_to_build_path(library_path))
|
632
|
+
|
633
|
+
if 'ORDER_FILE' in self._Settings():
|
634
|
+
ldflags.append('-Wl,-order_file ' +
|
635
|
+
'-Wl,' + gyp_to_build_path(
|
636
|
+
self._Settings()['ORDER_FILE']))
|
637
|
+
|
638
|
+
if arch is not None:
|
639
|
+
archs = [arch]
|
640
|
+
else:
|
641
|
+
archs = self._Settings().get('ARCHS', ['i386'])
|
642
|
+
if len(archs) != 1:
|
643
|
+
# TODO: Supporting fat binaries will be annoying.
|
644
|
+
self._WarnUnimplemented('ARCHS')
|
645
|
+
archs = ['i386']
|
646
|
+
ldflags.append('-arch ' + archs[0])
|
647
|
+
|
648
|
+
# Xcode adds the product directory by default.
|
649
|
+
ldflags.append('-L' + product_dir)
|
650
|
+
|
651
|
+
install_name = self.GetInstallName()
|
652
|
+
if install_name and self.spec['type'] != 'loadable_module':
|
653
|
+
ldflags.append('-install_name ' + install_name.replace(' ', r'\ '))
|
654
|
+
|
655
|
+
for rpath in self._Settings().get('LD_RUNPATH_SEARCH_PATHS', []):
|
656
|
+
ldflags.append('-Wl,-rpath,' + rpath)
|
657
|
+
|
658
|
+
if 'SDKROOT' in self._Settings():
|
659
|
+
config = self.spec['configurations'][self.configname]
|
660
|
+
framework_dirs = config.get('mac_framework_dirs', [])
|
661
|
+
for directory in framework_dirs:
|
662
|
+
ldflags.append('-F' + directory.replace('$(SDKROOT)', self._SdkPath()))
|
663
|
+
|
664
|
+
self.configname = None
|
665
|
+
return ldflags
|
666
|
+
|
667
|
+
def GetLibtoolflags(self, configname):
|
668
|
+
"""Returns flags that need to be passed to the static linker.
|
669
|
+
|
670
|
+
Args:
|
671
|
+
configname: The name of the configuration to get ld flags for.
|
672
|
+
"""
|
673
|
+
self.configname = configname
|
674
|
+
libtoolflags = []
|
675
|
+
|
676
|
+
for libtoolflag in self._Settings().get('OTHER_LDFLAGS', []):
|
677
|
+
libtoolflags.append(libtoolflag)
|
678
|
+
# TODO(thakis): ARCHS?
|
679
|
+
|
680
|
+
self.configname = None
|
681
|
+
return libtoolflags
|
682
|
+
|
683
|
+
def GetPerTargetSettings(self):
|
684
|
+
"""Gets a list of all the per-target settings. This will only fetch keys
|
685
|
+
whose values are the same across all configurations."""
|
686
|
+
first_pass = True
|
687
|
+
result = {}
|
688
|
+
for configname in sorted(self.xcode_settings.keys()):
|
689
|
+
if first_pass:
|
690
|
+
result = dict(self.xcode_settings[configname])
|
691
|
+
first_pass = False
|
692
|
+
else:
|
693
|
+
for key, value in self.xcode_settings[configname].iteritems():
|
694
|
+
if key not in result:
|
695
|
+
continue
|
696
|
+
elif result[key] != value:
|
697
|
+
del result[key]
|
698
|
+
return result
|
699
|
+
|
700
|
+
def GetPerConfigSetting(self, setting, configname, default=None):
|
701
|
+
if configname in self.xcode_settings:
|
702
|
+
return self.xcode_settings[configname].get(setting, default)
|
703
|
+
else:
|
704
|
+
return self.GetPerTargetSetting(setting, default)
|
705
|
+
|
706
|
+
def GetPerTargetSetting(self, setting, default=None):
|
707
|
+
"""Tries to get xcode_settings.setting from spec. Assumes that the setting
|
708
|
+
has the same value in all configurations and throws otherwise."""
|
709
|
+
is_first_pass = True
|
710
|
+
result = None
|
711
|
+
for configname in sorted(self.xcode_settings.keys()):
|
712
|
+
if is_first_pass:
|
713
|
+
result = self.xcode_settings[configname].get(setting, None)
|
714
|
+
is_first_pass = False
|
715
|
+
else:
|
716
|
+
assert result == self.xcode_settings[configname].get(setting, None), (
|
717
|
+
"Expected per-target setting for '%s', got per-config setting "
|
718
|
+
"(target %s)" % (setting, self.spec['target_name']))
|
719
|
+
if result is None:
|
720
|
+
return default
|
721
|
+
return result
|
722
|
+
|
723
|
+
def _GetStripPostbuilds(self, configname, output_binary, quiet):
|
724
|
+
"""Returns a list of shell commands that contain the shell commands
|
725
|
+
neccessary to strip this target's binary. These should be run as postbuilds
|
726
|
+
before the actual postbuilds run."""
|
727
|
+
self.configname = configname
|
728
|
+
|
729
|
+
result = []
|
730
|
+
if (self._Test('DEPLOYMENT_POSTPROCESSING', 'YES', default='NO') and
|
731
|
+
self._Test('STRIP_INSTALLED_PRODUCT', 'YES', default='NO')):
|
732
|
+
|
733
|
+
default_strip_style = 'debugging'
|
734
|
+
if self.spec['type'] == 'loadable_module' and self._IsBundle():
|
735
|
+
default_strip_style = 'non-global'
|
736
|
+
elif self.spec['type'] == 'executable':
|
737
|
+
default_strip_style = 'all'
|
738
|
+
|
739
|
+
strip_style = self._Settings().get('STRIP_STYLE', default_strip_style)
|
740
|
+
strip_flags = {
|
741
|
+
'all': '',
|
742
|
+
'non-global': '-x',
|
743
|
+
'debugging': '-S',
|
744
|
+
}[strip_style]
|
745
|
+
|
746
|
+
explicit_strip_flags = self._Settings().get('STRIPFLAGS', '')
|
747
|
+
if explicit_strip_flags:
|
748
|
+
strip_flags += ' ' + _NormalizeEnvVarReferences(explicit_strip_flags)
|
749
|
+
|
750
|
+
if not quiet:
|
751
|
+
result.append('echo STRIP\\(%s\\)' % self.spec['target_name'])
|
752
|
+
result.append('strip %s %s' % (strip_flags, output_binary))
|
753
|
+
|
754
|
+
self.configname = None
|
755
|
+
return result
|
756
|
+
|
757
|
+
def _GetDebugInfoPostbuilds(self, configname, output, output_binary, quiet):
|
758
|
+
"""Returns a list of shell commands that contain the shell commands
|
759
|
+
neccessary to massage this target's debug information. These should be run
|
760
|
+
as postbuilds before the actual postbuilds run."""
|
761
|
+
self.configname = configname
|
762
|
+
|
763
|
+
# For static libraries, no dSYMs are created.
|
764
|
+
result = []
|
765
|
+
if (self._Test('GCC_GENERATE_DEBUGGING_SYMBOLS', 'YES', default='YES') and
|
766
|
+
self._Test(
|
767
|
+
'DEBUG_INFORMATION_FORMAT', 'dwarf-with-dsym', default='dwarf') and
|
768
|
+
self.spec['type'] != 'static_library'):
|
769
|
+
if not quiet:
|
770
|
+
result.append('echo DSYMUTIL\\(%s\\)' % self.spec['target_name'])
|
771
|
+
result.append('dsymutil %s -o %s' % (output_binary, output + '.dSYM'))
|
772
|
+
|
773
|
+
self.configname = None
|
774
|
+
return result
|
775
|
+
|
776
|
+
def _GetTargetPostbuilds(self, configname, output, output_binary,
|
777
|
+
quiet=False):
|
778
|
+
"""Returns a list of shell commands that contain the shell commands
|
779
|
+
to run as postbuilds for this target, before the actual postbuilds."""
|
780
|
+
# dSYMs need to build before stripping happens.
|
781
|
+
return (
|
782
|
+
self._GetDebugInfoPostbuilds(configname, output, output_binary, quiet) +
|
783
|
+
self._GetStripPostbuilds(configname, output_binary, quiet))
|
784
|
+
|
785
|
+
def _GetIOSPostbuilds(self, configname, output_binary):
|
786
|
+
"""Return a shell command to codesign the iOS output binary so it can
|
787
|
+
be deployed to a device. This should be run as the very last step of the
|
788
|
+
build."""
|
789
|
+
if not (self.isIOS and self.spec['type'] == "executable"):
|
790
|
+
return []
|
791
|
+
|
792
|
+
identity = self.xcode_settings[configname].get('CODE_SIGN_IDENTITY', '')
|
793
|
+
if identity == '':
|
794
|
+
return []
|
795
|
+
if identity not in XcodeSettings._codesigning_key_cache:
|
796
|
+
proc = subprocess.Popen(['security', 'find-identity', '-p', 'codesigning',
|
797
|
+
'-v'], stdout=subprocess.PIPE)
|
798
|
+
output = proc.communicate()[0].strip()
|
799
|
+
key = None
|
800
|
+
for item in output.split("\n"):
|
801
|
+
if identity in item:
|
802
|
+
assert key == None, (
|
803
|
+
"Multiple codesigning identities for identity: %s" %
|
804
|
+
identity)
|
805
|
+
key = item.split(' ')[1]
|
806
|
+
XcodeSettings._codesigning_key_cache[identity] = key
|
807
|
+
key = XcodeSettings._codesigning_key_cache[identity]
|
808
|
+
if key:
|
809
|
+
# Warn for any unimplemented signing xcode keys.
|
810
|
+
unimpl = ['CODE_SIGN_RESOURCE_RULES_PATH', 'OTHER_CODE_SIGN_FLAGS',
|
811
|
+
'CODE_SIGN_ENTITLEMENTS']
|
812
|
+
keys = set(self.xcode_settings[configname].keys())
|
813
|
+
unimpl = set(unimpl) & keys
|
814
|
+
if unimpl:
|
815
|
+
print 'Warning: Some codesign keys not implemented, ignoring:', \
|
816
|
+
' '.join(unimpl)
|
817
|
+
return ['codesign --force --sign %s %s' % (key, output_binary)]
|
818
|
+
return []
|
819
|
+
|
820
|
+
def AddImplicitPostbuilds(self, configname, output, output_binary,
|
821
|
+
postbuilds=[], quiet=False):
|
822
|
+
"""Returns a list of shell commands that should run before and after
|
823
|
+
|postbuilds|."""
|
824
|
+
assert output_binary is not None
|
825
|
+
pre = self._GetTargetPostbuilds(configname, output, output_binary, quiet)
|
826
|
+
post = self._GetIOSPostbuilds(configname, output_binary)
|
827
|
+
return pre + postbuilds + post
|
828
|
+
|
829
|
+
def _AdjustLibrary(self, library, config_name=None):
|
830
|
+
if library.endswith('.framework'):
|
831
|
+
l = '-framework ' + os.path.splitext(os.path.basename(library))[0]
|
832
|
+
else:
|
833
|
+
m = self.library_re.match(library)
|
834
|
+
if m:
|
835
|
+
l = '-l' + m.group(1)
|
836
|
+
else:
|
837
|
+
l = library
|
838
|
+
if self._SdkPath():
|
839
|
+
return l.replace('$(SDKROOT)', self._SdkPath(config_name))
|
840
|
+
else:
|
841
|
+
return l
|
842
|
+
|
843
|
+
def AdjustLibraries(self, libraries, config_name=None):
|
844
|
+
"""Transforms entries like 'Cocoa.framework' in libraries into entries like
|
845
|
+
'-framework Cocoa', 'libcrypto.dylib' into '-lcrypto', etc.
|
846
|
+
"""
|
847
|
+
libraries = [self._AdjustLibrary(library, config_name)
|
848
|
+
for library in libraries]
|
849
|
+
return libraries
|
850
|
+
|
851
|
+
def _BuildMachineOSBuild(self):
|
852
|
+
return self._GetStdout(['sw_vers', '-buildVersion'])
|
853
|
+
|
854
|
+
def _XcodeVersion(self):
|
855
|
+
# `xcodebuild -version` output looks like
|
856
|
+
# Xcode 4.6.3
|
857
|
+
# Build version 4H1503
|
858
|
+
# or like
|
859
|
+
# Xcode 3.2.6
|
860
|
+
# Component versions: DevToolsCore-1809.0; DevToolsSupport-1806.0
|
861
|
+
# BuildVersion: 10M2518
|
862
|
+
# Convert that to '0463', '4H1503'.
|
863
|
+
version_list = self._GetStdout(['xcodebuild', '-version']).splitlines()
|
864
|
+
version = version_list[0]
|
865
|
+
build = version_list[-1]
|
866
|
+
# Be careful to convert "4.2" to "0420":
|
867
|
+
version = version.split()[-1].replace('.', '')
|
868
|
+
version = (version + '0' * (3 - len(version))).zfill(4)
|
869
|
+
build = build.split()[-1]
|
870
|
+
return version, build
|
871
|
+
|
872
|
+
def _XcodeIOSDeviceFamily(self, configname):
|
873
|
+
family = self.xcode_settings[configname].get('TARGETED_DEVICE_FAMILY', '1')
|
874
|
+
return [int(x) for x in family.split(',')]
|
875
|
+
|
876
|
+
def GetExtraPlistItems(self, configname=None):
|
877
|
+
"""Returns a dictionary with extra items to insert into Info.plist."""
|
878
|
+
if configname not in XcodeSettings._plist_cache:
|
879
|
+
cache = {}
|
880
|
+
cache['BuildMachineOSBuild'] = self._BuildMachineOSBuild()
|
881
|
+
|
882
|
+
xcode, xcode_build = self._XcodeVersion()
|
883
|
+
cache['DTXcode'] = xcode
|
884
|
+
cache['DTXcodeBuild'] = xcode_build
|
885
|
+
|
886
|
+
sdk_root = self._SdkRoot(configname)
|
887
|
+
cache['DTSDKName'] = sdk_root
|
888
|
+
if xcode >= '0430':
|
889
|
+
cache['DTSDKBuild'] = self._GetSdkVersionInfoItem(
|
890
|
+
sdk_root, 'ProductBuildVersion')
|
891
|
+
else:
|
892
|
+
cache['DTSDKBuild'] = cache['BuildMachineOSBuild']
|
893
|
+
|
894
|
+
if self.isIOS:
|
895
|
+
cache['DTPlatformName'] = cache['DTSDKName']
|
896
|
+
if configname.endswith("iphoneos"):
|
897
|
+
cache['DTPlatformVersion'] = self._GetSdkVersionInfoItem(
|
898
|
+
sdk_root, 'ProductVersion')
|
899
|
+
cache['CFBundleSupportedPlatforms'] = ['iPhoneOS']
|
900
|
+
else:
|
901
|
+
cache['CFBundleSupportedPlatforms'] = ['iPhoneSimulator']
|
902
|
+
XcodeSettings._plist_cache[configname] = cache
|
903
|
+
|
904
|
+
# Include extra plist items that are per-target, not per global
|
905
|
+
# XcodeSettings.
|
906
|
+
items = dict(XcodeSettings._plist_cache[configname])
|
907
|
+
if self.isIOS:
|
908
|
+
items['UIDeviceFamily'] = self._XcodeIOSDeviceFamily(configname)
|
909
|
+
return items
|
910
|
+
|
911
|
+
|
912
|
+
class MacPrefixHeader(object):
|
913
|
+
"""A class that helps with emulating Xcode's GCC_PREFIX_HEADER feature.
|
914
|
+
|
915
|
+
This feature consists of several pieces:
|
916
|
+
* If GCC_PREFIX_HEADER is present, all compilations in that project get an
|
917
|
+
additional |-include path_to_prefix_header| cflag.
|
918
|
+
* If GCC_PRECOMPILE_PREFIX_HEADER is present too, then the prefix header is
|
919
|
+
instead compiled, and all other compilations in the project get an
|
920
|
+
additional |-include path_to_compiled_header| instead.
|
921
|
+
+ Compiled prefix headers have the extension gch. There is one gch file for
|
922
|
+
every language used in the project (c, cc, m, mm), since gch files for
|
923
|
+
different languages aren't compatible.
|
924
|
+
+ gch files themselves are built with the target's normal cflags, but they
|
925
|
+
obviously don't get the |-include| flag. Instead, they need a -x flag that
|
926
|
+
describes their language.
|
927
|
+
+ All o files in the target need to depend on the gch file, to make sure
|
928
|
+
it's built before any o file is built.
|
929
|
+
|
930
|
+
This class helps with some of these tasks, but it needs help from the build
|
931
|
+
system for writing dependencies to the gch files, for writing build commands
|
932
|
+
for the gch files, and for figuring out the location of the gch files.
|
933
|
+
"""
|
934
|
+
def __init__(self, xcode_settings,
|
935
|
+
gyp_path_to_build_path, gyp_path_to_build_output):
|
936
|
+
"""If xcode_settings is None, all methods on this class are no-ops.
|
937
|
+
|
938
|
+
Args:
|
939
|
+
gyp_path_to_build_path: A function that takes a gyp-relative path,
|
940
|
+
and returns a path relative to the build directory.
|
941
|
+
gyp_path_to_build_output: A function that takes a gyp-relative path and
|
942
|
+
a language code ('c', 'cc', 'm', or 'mm'), and that returns a path
|
943
|
+
to where the output of precompiling that path for that language
|
944
|
+
should be placed (without the trailing '.gch').
|
945
|
+
"""
|
946
|
+
# This doesn't support per-configuration prefix headers. Good enough
|
947
|
+
# for now.
|
948
|
+
self.header = None
|
949
|
+
self.compile_headers = False
|
950
|
+
if xcode_settings:
|
951
|
+
self.header = xcode_settings.GetPerTargetSetting('GCC_PREFIX_HEADER')
|
952
|
+
self.compile_headers = xcode_settings.GetPerTargetSetting(
|
953
|
+
'GCC_PRECOMPILE_PREFIX_HEADER', default='NO') != 'NO'
|
954
|
+
self.compiled_headers = {}
|
955
|
+
if self.header:
|
956
|
+
if self.compile_headers:
|
957
|
+
for lang in ['c', 'cc', 'm', 'mm']:
|
958
|
+
self.compiled_headers[lang] = gyp_path_to_build_output(
|
959
|
+
self.header, lang)
|
960
|
+
self.header = gyp_path_to_build_path(self.header)
|
961
|
+
|
962
|
+
def _CompiledHeader(self, lang, arch):
|
963
|
+
assert self.compile_headers
|
964
|
+
h = self.compiled_headers[lang]
|
965
|
+
if arch:
|
966
|
+
h += '.' + arch
|
967
|
+
return h
|
968
|
+
|
969
|
+
def GetInclude(self, lang, arch=None):
|
970
|
+
"""Gets the cflags to include the prefix header for language |lang|."""
|
971
|
+
if self.compile_headers and lang in self.compiled_headers:
|
972
|
+
return '-include %s' % self._CompiledHeader(lang, arch)
|
973
|
+
elif self.header:
|
974
|
+
return '-include %s' % self.header
|
975
|
+
else:
|
976
|
+
return ''
|
977
|
+
|
978
|
+
def _Gch(self, lang, arch):
|
979
|
+
"""Returns the actual file name of the prefix header for language |lang|."""
|
980
|
+
assert self.compile_headers
|
981
|
+
return self._CompiledHeader(lang, arch) + '.gch'
|
982
|
+
|
983
|
+
def GetObjDependencies(self, sources, objs, arch=None):
|
984
|
+
"""Given a list of source files and the corresponding object files, returns
|
985
|
+
a list of (source, object, gch) tuples, where |gch| is the build-directory
|
986
|
+
relative path to the gch file each object file depends on. |compilable[i]|
|
987
|
+
has to be the source file belonging to |objs[i]|."""
|
988
|
+
if not self.header or not self.compile_headers:
|
989
|
+
return []
|
990
|
+
|
991
|
+
result = []
|
992
|
+
for source, obj in zip(sources, objs):
|
993
|
+
ext = os.path.splitext(source)[1]
|
994
|
+
lang = {
|
995
|
+
'.c': 'c',
|
996
|
+
'.cpp': 'cc', '.cc': 'cc', '.cxx': 'cc',
|
997
|
+
'.m': 'm',
|
998
|
+
'.mm': 'mm',
|
999
|
+
}.get(ext, None)
|
1000
|
+
if lang:
|
1001
|
+
result.append((source, obj, self._Gch(lang, arch)))
|
1002
|
+
return result
|
1003
|
+
|
1004
|
+
def GetPchBuildCommands(self, arch=None):
|
1005
|
+
"""Returns [(path_to_gch, language_flag, language, header)].
|
1006
|
+
|path_to_gch| and |header| are relative to the build directory.
|
1007
|
+
"""
|
1008
|
+
if not self.header or not self.compile_headers:
|
1009
|
+
return []
|
1010
|
+
return [
|
1011
|
+
(self._Gch('c', arch), '-x c-header', 'c', self.header),
|
1012
|
+
(self._Gch('cc', arch), '-x c++-header', 'cc', self.header),
|
1013
|
+
(self._Gch('m', arch), '-x objective-c-header', 'm', self.header),
|
1014
|
+
(self._Gch('mm', arch), '-x objective-c++-header', 'mm', self.header),
|
1015
|
+
]
|
1016
|
+
|
1017
|
+
|
1018
|
+
def MergeGlobalXcodeSettingsToSpec(global_dict, spec):
|
1019
|
+
"""Merges the global xcode_settings dictionary into each configuration of the
|
1020
|
+
target represented by spec. For keys that are both in the global and the local
|
1021
|
+
xcode_settings dict, the local key gets precendence.
|
1022
|
+
"""
|
1023
|
+
# The xcode generator special-cases global xcode_settings and does something
|
1024
|
+
# that amounts to merging in the global xcode_settings into each local
|
1025
|
+
# xcode_settings dict.
|
1026
|
+
global_xcode_settings = global_dict.get('xcode_settings', {})
|
1027
|
+
for config in spec['configurations'].values():
|
1028
|
+
if 'xcode_settings' in config:
|
1029
|
+
new_settings = global_xcode_settings.copy()
|
1030
|
+
new_settings.update(config['xcode_settings'])
|
1031
|
+
config['xcode_settings'] = new_settings
|
1032
|
+
|
1033
|
+
|
1034
|
+
def IsMacBundle(flavor, spec):
|
1035
|
+
"""Returns if |spec| should be treated as a bundle.
|
1036
|
+
|
1037
|
+
Bundles are directories with a certain subdirectory structure, instead of
|
1038
|
+
just a single file. Bundle rules do not produce a binary but also package
|
1039
|
+
resources into that directory."""
|
1040
|
+
is_mac_bundle = (int(spec.get('mac_bundle', 0)) != 0 and flavor == 'mac')
|
1041
|
+
if is_mac_bundle:
|
1042
|
+
assert spec['type'] != 'none', (
|
1043
|
+
'mac_bundle targets cannot have type none (target "%s")' %
|
1044
|
+
spec['target_name'])
|
1045
|
+
return is_mac_bundle
|
1046
|
+
|
1047
|
+
|
1048
|
+
def GetMacBundleResources(product_dir, xcode_settings, resources):
|
1049
|
+
"""Yields (output, resource) pairs for every resource in |resources|.
|
1050
|
+
Only call this for mac bundle targets.
|
1051
|
+
|
1052
|
+
Args:
|
1053
|
+
product_dir: Path to the directory containing the output bundle,
|
1054
|
+
relative to the build directory.
|
1055
|
+
xcode_settings: The XcodeSettings of the current target.
|
1056
|
+
resources: A list of bundle resources, relative to the build directory.
|
1057
|
+
"""
|
1058
|
+
dest = os.path.join(product_dir,
|
1059
|
+
xcode_settings.GetBundleResourceFolder())
|
1060
|
+
for res in resources:
|
1061
|
+
output = dest
|
1062
|
+
|
1063
|
+
# The make generator doesn't support it, so forbid it everywhere
|
1064
|
+
# to keep the generators more interchangable.
|
1065
|
+
assert ' ' not in res, (
|
1066
|
+
"Spaces in resource filenames not supported (%s)" % res)
|
1067
|
+
|
1068
|
+
# Split into (path,file).
|
1069
|
+
res_parts = os.path.split(res)
|
1070
|
+
|
1071
|
+
# Now split the path into (prefix,maybe.lproj).
|
1072
|
+
lproj_parts = os.path.split(res_parts[0])
|
1073
|
+
# If the resource lives in a .lproj bundle, add that to the destination.
|
1074
|
+
if lproj_parts[1].endswith('.lproj'):
|
1075
|
+
output = os.path.join(output, lproj_parts[1])
|
1076
|
+
|
1077
|
+
output = os.path.join(output, res_parts[1])
|
1078
|
+
# Compiled XIB files are referred to by .nib.
|
1079
|
+
if output.endswith('.xib'):
|
1080
|
+
output = os.path.splitext(output)[0] + '.nib'
|
1081
|
+
# Compiled storyboard files are referred to by .storyboardc.
|
1082
|
+
if output.endswith('.storyboard'):
|
1083
|
+
output = os.path.splitext(output)[0] + '.storyboardc'
|
1084
|
+
|
1085
|
+
yield output, res
|
1086
|
+
|
1087
|
+
|
1088
|
+
def GetMacInfoPlist(product_dir, xcode_settings, gyp_path_to_build_path):
|
1089
|
+
"""Returns (info_plist, dest_plist, defines, extra_env), where:
|
1090
|
+
* |info_plist| is the source plist path, relative to the
|
1091
|
+
build directory,
|
1092
|
+
* |dest_plist| is the destination plist path, relative to the
|
1093
|
+
build directory,
|
1094
|
+
* |defines| is a list of preprocessor defines (empty if the plist
|
1095
|
+
shouldn't be preprocessed,
|
1096
|
+
* |extra_env| is a dict of env variables that should be exported when
|
1097
|
+
invoking |mac_tool copy-info-plist|.
|
1098
|
+
|
1099
|
+
Only call this for mac bundle targets.
|
1100
|
+
|
1101
|
+
Args:
|
1102
|
+
product_dir: Path to the directory containing the output bundle,
|
1103
|
+
relative to the build directory.
|
1104
|
+
xcode_settings: The XcodeSettings of the current target.
|
1105
|
+
gyp_to_build_path: A function that converts paths relative to the
|
1106
|
+
current gyp file to paths relative to the build direcotry.
|
1107
|
+
"""
|
1108
|
+
info_plist = xcode_settings.GetPerTargetSetting('INFOPLIST_FILE')
|
1109
|
+
if not info_plist:
|
1110
|
+
return None, None, [], {}
|
1111
|
+
|
1112
|
+
# The make generator doesn't support it, so forbid it everywhere
|
1113
|
+
# to keep the generators more interchangable.
|
1114
|
+
assert ' ' not in info_plist, (
|
1115
|
+
"Spaces in Info.plist filenames not supported (%s)" % info_plist)
|
1116
|
+
|
1117
|
+
info_plist = gyp_path_to_build_path(info_plist)
|
1118
|
+
|
1119
|
+
# If explicitly set to preprocess the plist, invoke the C preprocessor and
|
1120
|
+
# specify any defines as -D flags.
|
1121
|
+
if xcode_settings.GetPerTargetSetting(
|
1122
|
+
'INFOPLIST_PREPROCESS', default='NO') == 'YES':
|
1123
|
+
# Create an intermediate file based on the path.
|
1124
|
+
defines = shlex.split(xcode_settings.GetPerTargetSetting(
|
1125
|
+
'INFOPLIST_PREPROCESSOR_DEFINITIONS', default=''))
|
1126
|
+
else:
|
1127
|
+
defines = []
|
1128
|
+
|
1129
|
+
dest_plist = os.path.join(product_dir, xcode_settings.GetBundlePlistPath())
|
1130
|
+
extra_env = xcode_settings.GetPerTargetSettings()
|
1131
|
+
|
1132
|
+
return info_plist, dest_plist, defines, extra_env
|
1133
|
+
|
1134
|
+
|
1135
|
+
def _GetXcodeEnv(xcode_settings, built_products_dir, srcroot, configuration,
|
1136
|
+
additional_settings=None):
|
1137
|
+
"""Return the environment variables that Xcode would set. See
|
1138
|
+
http://developer.apple.com/library/mac/#documentation/DeveloperTools/Reference/XcodeBuildSettingRef/1-Build_Setting_Reference/build_setting_ref.html#//apple_ref/doc/uid/TP40003931-CH3-SW153
|
1139
|
+
for a full list.
|
1140
|
+
|
1141
|
+
Args:
|
1142
|
+
xcode_settings: An XcodeSettings object. If this is None, this function
|
1143
|
+
returns an empty dict.
|
1144
|
+
built_products_dir: Absolute path to the built products dir.
|
1145
|
+
srcroot: Absolute path to the source root.
|
1146
|
+
configuration: The build configuration name.
|
1147
|
+
additional_settings: An optional dict with more values to add to the
|
1148
|
+
result.
|
1149
|
+
"""
|
1150
|
+
if not xcode_settings: return {}
|
1151
|
+
|
1152
|
+
# This function is considered a friend of XcodeSettings, so let it reach into
|
1153
|
+
# its implementation details.
|
1154
|
+
spec = xcode_settings.spec
|
1155
|
+
|
1156
|
+
# These are filled in on a as-needed basis.
|
1157
|
+
env = {
|
1158
|
+
'BUILT_PRODUCTS_DIR' : built_products_dir,
|
1159
|
+
'CONFIGURATION' : configuration,
|
1160
|
+
'PRODUCT_NAME' : xcode_settings.GetProductName(),
|
1161
|
+
# See /Developer/Platforms/MacOSX.platform/Developer/Library/Xcode/Specifications/MacOSX\ Product\ Types.xcspec for FULL_PRODUCT_NAME
|
1162
|
+
'SRCROOT' : srcroot,
|
1163
|
+
'SOURCE_ROOT': '${SRCROOT}',
|
1164
|
+
# This is not true for static libraries, but currently the env is only
|
1165
|
+
# written for bundles:
|
1166
|
+
'TARGET_BUILD_DIR' : built_products_dir,
|
1167
|
+
'TEMP_DIR' : '${TMPDIR}',
|
1168
|
+
}
|
1169
|
+
if xcode_settings.GetPerConfigSetting('SDKROOT', configuration):
|
1170
|
+
env['SDKROOT'] = xcode_settings._SdkPath(configuration)
|
1171
|
+
else:
|
1172
|
+
env['SDKROOT'] = ''
|
1173
|
+
|
1174
|
+
if spec['type'] in (
|
1175
|
+
'executable', 'static_library', 'shared_library', 'loadable_module'):
|
1176
|
+
env['EXECUTABLE_NAME'] = xcode_settings.GetExecutableName()
|
1177
|
+
env['EXECUTABLE_PATH'] = xcode_settings.GetExecutablePath()
|
1178
|
+
env['FULL_PRODUCT_NAME'] = xcode_settings.GetFullProductName()
|
1179
|
+
mach_o_type = xcode_settings.GetMachOType()
|
1180
|
+
if mach_o_type:
|
1181
|
+
env['MACH_O_TYPE'] = mach_o_type
|
1182
|
+
env['PRODUCT_TYPE'] = xcode_settings.GetProductType()
|
1183
|
+
if xcode_settings._IsBundle():
|
1184
|
+
env['CONTENTS_FOLDER_PATH'] = \
|
1185
|
+
xcode_settings.GetBundleContentsFolderPath()
|
1186
|
+
env['UNLOCALIZED_RESOURCES_FOLDER_PATH'] = \
|
1187
|
+
xcode_settings.GetBundleResourceFolder()
|
1188
|
+
env['INFOPLIST_PATH'] = xcode_settings.GetBundlePlistPath()
|
1189
|
+
env['WRAPPER_NAME'] = xcode_settings.GetWrapperName()
|
1190
|
+
|
1191
|
+
install_name = xcode_settings.GetInstallName()
|
1192
|
+
if install_name:
|
1193
|
+
env['LD_DYLIB_INSTALL_NAME'] = install_name
|
1194
|
+
install_name_base = xcode_settings.GetInstallNameBase()
|
1195
|
+
if install_name_base:
|
1196
|
+
env['DYLIB_INSTALL_NAME_BASE'] = install_name_base
|
1197
|
+
|
1198
|
+
if not additional_settings:
|
1199
|
+
additional_settings = {}
|
1200
|
+
else:
|
1201
|
+
# Flatten lists to strings.
|
1202
|
+
for k in additional_settings:
|
1203
|
+
if not isinstance(additional_settings[k], str):
|
1204
|
+
additional_settings[k] = ' '.join(additional_settings[k])
|
1205
|
+
additional_settings.update(env)
|
1206
|
+
|
1207
|
+
for k in additional_settings:
|
1208
|
+
additional_settings[k] = _NormalizeEnvVarReferences(additional_settings[k])
|
1209
|
+
|
1210
|
+
return additional_settings
|
1211
|
+
|
1212
|
+
|
1213
|
+
def _NormalizeEnvVarReferences(str):
|
1214
|
+
"""Takes a string containing variable references in the form ${FOO}, $(FOO),
|
1215
|
+
or $FOO, and returns a string with all variable references in the form ${FOO}.
|
1216
|
+
"""
|
1217
|
+
# $FOO -> ${FOO}
|
1218
|
+
str = re.sub(r'\$([a-zA-Z_][a-zA-Z0-9_]*)', r'${\1}', str)
|
1219
|
+
|
1220
|
+
# $(FOO) -> ${FOO}
|
1221
|
+
matches = re.findall(r'(\$\(([a-zA-Z0-9\-_]+)\))', str)
|
1222
|
+
for match in matches:
|
1223
|
+
to_replace, variable = match
|
1224
|
+
assert '$(' not in match, '$($(FOO)) variables not supported: ' + match
|
1225
|
+
str = str.replace(to_replace, '${' + variable + '}')
|
1226
|
+
|
1227
|
+
return str
|
1228
|
+
|
1229
|
+
|
1230
|
+
def ExpandEnvVars(string, expansions):
|
1231
|
+
"""Expands ${VARIABLES}, $(VARIABLES), and $VARIABLES in string per the
|
1232
|
+
expansions list. If the variable expands to something that references
|
1233
|
+
another variable, this variable is expanded as well if it's in env --
|
1234
|
+
until no variables present in env are left."""
|
1235
|
+
for k, v in reversed(expansions):
|
1236
|
+
string = string.replace('${' + k + '}', v)
|
1237
|
+
string = string.replace('$(' + k + ')', v)
|
1238
|
+
string = string.replace('$' + k, v)
|
1239
|
+
return string
|
1240
|
+
|
1241
|
+
|
1242
|
+
def _TopologicallySortedEnvVarKeys(env):
|
1243
|
+
"""Takes a dict |env| whose values are strings that can refer to other keys,
|
1244
|
+
for example env['foo'] = '$(bar) and $(baz)'. Returns a list L of all keys of
|
1245
|
+
env such that key2 is after key1 in L if env[key2] refers to env[key1].
|
1246
|
+
|
1247
|
+
Throws an Exception in case of dependency cycles.
|
1248
|
+
"""
|
1249
|
+
# Since environment variables can refer to other variables, the evaluation
|
1250
|
+
# order is important. Below is the logic to compute the dependency graph
|
1251
|
+
# and sort it.
|
1252
|
+
regex = re.compile(r'\$\{([a-zA-Z0-9\-_]+)\}')
|
1253
|
+
def GetEdges(node):
|
1254
|
+
# Use a definition of edges such that user_of_variable -> used_varible.
|
1255
|
+
# This happens to be easier in this case, since a variable's
|
1256
|
+
# definition contains all variables it references in a single string.
|
1257
|
+
# We can then reverse the result of the topological sort at the end.
|
1258
|
+
# Since: reverse(topsort(DAG)) = topsort(reverse_edges(DAG))
|
1259
|
+
matches = set([v for v in regex.findall(env[node]) if v in env])
|
1260
|
+
for dependee in matches:
|
1261
|
+
assert '${' not in dependee, 'Nested variables not supported: ' + dependee
|
1262
|
+
return matches
|
1263
|
+
|
1264
|
+
try:
|
1265
|
+
# Topologically sort, and then reverse, because we used an edge definition
|
1266
|
+
# that's inverted from the expected result of this function (see comment
|
1267
|
+
# above).
|
1268
|
+
order = gyp.common.TopologicallySorted(env.keys(), GetEdges)
|
1269
|
+
order.reverse()
|
1270
|
+
return order
|
1271
|
+
except gyp.common.CycleError, e:
|
1272
|
+
raise GypError(
|
1273
|
+
'Xcode environment variables are cyclically dependent: ' + str(e.nodes))
|
1274
|
+
|
1275
|
+
|
1276
|
+
def GetSortedXcodeEnv(xcode_settings, built_products_dir, srcroot,
|
1277
|
+
configuration, additional_settings=None):
|
1278
|
+
env = _GetXcodeEnv(xcode_settings, built_products_dir, srcroot, configuration,
|
1279
|
+
additional_settings)
|
1280
|
+
return [(key, env[key]) for key in _TopologicallySortedEnvVarKeys(env)]
|
1281
|
+
|
1282
|
+
|
1283
|
+
def GetSpecPostbuildCommands(spec, quiet=False):
|
1284
|
+
"""Returns the list of postbuilds explicitly defined on |spec|, in a form
|
1285
|
+
executable by a shell."""
|
1286
|
+
postbuilds = []
|
1287
|
+
for postbuild in spec.get('postbuilds', []):
|
1288
|
+
if not quiet:
|
1289
|
+
postbuilds.append('echo POSTBUILD\\(%s\\) %s' % (
|
1290
|
+
spec['target_name'], postbuild['postbuild_name']))
|
1291
|
+
postbuilds.append(gyp.common.EncodePOSIXShellList(postbuild['action']))
|
1292
|
+
return postbuilds
|
1293
|
+
|
1294
|
+
|
1295
|
+
def _HasIOSTarget(targets):
|
1296
|
+
"""Returns true if any target contains the iOS specific key
|
1297
|
+
IPHONEOS_DEPLOYMENT_TARGET."""
|
1298
|
+
for target_dict in targets.values():
|
1299
|
+
for config in target_dict['configurations'].values():
|
1300
|
+
if config.get('xcode_settings', {}).get('IPHONEOS_DEPLOYMENT_TARGET'):
|
1301
|
+
return True
|
1302
|
+
return False
|
1303
|
+
|
1304
|
+
|
1305
|
+
def _AddIOSDeviceConfigurations(targets):
|
1306
|
+
"""Clone all targets and append -iphoneos to the name. Configure these targets
|
1307
|
+
to build for iOS devices."""
|
1308
|
+
for target_dict in targets.values():
|
1309
|
+
for config_name in target_dict['configurations'].keys():
|
1310
|
+
config = target_dict['configurations'][config_name]
|
1311
|
+
new_config_name = config_name + '-iphoneos'
|
1312
|
+
new_config_dict = copy.deepcopy(config)
|
1313
|
+
if target_dict['toolset'] == 'target':
|
1314
|
+
new_config_dict['xcode_settings']['ARCHS'] = ['armv7']
|
1315
|
+
new_config_dict['xcode_settings']['SDKROOT'] = 'iphoneos'
|
1316
|
+
target_dict['configurations'][new_config_name] = new_config_dict
|
1317
|
+
return targets
|
1318
|
+
|
1319
|
+
def CloneConfigurationForDeviceAndEmulator(target_dicts):
|
1320
|
+
"""If |target_dicts| contains any iOS targets, automatically create -iphoneos
|
1321
|
+
targets for iOS device builds."""
|
1322
|
+
if _HasIOSTarget(target_dicts):
|
1323
|
+
return _AddIOSDeviceConfigurations(target_dicts)
|
1324
|
+
return target_dicts
|