require 'common/version' module Bake class Usage def self.version Bake::Version.printBakeVersion ExitHelper.exit(0) end def self.show Bake::Version.printBakeVersion puts "\nUsage: bake [options]" puts " [-b] Config name of main project" puts " -m Directory of main project (default is current directory)." puts " -p Project to build/clean (default is main project)" puts " -f Build/Clean this file only." puts " -c Clean the file/project." puts " -a Use ansi color sequences (console must-- support it). Possible values are 'white' and 'black'." puts " -v Verbose level from 0 to 3, whereas -v0 is less, -v1 is normal (default) and -v2 and -v3 are more verbose." puts " -r Stop on first error." puts " -w Add a workspace root (can be used multiple times)." puts " If no root is specified, the parent directory of the main project is added automatically." puts " --list Lists all configs with a DefaultToolchain." puts " --rebuild Clean before build." puts " --clobber Clean the file/project (same as option -c) AND the bake cache files." puts " --prepro Stop after preprocessor." puts " --link-only Only link executables - doesn't update objects and archives or start PreSteps and PostSteps." puts " Forces executables to be relinked." puts " --compile-only Only the compile steps are executed, equivalent to -f '.'" puts " --generate-doc Builds docu instead of compiling sources." puts " --lint Performs Lint checks instead of compiling sources." puts " --lint-min If number of files in a project is too large for lint to handle, it is possible" puts " to specify only a part of the file list to lint (default -1)." puts " --lint-max See above (default -1)." puts " --ignore-cache Rereads the original meta files - usefull if workspace structure has been changed." puts " -j Set NUMBER of parallel compiled files (default is 8)." puts " --socket Set SOCKET for sending errors, receiving commands, etc. - used by e.g. Eclipse." puts " --toolchain-info Prints default values of a toolchain." puts " --toolchain-names Prints available toolchains." puts " --dot Creates a .dot file of the config dependencies." puts " --do Includes steps with this filter name (can be used multiple times)." puts " 'PRE', 'POST', 'STARTUP' or 'EXIT' includes all according steps." puts " --omit Excludes steps with this filter name (can be used multiple times)." puts " 'PRE', 'POST', 'STARTUP' or 'EXIT' excludes all according steps." puts " --abs-paths Compiler prints absolute filename paths instead of relative paths." puts " --Wparse The error parser result is also taken into account, not only the return value of compiler, archiver and linker." puts " --no-autodir Disable auto completion of paths like in IncludeDir" puts " --set = Sets a variable. Overwrites variables defined in Project.metas (can be used multiple times)." puts " --adapt Specifies an adapt project to manipulate the configs (can be used multiple times)" puts " --incs-and-defs=json Prints includes and defines of all projects in json format" puts " --incs-and-defs=bake Used by IDEs plugins" puts " --conversion-info Prints infos for an external tool which converts bake configs for other build systems" # puts " --bundle Bundles the output (experimental, description will follow)" puts " --prebuild Does not build configs which are marked as 'prebuild', this feature is used for distributions." puts " --compilation-db [] Writes compilation information into filename fn in json format, default for fn is compilation-db.json" puts " --create exe|lib|custom Creates a project with exe, lib or custom template" puts " --link-2-17 DEPRECATED: Using link order of libraries which was used until bake 2.17" puts " --build_ DEPRECATED: build directories will be build_ instead of build/" puts " --version Print version." puts " --time Print elapsed time at the end." puts " --doc Open documentation in browser" puts " -h, --help Print this help." puts " --license Print the license." puts " --debug Print out backtraces in some cases - used only for debugging bake." ExitHelper.exit(0) end def self.bundle puts "\nOption --bundle not supported anymore, please contact the author via github if still needed." ExitHelper.exit(1) end end end