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