2009-11-21 Samuel Thibault <samuel.thibault@ens-lyon.org>
[grub2.git] / INSTALL
blobf9ae8f9d2fd3a0a30487bad678c2dd826f6e5814
1 -*- Text -*-
3 This is the GRUB.  Welcome.
5 This file contains instructions for compiling and installing the GRUB.
7 The Requirements
8 ================
10 GRUB depends on some software packages installed into your system. If
11 you don't have any of them, please obtain and install them before
12 configuring the GRUB.
14 * GCC 4.1.3 or later
15 * GNU Make
16 * GNU Bison 2.3 or later
17 * GNU binutils 2.9.1.0.23 or later
18 * Other standard GNU/Unix tools
20 If you use a development snapshot or want to hack on GRUB you may
21 need the following.
23 * Ruby 1.6 or later
24 * Autoconf 2.59d or later
26 Configuring the GRUB
27 ====================
29 The `configure' shell script attempts to guess correct values for
30 various system-dependent variables used during compilation.  It uses
31 those values to create a `Makefile' in each directory of the package.
32 It may also create one or more `.h' files containing system-dependent
33 definitions.  Finally, it creates a shell script `config.status' that
34 you can run in the future to recreate the current configuration, a
35 file `config.cache' that saves the results of its tests to speed up
36 reconfiguring, and a file `config.log' containing compiler output
37 (useful mainly for debugging `configure').
39 If you need to do unusual things to compile the package, please try to
40 figure out how `configure' could check whether to do them, and mail
41 diffs or instructions to the address given in the `README' so they can
42 be considered for the next release.  If at some point `config.cache'
43 contains results you don't want to keep, you may remove or edit it.
45 The file `configure.ac' is used to create `configure' by a program
46 called `autoconf'.  You only need `configure.in' if you want to change
47 it or regenerate `configure' using a newer version of `autoconf'.
50 Building the GRUB
51 =================
53 The simplest way to compile this package is:
55   1. `cd' to the directory containing the package's source code.  If
56      you don't use a release tarball you have to type `./autogen.sh'.
57      Type `./configure' to configure the package for your system.
58      If you're using `csh' on an old version of System V, you might
59      need to type `sh ./configure' instead to prevent `csh' from trying
60      to execute `configure' itself.
62      Running `configure' takes awhile.  While running, it prints some
63      messages telling which features it is checking for.
65   2. Type `make' to compile the package.
67   3. Optionally, type `make check' to run any self-tests that come with
68      the package.
70   4. Type `make install' to install the programs and any data files and
71      documentation.
73   5. You can remove the program binaries and object files from the
74      source code directory by typing `make clean'.  To also remove the
75      files that `configure' created (so you can compile the package for
76      a different kind of computer), type `make distclean'.  There is
77      also a `make maintainer-clean' target, but that is intended mainly
78      for the package's developers.  If you use it, you may have to get
79      all sorts of other programs in order to regenerate files that came
80      with the distribution.
83 Compiling For Multiple Architectures
84 ====================================
86 You can compile the package for more than one kind of computer at the
87 same time, by placing the object files for each architecture in their
88 own directory.  `cd' to the directory where you want the object files
89 and executables to go and run the `configure' script.  `configure'
90 automatically checks for the source code in the directory that
91 `configure' is in and in `..'.
94 Installation Names
95 ==================
97 By default, `make install' will install the package's files in
98 `/usr/local/bin', `/usr/local/man', etc.  You can specify an
99 installation prefix by giving `configure' the option `--prefix=PATH'.
101 You can specify separate installation prefixes for
102 architecture-specific files and architecture-independent files.  If
103 you give `configure' the option `--exec-prefix=PATH', the package will
104 use PATH as the prefix for installing programs and libraries.
105 Documentation and other data files will still use the regular prefix.
107 In addition, if you use an unusual directory layout you can give
108 options like `--bindir=PATH' to specify different values for
109 particular kinds of files.  Run `configure --help' for a list of the
110 directories you can set and what kinds of files go in them.
112 If the package supports it, you can cause programs to be installed
113 with an extra prefix or suffix on their names by giving `configure'
114 the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
116 Please note, however, that the GRUB knows where it is located in the
117 filesystem.  If you have installed it in an unusual location, the
118 system might not work properly, or at all.  The chief utility of these
119 options for the GRUB is to allow you to "install" in some alternate
120 location, and then copy these to the actual root filesystem later.
123 Sharing Defaults
124 ================
126 If you want to set default values for `configure' scripts to share,
127 you can create a site shell script called `config.site' that gives
128 default values for variables like `CC', `cache_file', and `prefix'.
129 `configure' looks for `PREFIX/share/config.site' if it exists, then
130 `PREFIX/etc/config.site' if it exists.  Or, you can set the
131 `CONFIG_SITE' environment variable to the location of the site script.
132 A warning: not all `configure' scripts look for a site script.
135 Operation Controls
136 ==================
138    `configure' recognizes the following options to control how it
139 operates.
141 `--cache-file=FILE'
142      Use and save the results of the tests in FILE instead of
143      `./config.cache'.  Set FILE to `/dev/null' to disable caching, for
144      debugging `configure'.
146 `--help'
147      Print a summary of the options to `configure', and exit.
149 `--quiet'
150 `--silent'
151 `-q'
152      Do not print messages saying which checks are being made.
154 `--srcdir=DIR'
155      Look for the package's source code in directory DIR.  Usually
156      `configure' can determine that directory automatically.
158 `--version'
159      Print the version of Autoconf used to generate the `configure'
160      script, and exit.