Rename README, INSTALL, and NEWS to end in .adoc
[tig.git] / INSTALL.adoc
blob5c76e4b8629ce0f3f2ea4148659e902ae2789857
1 Installation instructions
2 =========================
4 Download a tarball from http://jonas.nitro.dk/tig/releases[] or clone the Tig
5 repository http://github.com/jonas/tig[git://github.com/jonas/tig.git].
7 The quick and simple way to install Tig is:
9         $ make
10         $ make install
12 By default, `tig` is installed in `$HOME/bin`. To install `tig elsewhere set
13 `prefix` to the desired path:
15         $ make prefix=/usr/local
16         $ sudo make install prefix=/usr/local
18 Documentation files, such as manpages, are distributed in the release tarballs,
19 and can be installed using:
21         $ make install-doc
23 When installing directly from the Tig repository, `make install-doc` will assume
24 that the documentation tool chain is available and build the documentation
25 locally. In case you do not wish to install the required tools, documentation
26 can be installed from the 'release' branch using:
28         $ make install-release-doc
30 Before upgrading, you are advised to read
31 ifdef::version[]
32 link:INSTALL.html[the release notes].
33 endif::version[]
34 ifndef::version[]
35 link:INSTALL.adoc[the release notes].
36 endif::version[]
38 Installation using `configure`
39 ------------------------------
41 Optionally, you can use the `configure` script to detect dependencies:
43         $ ./configure
44         $ make
45         $ make install
47 If your `iconv` library is not in the default library and include path, you need
48 to pass the `--with-libiconv` option to `configure` to tell it where to look.
50 Note, if you are building from the Tig repository, you need to generate
51 `configure` yourself. First, ensure that `autoconf` is installed on your system,
52 and then run the following command:
54         $ make configure
56 Build configuration
57 -------------------
59 Build settings are read from the file `config.make` and for certain systems also
60 from `contrib/config.make-$kernel`. An example of the latter is Mac OS X, where
61 `contrib/config.make-Darwin` provides out-of-the-box configuration for using the
62 system ncurses library and linking with the iconv library. This makes it easy to
63 configure the build without having to use the `configure` script. As a side
64 note, `configure` itself generates a `config.make` file.
66 Apart from the different standard `make` build variables (`CC`, `CFLAGS`, etc.)
67 and standard `configure` variables (`prefix`, `bindir`, etc.), build settings
68 can be one of the following compatibility flags:
70  - `NO_SETENV`: Define this variable to enable work-around for missing
71    `setenv()`.
72  - `NO_MKSTEMPS`: Define this variable to enable work-around for missing
73    `mkstemps()`.
75 The following example `config.make` manually configures Tig to use the ncurses
76 library with wide character support and include the proper ncurses header file
77 (see tig.h for more information):
79         LDLIBS = -lncursesw
80         CPPFLAGS = -DHAVE_NCURSESW_CURSES_H
82 For more examples of build settings, see `contrib/config.make` and
83 `config.make.in`.
85 Tools and packages
86 ------------------
88 The following tools and packages are needed:
90 [cols="2<,8<",options="header"]
91 |=============================================================================
92 |Tool                           |Description
93 |git-core                       |Tig is just a frontend for Git.
94 |ncurses or ncursesw            |Be sure to have the development files
95                                  installed. Usually they are available in a
96                                  separate package ending with `-dev`.
98                                  Ncurses with wide character support (ncursesw)
99                                  is required to properly handle UTF-8 encoded
100                                  strings.
102                                  Note for packagers: For Tig's `configure`
103                                  script to work as expected you should avoid
104                                  configuring and building ncurses using
105                                  `--with-shared`.
106 |iconv                          |If iconv is not provided by the c library
107                                  you need to change the Makefile to link it
108                                  into the binary.
109 |=============================================================================
111 The following optional tools and packages are needed for creating the
112 configure script and building documentation:
114 [cols="2<,8<",options="header"]
115 |=============================================================================
116 |Tool                           |Description
117 |autoconf                       |Contains autoreconf for generating configure
118                                  from configure.ac.
119 |asciidoc (>= 8.4)              |Generates HTML and (DocBook) XML from text.
120 |xmlto                          |Generates manpages and chunked HTML from XML.
121 |DocBook XSL (>= 1.72.0)        |Used by xmlto for building manpages.
122 |DocBook (DSSL/Jade) tools      |Generates PDF from XML.
123                                  Also known as docbook-utils.
124 |=============================================================================