All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bartosz Golaszewski <brgl@bgdev.pl>
To: Vincent Fazio <vfazio@xes-inc.com>,
	Kent Gibson <warthog618@gmail.com>,
	Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org,
	Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: [libgpiod][PATCH] doc: clarify the differences between building from git and tarballs
Date: Tue, 11 Mar 2025 15:01:47 +0100	[thread overview]
Message-ID: <20250311140147.66484-1-brgl@bgdev.pl> (raw)

From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

Several users reported having trouble understanding the "building"
section of the docs and being confused on whether they should use
autogen.sh or configure. Clarify these bits in the docs.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 docs/building.rst | 46 +++++++++++++++++++++++++++++++++-------------
 1 file changed, 33 insertions(+), 13 deletions(-)

diff --git a/docs/building.rst b/docs/building.rst
index 958c6fb..aae07d4 100644
--- a/docs/building.rst
+++ b/docs/building.rst
@@ -21,8 +21,21 @@ together with
 Building
 --------
 
-This is a pretty standard autotools project. The core C library does not have
-any external dependencies other than the standard C library with GNU extensions.
+The core C library does not have any external dependencies other than the
+standard C library with GNU extensions.
+
+The project is built using GNU autotools. In the general case, the steps needed
+to download a source tarball, unpack it, build the library together with the
+command-line tools and install the resulting binaries are as follows:
+
+.. code-block:: none
+
+   wget https://mirrors.edge.kernel.org/pub/software/libs/libgpiod/libgpiod-x.y.z.tar.xz
+   tar -xvf ./libgpiod-x.y.z.tar.xz
+   cd ./libgpiod-x.y.z/
+   ./configure --enable-tools
+   make
+   sudo make install
 
 The build system requires the following packages to be installed on the host
 system for the basic build:
@@ -37,23 +50,30 @@ system for the basic build:
    selected options. The configure script will report any missing additional
    required dependencies.
 
-To build the project (including command-line utilities) run:
-
-.. code-block:: none
-
-   ./autogen.sh --enable-tools=yes
-   make
-
 .. note::
    The command-line tools optionally depend on libedit for the interactive
    feature.
 
-The autogen script will execute ``./configure`` and pass all the command-line
-arguments to it.
+The project can also be built directly from the git repository. However in this
+case the configure script does not exist and must be created first - either by
+calling ``autoreconf``:
+
+.. code-block:: none
+
+   autoreconf -ifv
+   ./configure --enable-tools
+   make
+
+Or by executing the provided ``autogen.sh`` script directly from the git tree:
+
+.. code-block:: none
+
+   ./autogen.sh --enable-tools
+   make
 
 .. note::
-   If building from release tarballs, the configure script is already provided
-   and there's no need to invoke autogen.sh.
+   The autogen script will execute ``./configure`` and pass all the
+   command-line arguments to it.
 
 For all configure features, see: ``./configure --help``.
 
-- 
2.45.2


             reply	other threads:[~2025-03-11 14:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-11 14:01 Bartosz Golaszewski [this message]
2025-03-13  8:22 ` [libgpiod][PATCH] doc: clarify the differences between building from git and tarballs Bartosz Golaszewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250311140147.66484-1-brgl@bgdev.pl \
    --to=brgl@bgdev.pl \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=vfazio@xes-inc.com \
    --cc=warthog618@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.