rust/mk
bors b63cd004fc auto merge of #12793 : brson/rust/installer, r=alexcrichton
Work towards #9876.

Several minor things here:
  * Fix the `need_ok` function in `configure`
  * Install man pages with non-executable permissions
  * Use the correct directory for man pages when installing (this was a recent regression)
  * Put all distributables in a new `dist/` directory in the build directory (there are soon to be significantly more of these)

Finally, this also creates a new, more precise way to install and uninstall Rust's files, the `install.sh` script, and creates a build target (currently `dist-tar-bins`) that creates a binary tarball containing all the installable files, boilerplate and license docs, and `install.sh`.

This binary tarball is the lowest-common denominator way to install Rust on Unix. We'll use it as the default installer on Linux (OS X will use .pkg).

## How `install.sh` works

* First, the makefiles (`prepare.mk` and `dist.mk`) put all the stuff that needs to be installed in a new directory in `dist/`.
* Then it puts `install.sh` in that same directory and a list of all the files to install at `rustlib/manifest`.
* Then the directory can be packaged and distributed.
* When `install.sh` runs it does some sanity checking then copies everything in the manifest to the install prefix, then copies the manifest as well.
* When `install.sh` runs again in the future it first looks for the existing manifest at the install prefix, and if it exists deletes everything in it. This is how the core distribution is upgraded - cargo is responsible for the rest.
* `install.sh --uninstall` will uninstall Rust

## Future work:

  * Modify `install.sh` to accept `--man-dir` etc
  * Rewrite `install.mk` to delegate to `install.sh`
  * Investigate how `install.sh` does or doesn't work with .pkg on Mac
  * Modify `dist.mk` to create `.pkg` files for all hosts
  * Possibly use [makeself](http://www.megastep.org/makeself/) to create self-extracting installers
  * Modify dist-snap bots run on mac as well, uploading binary tarballs and .pkg files for the four combos of linux, mac, x86, and x86_64.
  * Adjust build system to be able to augment versions with '-nightly'
  * Adjust build system to name dist artifacts without version numbers e.g. `rust-nightly-...pkg`. This is so we don't leave a huge trail of old nightly binaries on S3 - they just get overwritten.
  * Create new dist-nightly builder
  * Give the build master a new cron job to push to dist-nightly every night
  * Add docs to distributables
  * Update README.md to reflect the new reality
  * Modernize the website to promote new installers
2014-03-10 22:42:02 -07:00
..
clean.mk mk: rewrite the documentation handling. 2014-03-09 19:34:40 +11:00
crates.mk Implement hexadecimal floating point literals via a syntax extension 2014-03-10 22:36:56 +00:00
ctags.mk
dist.mk mk: Put all distribution artifacts in dist/ 2014-03-09 14:17:27 -07:00
docs.mk mk: only build PDFs of the manual and tutorial. 2014-03-09 20:59:43 +11:00
host.mk
install.mk Address review feedback 2014-02-16 17:36:43 -08:00
llvm.mk
main.mk fix typos with with repeated words, just like this sentence. 2014-03-06 20:19:14 +09:00
perf.mk
platform.mk mk: Remove old flags to llc for arm. 2014-02-15 20:08:33 -05:00
prepare.mk mk: forcibly delete dest dir when PREPARE_CLEAN 2014-03-09 14:17:27 -07:00
reconfig.mk mk: Move most of Makefile.in to .mk files 2014-02-14 17:45:54 -08:00
rt.mk Add MKFILE_DEPS to compiler-rt target 2014-02-14 10:46:19 -08:00
rustllvm.mk
snap.mk
stage0.mk
target.mk Build compiler-rt and link it to all crates, similarly to morestack. 2014-02-11 15:59:59 -08:00
tests.mk mk: rename check-...-doc-<crate> to check-...-doc-crate-<crate>. 2014-03-09 19:34:40 +11:00
util.mk mk: Address review feedback 2014-02-14 19:17:50 -08:00