[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lbwww-build][PATCH v1 2/4] configure.ac: Add --disable-guix option
From: |
Denis 'GNUtoo' Carikli |
Subject: |
[lbwww-build][PATCH v1 2/4] configure.ac: Add --disable-guix option |
Date: |
Sat, 8 Apr 2023 14:48:55 +0200 |
This should make it easier for people not having guix to test the
website.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
---
Makefile.am | 14 ++++++++++++++
configure.ac | 7 +++++++
2 files changed, 21 insertions(+)
diff --git a/Makefile.am b/Makefile.am
index 3d9339b..c6935a9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -36,6 +36,7 @@ BUILD_OPTIONS += --with-untitled-path $(UNTITLED_PATH)
GUIX_SHARE_OPTIONS += --share=`realpath $(UNTITLED_PATH)`
endif
+if WANT_GUIX
build:
guix time-machine \
--commit=07f19ef04b5a8f4d7a12a8940333e67db8da81c0 \
@@ -54,7 +55,11 @@ build:
sed \
-- \
./build.sh $(BUILD_OPTIONS)
+else
+ ./build.sh $(BUILD_OPTIONS)
+endif
+if WANT_GUIX
check: website.tar.gz
guix shell \
--container \
@@ -67,6 +72,10 @@ check: website.tar.gz
tar \
-- \
./check.sh --tarball website.tar.gz
+else
+check: website.tar.gz
+ ./check.sh --tarball website.tar.gz
+endif
help:
@printf "%s\n\t%s\n\t%s\n\t%s\n\t%s\n\t%s\n" \
@@ -77,6 +86,7 @@ help:
"upload # Upload the website to https://$(DOMAIN)" \
"website.tar.gz # Create a tarball of the website"
+if WANT_GUIX
test: website.tar.gz
guix shell \
--container \
@@ -90,6 +100,10 @@ test: website.tar.gz
tar \
-- \
./serve.sh website.tar.gz
+else
+test: website.tar.gz
+ ./serve.sh website.tar.gz
+endif
upload: website.tar.gz
curl \
diff --git a/configure.ac b/configure.ac
index 2c5328c..09c44fa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -33,6 +33,13 @@ AC_CHECK_PROG([PRINTF], [printf], [printf])
AC_CHECK_PROG([REALPATH], [realpath], [realpath])
AC_CHECK_PROG([TAR], [tar], [tar])
+# --enable-guix
+AC_ARG_ENABLE(guix,
+ [AS_HELP_STRING([--enable-guix], [Use guix to run the scripts
(default=enabled)])],
+ [guix=$enableval],
+ [guix="yes"])
+AM_CONDITIONAL( [WANT_GUIX], [test x"$guix" = x"yes"])
+
# --with-lbwww-path
AC_ARG_WITH([lbwww-path],
[AS_HELP_STRING([--with-lbwww-path=PATH],
--
2.39.1