yann@2076: File.........: 2 - Installing crosstool-NG.txt antony@2563: Copyright....: (C) 2010 Yann E. MORIN yann@2076: License......: Creative Commons Attribution Share Alike (CC-by-sa), v2.5 yann@2076: yann@2076: yann@2076: Installing crosstool-NG / yann@2076: ________________________/ yann@2076: yann@2076: yann@2076: There are two ways you can use crosstool-NG: yann@2076: - build and install it, then get rid of the sources like you'd do for most yann@2076: programs, yann@2076: - or only build it and run from the source directory. yann@2076: yann@2076: The former should be used if you got crosstool-NG from a packaged tarball, see antony@2564: "Install method", below, while the latter is most useful for developers that yann@2076: use a clone of the repository, and want to submit patches, see "The Hacker's yann@2076: way", below. yann@2076: yann@2076: yann@2076: Install method | yann@2076: ---------------+ yann@2076: yann@2076: If you go for the install, then you just follow the classical, but yet easy yann@2076: ./configure way: yann@2076: ./configure --prefix=/some/place yann@2076: make yann@2076: make install yann@2076: export PATH="${PATH}:/some/place/bin" yann@2076: yann@2076: You can then get rid of crosstool-NG source. Next create a directory to serve yann@2076: as a working place, cd in there and run: yann@2076: ct-ng help yann@2076: yann@2076: See below for complete usage. yann@2076: yann@2076: yann@2076: The Hacker's way | yann@2076: -----------------+ yann@2076: yann@2076: If you go the hacker's way, then the usage is a bit different, although very yann@2076: simple: yann@2076: ./configure --local yann@2076: make yann@2076: yann@2076: Now, *do not* remove crosstool-NG sources. They are needed to run crosstool-NG! yann@2076: Stay in the directory holding the sources, and run: yann@2076: ./ct-ng help yann@2076: yann@2076: See below for complete usage. yann@2076: yann@2076: Now, provided you used a clone of the repository, you can send me your changes. antony@2564: See the section titled CONTRIBUTING, below, for how to submit changes. yann@2076: yann@2076: yann@2076: Preparing for packaging | yann@2076: ------------------------+ yann@2076: yann@2076: If you plan on packaging crosstool-NG, you surely don't want to install it yann@2076: in your root file system. The install procedure of crosstool-NG honors the yann@2076: DESTDIR variable: yann@2076: yann@2076: ./configure --prefix=/usr yann@2076: make yann@2076: make DESTDIR=/packaging/place install yann@2076: yann@2076: yann@2076: Shell completion | yann@2076: -----------------+ yann@2076: yann@2076: crosstool-NG comes with a shell script fragment that defines bash-compatible yann@2076: completion. That shell fragment is currently not installed automatically, but yann@2076: this is planned. yann@2076: yann@2076: To install the shell script fragment, you have two options: yann@2076: - install system-wide, most probably by copying ct-ng.comp into yann@2076: /etc/bash_completion.d/ yann@2076: - install for a single user, by copying ct-ng.comp into ${HOME}/ and yann@2076: sourcing this file from your ${HOME}/.bashrc yann@2076: yann@2076: yann@2076: Contributed code | yann@2076: -----------------+ yann@2076: antony@2564: Some people contributed code that couldn't get merged for various reasons. This yann@2076: code is available as lzma-compressed patches, in the contrib/ sub-directory. yann@2076: These patches are to be applied to the source of crosstool-NG, prior to yann@2076: installing, using something like the following: yann@2076: lzcat contrib/foobar.patch.lzma |patch -p1 yann@2076: antony@2564: There is no guarantee that a particular contribution applies to the current yann@2076: version of crosstool-ng, or that it will work at all. Use contributions at yann@2076: your own risk.