From 319d72f0cd8ad441f9dd022599c37c722204aace Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 16 Sep 2014 09:38:35 -0700 Subject: [PATCH] Add a manpage Closes #578 --- Makefile.in | 4 ++- src/etc/cargo.1 | 87 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 src/etc/cargo.1 diff --git a/Makefile.in b/Makefile.in index bf493ad07..a94db80d2 100644 --- a/Makefile.in +++ b/Makefile.in @@ -148,8 +148,10 @@ prepare-manifest-$(1): @[ -f $$(TARGET_$(1))/cargo$$(X) ] || echo 'Please run `make` first' @[ -f $$(TARGET_$(1))/cargo$$(X) ] rm -rf $$(PKGDIR_$(1)) - mkdir -p $$(PKGDIR_$(1))/bin $$(PKGDIR_$(1))/lib/cargo + mkdir -p $$(PKGDIR_$(1))/bin $$(PKGDIR_$(1))/lib/cargo \ + $$(PKGDIR_$(1))/share/man/man1 cp $$(TARGET_$(1))/cargo$$(X) $$(PKGDIR_$(1))/bin + cp src/etc/cargo.1 $$(PKGDIR_$(1))/share/man/man1 #cp $$(BIN_TARGETS_$(1)) $$(PKGDIR_$(1))/lib/cargo (cd $$(PKGDIR_$(1)) && find . -type f | sed 's/^\.\///') \ > $$(DISTDIR_$(1))/manifest-$$(PKG_NAME).in diff --git a/src/etc/cargo.1 b/src/etc/cargo.1 new file mode 100644 index 000000000..e0f9a476c --- /dev/null +++ b/src/etc/cargo.1 @@ -0,0 +1,87 @@ +.TH CARGO "1" "September 2014" "cargo 0.0.1-pre" "User Commands" +.SH NAME +cargo \- The Rust package manager +.SH SYNOPSIS +.B cargo + [...] + +.B cargo +[\fIOPTIONS\fR] + +.SH DESCRIPTION +This program is a package manager for the Rust language, available at +<\fBhttp://rust-lang.org\fR>. + +.SH OPTIONS + +.TP +\fB\-h, \-\-help\fR +Display a help message +.TP +\fB\-V, \-\-version\fR +Print version information and exit +.TP +\fB\-\-list\fR +List all available cargo commands +.TP +\fB\-v, \-\-verbose\fR +Use verbose output + +.SH COMMANDS + +To get extended information about commands, run 'cargo help ' + +.TP +\fBcargo build\fR +Compile the current project +.TP +\fBcargo clean\fR +Remove the target directory with build output +.TP +\fBcargo doc\fR +Build this project's and its dependencies' documentation +.TP +\fBcargo new\fR +Create a new cargo project +.TP +\fBcargo run\fR +Build and execute src/main.rs +.TP +\fBcargo test\fR +Run the tests for the package +.TP +\fBcargo bench\fR +Run the benchmarks for the package +.TP +\fBcargo update\fR +Update dependencies in Cargo.lock +.TP +\fBcargo package\fR +Generate a source tarball for the current package +.TP +\fBcargo version\fR +Print cargo's version and exit + +.SH "EXAMPLES" +Build a local package and all of its dependencies + $ cargo build + +Build a package with optimizations + $ cargo build --release + +Run tests for a cross-compiled target + $ cargo test --target i686-unknown-linux-gnu + +Learn about a command's options and usage + $ cargo help clean + +.SH "SEE ALSO" + +rustc, rustdoc + +.SH "BUGS" +See <\fBhttps://github.com/rust-lang/cargo/issues\fR> for issues. + +.SH "COPYRIGHT" +This work is dual-licensed under Apache 2.0 and MIT terms. See \fBCOPYRIGHT\fR +file in the cargo source distribution.