File: unix_autotools.rst

package info (click to toggle)
groonga 15.0.4%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 163,080 kB
  • sloc: ansic: 770,564; cpp: 48,925; ruby: 40,447; javascript: 10,250; yacc: 7,045; sh: 5,602; python: 2,821; makefile: 1,672
file content (104 lines) | stat: -rw-r--r-- 2,925 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
.. -*- rst -*-

:orphan:

.. warning::
   Building with GNU Autotools is deprecated, you should build with CMake: :doc:`/install/cmake`

How to build Groonga at the repository by GNU Autotools
=======================================================

This document describes how to build Groonga at the repository by GNU
Autotools.

You can't choose this way if you develop Groonga on Windows. If you
want to use Windows for developing Groonga, see :doc:`windows_cmake`.

Install depended software
-------------------------

TODO

  * `Autoconf <http://www.gnu.org/software/autoconf/>`_
  * `Automake <http://www.gnu.org/software/automake/>`_
  * `GNU Libtool <http://www.gnu.org/software/libtool/>`_
  * `Ruby <https://www.ruby-lang.org/>`_
  * `Git <https://git-scm.com/>`_
  * `Cutter <http://cutter.sourceforge.net/>`_
  * ...

Checkout Groonga from the repository
------------------------------------

Users use released source archive. But developers must build Groonga
at the repository. Because source code in the repository is the
latest.

The Groonga repository is hosted on `GitHub
<https://github.com/groonga/groonga>`_. Checkout the latest source
code from the repository::

  % git clone --recursive git@github.com:groonga/groonga.git

Create ``configure``
--------------------

You need to create ``configure``. ``configure`` is included in source
archive but not included in the repository.

``configure`` is a build tool that detects your system and generates
build configurations for your environment.

Run ``autogen.sh`` to create ``configure``::

  % ./autogen.sh

Run ``configure``
-----------------

You can custom your build configuration by passing options to
``configure``.

Here are recommended ``configure`` options for developers::

  % ./configure --prefix=/tmp/local --enable-debug --enable-mruby --with-ruby

Here are descriptions of these options:

``--prefix=/tmp/local``
    It specifies that you install your Groonga into temporary
    directory. You can do "clean install" by removing
    ``/tmp/local`` directory. It'll be useful for debugging install.

``--enable-debug``
    It enables debug options for C/C++ compiler. It's useful for
    debugging on debugger such as GDB and LLDB.

``--eanble-mruby``
    It enables mruby support. The feature isn't enabled by default
    but developers should enable the feature.

``--with-ruby``
    It's needed for ``--enable-mruby`` and running functional tests.

Run ``make``
------------

Now, you can build Groonga.

Here is a recommended ``make`` command line for developers::

  % make -j8 > /dev/null

``-j8`` decreases build time. It enables parallel build. If you have 8
or more CPU cores, you can increase ``8`` to decreases more build
time.

You can just see only warning and error messages by ``>
/dev/null``. Developers shouldn't add new warnings and errors in new
commit.

See also
--------

  * :doc:`/contribution/development/test`