docs/2 - Installing crosstool-NG.txt
changeset 2076 b58109b7b321
child 2563 e17f35b05539
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/docs/2 - Installing crosstool-NG.txt	Sat Aug 14 16:37:11 2010 +0200
     1.3 @@ -0,0 +1,93 @@
     1.4 +File.........: 2 - Installing crosstool-NG.txt
     1.5 +Copyrigth....: (C) 2010 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
     1.6 +License......: Creative Commons Attribution Share Alike (CC-by-sa), v2.5
     1.7 +
     1.8 +
     1.9 +Installing crosstool-NG  /
    1.10 +________________________/
    1.11 +
    1.12 +
    1.13 +There are two ways you can use crosstool-NG:
    1.14 + - build and install it, then get rid of the sources like you'd do for most
    1.15 +   programs,
    1.16 + - or only build it and run from the source directory.
    1.17 +
    1.18 +The former should be used if you got crosstool-NG from a packaged tarball, see
    1.19 +"Install method", below, while the latter is most useful for developpers that
    1.20 +use a clone of the repository, and want to submit patches, see "The Hacker's
    1.21 +way", below.
    1.22 +
    1.23 +
    1.24 +Install method |
    1.25 +---------------+
    1.26 +
    1.27 +If you go for the install, then you just follow the classical, but yet easy
    1.28 +./configure way:
    1.29 +  ./configure --prefix=/some/place
    1.30 +  make
    1.31 +  make install
    1.32 +  export PATH="${PATH}:/some/place/bin"
    1.33 +
    1.34 +You can then get rid of crosstool-NG source. Next create a directory to serve
    1.35 +as a working place, cd in there and run:
    1.36 +  ct-ng help
    1.37 +
    1.38 +See below for complete usage.
    1.39 +
    1.40 +
    1.41 +The Hacker's way |
    1.42 +-----------------+
    1.43 +
    1.44 +If you go the hacker's way, then the usage is a bit different, although very
    1.45 +simple:
    1.46 +  ./configure --local
    1.47 +  make
    1.48 +
    1.49 +Now, *do not* remove crosstool-NG sources. They are needed to run crosstool-NG!
    1.50 +Stay in the directory holding the sources, and run:
    1.51 +  ./ct-ng help
    1.52 +
    1.53 +See below for complete usage.
    1.54 +
    1.55 +Now, provided you used a clone of the repository, you can send me your changes.
    1.56 +See the section titled CONTRIBUTING, below, for how to submit changees.
    1.57 +
    1.58 +
    1.59 +Preparing for packaging |
    1.60 +------------------------+
    1.61 +
    1.62 +If you plan on packaging crosstool-NG, you surely don't want to install it
    1.63 +in your root file system. The install procedure of crosstool-NG honors the
    1.64 +DESTDIR variable:
    1.65 +
    1.66 +  ./configure --prefix=/usr
    1.67 +  make
    1.68 +  make DESTDIR=/packaging/place install
    1.69 +
    1.70 +
    1.71 +Shell completion |
    1.72 +-----------------+
    1.73 +
    1.74 +crosstool-NG comes with a shell script fragment that defines bash-compatible
    1.75 +completion. That shell fragment is currently not installed automatically, but
    1.76 +this is planned.
    1.77 +
    1.78 +To install the shell script fragment, you have two options:
    1.79 + - install system-wide, most probably by copying ct-ng.comp into
    1.80 +   /etc/bash_completion.d/
    1.81 + - install for a single user, by copying ct-ng.comp into ${HOME}/ and
    1.82 +   sourcing this file from your ${HOME}/.bashrc
    1.83 +
    1.84 +
    1.85 +Contributed code |
    1.86 +-----------------+
    1.87 +
    1.88 +Some people contibuted code that couldn't get merged for various reasons. This
    1.89 +code is available as lzma-compressed patches, in the contrib/ sub-directory.
    1.90 +These patches are to be applied to the source of crosstool-NG, prior to
    1.91 +installing, using something like the following:
    1.92 +  lzcat contrib/foobar.patch.lzma |patch -p1
    1.93 +
    1.94 +There is no guarantee that a particuliar contribution applies to the current
    1.95 +version of crosstool-ng, or that it will work at all. Use contributions at
    1.96 +your own risk.