[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 12/14] Add topdir ./configure.
From: |
Adrien 'neox' Bourmault |
Subject: |
Re: [PATCH v1 12/14] Add topdir ./configure. |
Date: |
Mon, 29 Apr 2024 16:46:29 +0200 |
User-agent: |
Evolution 3.48.4 |
The goal here is to be able to add configure options later on.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
---
.gitignore | 9 ++++++++
Makefile => Makefile.am | 0
autogen.sh | 17 ++++++++++++++
build | 4 ++++
configure.ac | 19 +++++++++++++++
download | 4 ++++
.../misc/generate-configure-makefiles.sh | 23 +++++++++++++++++++
site/docs/build/index.md | 18 ++++++++++++---
tests/lint | 2 ++
9 files changed, 93 insertions(+), 3 deletions(-)
rename Makefile => Makefile.am (100%)
create mode 100755 autogen.sh
create mode 100644 configure.ac
create mode 100755 resources/scripts/misc/generate-configure-makefiles.sh
diff --git a/.gitignore b/.gitignore
index 94e1e77..b5f6a39 100644
--- a/.gitignore
+++ b/.gitignore
@@ -33,3 +33,12 @@
/tmp/
/version
/versiondate
+Makefile
+Makefile.in
+aclocal.m4
+autom4te.cache/
+config.log
+config.status
+configure
+install-sh
+missing
diff --git a/Makefile b/Makefile.am
similarity index 100%
rename from Makefile
rename to Makefile.am
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..94382da
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,17 @@
+#!/usr/bin/env sh
+# Copyright (C) 2023 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+autoreconf -vfi "$@"
diff --git a/build b/build
index 94e70ff..a952f07 100755
--- a/build
+++ b/build
@@ -29,6 +29,10 @@ projectname="$(cat projectname)"
. resources/scripts/misc/sysexits.sh
+# Some scripts like the ones in resources/packages/flashrom need
+# Makefiles to be generated
+. resources/scripts/misc/generate-configure-makefiles.sh
+
# This is for backward compatibility: before the list of "modes" was
# auto-detected, but there isn't a 1:1 matching between modes and
# packages tasks (build, clean, etc).
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..a2f61f0
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,19 @@
+# Copyright (C) 2024 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+AC_INIT([gnuboot],[0.1],[gnuboot@gnu.org])
+AM_INIT_AUTOMAKE([foreign])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/download b/download
index 732e6b9..b271f43 100755
--- a/download
+++ b/download
@@ -31,6 +31,10 @@ set -u -e
. resources/scripts/misc/sysexits.sh
+# Some scripts like the ones in resources/packages/flashrom need
+# Makefiles to be generated
+. resources/scripts/misc/generate-configure-makefiles.sh
+
# set this when you want to modify each coreboot tree
# for example, you want to test custom patches
# NODELETE='' ./download coreboot
diff --git a/resources/scripts/misc/generate-configure-makefiles.sh
b/resources/scripts/misc/generate-configure-makefiles.sh
new file mode 100755
index 0000000..aadc674
--- /dev/null
+++ b/resources/scripts/misc/generate-configure-makefiles.sh
@@ -0,0 +1,23 @@
+#!/usr/bin/env bash
+#
+# Copyright (C) 2024 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+if [ ! -f configure ] || \
+ [ ! -f Makefile ] || \
+ [ ! -f resources/packages/flashrom/Makefile ] ; then
+ ./autogen.sh
+ ./configure
+fi
diff --git a/site/docs/build/index.md b/site/docs/build/index.md
index 78be395..66d59f8 100644
--- a/site/docs/build/index.md
+++ b/site/docs/build/index.md
@@ -107,9 +107,21 @@ You may also want to follow more of the steps here:
Building GNU Boot binaries
==========================
-GNU Boot includes a file called `Makefile` that you can use . This
-Makefile calls some scripts like download or build that are in the
-same directory, that you can also also use directly if you want.
+The GNU Boot build system has some configuration options. While the
+defaults are good for most users, the way it is implemented requires
+you to run the following command first:
+ ./autogen.sh
+
+And if you don't need to change the defaults, you can then run the
+following command:
+ ./configure
+
+If you want to look at which settings can be changed you can use the
+following command which explains various options and how to do that:
+ ./configure --help
+
+Once this is done, you can either use the `Makefile` or some shell
+scripts to build GNU Boot.
The `Makefile` is much more simple to use but offers less flexibility
(for instance there is a single command to build all images but no way
diff --git a/tests/lint b/tests/lint
index ae5748d..04fa281 100755
--- a/tests/lint
+++ b/tests/lint
@@ -41,6 +41,7 @@ printf "+---------------------+\n"
printf "| Running lint tests: |\n"
printf "+---------------------+\n"
run_shellcheck \
+ autogen.sh \
build \
download \
modify \
@@ -59,6 +60,7 @@ run_shellcheck \
resources/packages/u-boot-libre/distclean \
resources/packages/website/distclean \
resources/scripts/misc/errno-base.sh \
+ resources/scripts/misc/generate-configure-makefiles.sh \
resources/scripts/misc/guix.sh \
resources/scripts/misc/resources.sh \
resources/scripts/tasks/distclean.sh \
--
2.41.0
- [PATCH v1 12/14] Add topdir ./configure., (continued)
- [PATCH v1 12/14] Add topdir ./configure., Denis 'GNUtoo' Carikli, 2024/04/19
- Re: Guix integration and various other patches., Leah Rowe, 2024/04/19
- Re: Guix integration and various other patches., Adrien 'neox' Bourmault, 2024/04/20
- Re: Guix integration and various other patches., Adrien 'neox' Bourmault, 2024/04/20
- Re: [PATCH v1 04/14] build instructions: Mention exact package names for debootstrap., Adrien 'neox' Bourmault, 2024/04/29
- Re: [PATCH v1 05/14] build instructions: debootstrap: Add Guix., Adrien 'neox' Bourmault, 2024/04/29
- Re: [PATCH v1 02/14] docs/install: replace Libreboot with GNUBoot, Adrien 'neox' Bourmault, 2024/04/29
- Re: [PATCH v1 07/14] scripts: misc: guix.sh: fix last version detection., Adrien 'neox' Bourmault, 2024/04/29
- Re: [PATCH v1 12/14] Add topdir ./configure.,
Adrien 'neox' Bourmault <=
- Re: [PATCH v1 10/14] gitignore: sort rules., Adrien 'neox' Bourmault, 2024/04/29
- Re: [PATCH v1 03/14] docs/install: Don't officially support T60 with ATI GPUs., Adrien 'neox' Bourmault, 2024/04/29
- Re: [PATCH v1 08/14] scripts: misc: guix.sh: make it pass shellcheck., Adrien 'neox' Bourmault, 2024/04/29
- Re: [PATCH v1 13/14] Makefile.am: Document commands from site/docs/build/index.md., Adrien 'neox' Bourmault, 2024/04/29
- Re: [PATCH v1 14/14] Build bucts and patched flashrom for I945 ThinkPads with Guix., Adrien 'neox' Bourmault, 2024/04/29
- Re: [PATCH v1 01/14] site: status: Add upstream software versions., Adrien 'neox' Bourmault, 2024/04/29
- Re: [PATCH v1 06/14] scripts: misc: guix.sh: fix forgetten tab., Adrien 'neox' Bourmault, 2024/04/29
- Re: [PATCH v1 11/14] gitignore: don't ignore .scm files., Adrien 'neox' Bourmault, 2024/04/29