auto merge of #581 : alexcrichton/cargo/manpage, r=brson

Closes #578
This commit is contained in:
bors 2014-09-16 17:43:43 +00:00
commit ee1df634fd
2 changed files with 90 additions and 1 deletions

View File

@ -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

87
src/etc/cargo.1 Normal file
View File

@ -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
<COMMAND> [<ARGS>...]
.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 <command>'
.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.