Make blame_draw check if the filename is NULL instead of empty
[tig.git] / INSTALL
blob3325bf5cca5b8e13775fb48603c577958625ebf5
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 Release notes documenting notable changes are available in the NEWS file. When
31 upgrading, you are advised to read them before you install.
33 Installation using `configure`
34 ------------------------------
36 Optionally, you can use the `configure` script to detect dependencies:
38         $ ./configure
39         $ make
40         $ make install
42 If your `iconv` library is not in the default library and include path, you need
43 to pass the `--with-libiconv` option to `configure` to tell it where to look.
45 Note, if you are building from the Tig repository, you need to generate
46 `configure` yourself. First, ensure that `autoconf` is installed on your system,
47 and then run the following command:
49         $ make configure
51 Build configuration
52 -------------------
54 Build settings are read from the file `config.make` and for certain systems also
55 from `contrib/config.make-$kernel`. An example of the latter is Mac OS X, where
56 `contrib/config.make-Darwin` provides out-of-the-box configuration for using the
57 system ncurses library and linking with the iconv library. This makes it easy to
58 configure the build without having to use the `configure` script. As a side
59 note, `configure` itself generates a `config.make` file.
61 Apart from the different standard `make` build variables (`CC`, `CFLAGS`, etc.)
62 and standard `configure` variables (`prefix`, `bindir`, etc.), build settings
63 can be one of the following compatibility flags:
65  - `NO_SETENV`: Define this variable to enable work-around for missing
66    `setenv()`.
67  - `NO_MKSTEMPS`: Define this variable to enable work-around for missing
68    `mkstemps()`.
70 The following example `config.make` manually configures Tig to use the ncurses
71 library with wide character support and include the proper ncurses header file
72 (see tig.h for more information):
74         LDLIBS = -lncursesw
75         CPPFLAGS = -DHAVE_NCURSESW_CURSES_H
77 For more examples of build settings, see `contrib/config.make` and
78 `config.make.in`.
80 Tools and packages
81 ------------------
83 The following tools and packages are needed:
85 [cols="2<,8<",options="header"]
86 |=============================================================================
87 |Tool                           |Description
88 |git-core                       |Tig is just a frontend for Git.
89 |ncurses or ncursesw            |Be sure to have the development files
90                                  installed. Usually they are available in a
91                                  separate package ending with `-dev`.
93                                  Ncurses with wide character support (ncursesw)
94                                  is required to properly handle UTF-8 encoded
95                                  strings.
97                                  Note for packagers: For Tig's `configure`
98                                  script to work as expected you should avoid
99                                  configuring and building ncurses using
100                                  `--with-shared`.
101 |iconv                          |If iconv is not provided by the c library
102                                  you need to change the Makefile to link it
103                                  into the binary.
104 |=============================================================================
106 The following optional tools and packages are needed for creating the
107 configure script and building documentation:
109 [cols="2<,8<",options="header"]
110 |=============================================================================
111 |Tool                           |Description
112 |autoconf                       |Contains autoreconf for generating configure
113                                  from configure.ac.
114 |asciidoc (>= 8.4)              |Generates HTML and (DocBook) XML from text.
115 |xmlto                          |Generates manpages and chunked HTML from XML.
116 |DocBook XSL (>= 1.72.0)        |Used by xmlto for building manpages.
117 |DocBook (DSSL/Jade) tools      |Generates PDF from XML.
118                                  Also known as docbook-utils.
119 |=============================================================================