From bb65c2c78e1094644cfb101b053833714375c9b9 Mon Sep 17 00:00:00 2001 From: Ulya Trofimovich Date: Wed, 16 Aug 2017 15:37:42 +0100 Subject: [PATCH] Updated install page. --- src/install/install.rst | 113 +++++++++++++++++----------------------- 1 file changed, 47 insertions(+), 66 deletions(-) diff --git a/src/install/install.rst b/src/install/install.rst index b414b58c..b7a94803 100644 --- a/src/install/install.rst +++ b/src/install/install.rst @@ -8,8 +8,10 @@ Install Download ======== -Tarballs --------- +Below is the list of the latest (stable) tarballs for each branch. +You can find other releases `here `_ +(but be aware that they are hidden for a good reason: +most of them contain bugs that have been fixed in the next minor release). * `re2c-1.0.1.tar.gz `_ * `re2c-0.16.tar.gz `_ @@ -19,115 +21,94 @@ Tarballs * `re2c-0.13.6.tar.gz `_ * `re2c-0.13.5.tar.gz `_ -You can find other releases `here `_ -(but be aware that they are hidden for a good reason: -most of them contain bugs that have been fixed in the next minor release). - -Sources -------- - -re2c is hosted on `github `_: +Source files are `on github `_: .. code-block:: bash - $ git clone git@github.com:skvadrik/re2c.git re2c + $ git clone https://github.com/skvadrik/re2c.git re2c There's also a mirror on `sourceforge `_ (should be in sync with github): .. code-block:: bash - $ git clone ssh://git.code.sf.net/p/re2c/code-git re2c - -Distributions -------------- - -Linux -~~~~~ - -* `Alt `_ -* `Arch `_ -* `Debian `_ -* `Gentoo `_ -* `Fedora `_ -* `Mageia `_ -* `Mandriva `_ -* `OpenSuSE `_ -* `RedHat `_ -* `Slackware `_ -* `Ubuntu `_ - -Summary of available re2c versions in many (but not all) Linux distributions -can be found on `pkgs.org `_. - -BSD -~~~ - -* `Apple Mac OS X `_ -* `FreeBSD `_ -* `NetBSD `_ -* `OpenBSD `_ + $ git clone https://git.code.sf.net/p/re2c/code-git re2c + +Many distributions and systems provide their own packages: +`Alt `_, +`Apple Mac OS X `_, +`Arch `_, +`Debian `_, +`Gentoo `_, +`Fedora `_, +`FreeBSD `_, +`Mageia `_, +`Mandriva `_, +`NetBSD `_, +`OpenSuSE `_, +`RedHat `_, +`Slackware `_, +`Ubuntu `_. Build ===== -You only need a C++98 compiler to build re2c from the tarball. -If you have bison, re2c will use it (otherwise it will use precompiled files). +The only required build-time dependency for re2c is a C++98 compiler. +Optional build-time dependencies are the following: +autotools (to build re2c from source, not from distribution tarball), +bison (to rebuild re2c parser) +and rst2man (to rebuild documentation). -If you are building re2c from source (not from a tarball), you will also need autotools: +If you are building re2c from source, first of all you should run autoconf and automake: .. code-block:: bash $ ./autogen.sh -Simple ------- - -This will install re2c (binary and manpage) to ``prefix`` (``/usr/local`` by default): +The simplest possible build is an in-tree build. +The following instructions will install re2c (binary and manpage) to ``_p_r_e_f_i_x_`` (by default ``/usr/local``): .. code-block:: bash - $ ./configure [--prefix=] + $ ./configure --prefix=_p_r_e_f_i_x_ $ make $ make install -Bootstrapping -------------- - -Some parts of re2c (lexers and parser of command-line options) are written in re2c. -These files are precompiled and packaged into the re2c distribution (so that re2c can be built without re2c). -However, one can fully bootstrap re2c: +Since re2c is a self-hosting lexer generator (some parts of re2c are written in re2c), it needs to be bootstrapped. +Bootstrapping files are packaged into the re2c distribution, so that re2c can be built on a system without re2c. +The following instructions bootstrap re2c from scratch and update precompiled files: .. code-block:: bash $ make bootstrap -Out-of-source -------------- - -re2c supports out-of-source builds: +re2c supports out-of-tree builds: .. code-block:: bash $ mkdir builddir && cd builddir - $ ../configure [--prefix=] + $ ../configure $ make $ make install -Windows -------- - If you intend to use re2c on Windows, you can either use `cygwin `_ -or build re2c with `mingw `_: +or build re2c with `mingw `_ +(mingw builds are supported and tested regularly). .. code-block:: bash - $ ./configure --host i686-w64-mingw32 [--prefix=] + $ ./configure --host i686-w64-mingw32 $ make $ make install -(mingw builds are supported and tested regularly). +To rebuild re2c documentation: + +.. code-block:: bash + + $ ./configure --enable-docs + $ make docs + Test ==== -- 2.50.1