From ee735bfd4eda7cc51a61951e9bc86bc3771b4b05 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 24 Sep 2026 02:13:14 +0100 Subject: Build website entirely with G-expressions. We can now build the website without any of the autotools tooling. --- .guix/guile-xapian-website.scm | 47 +++++++++--------------------------------- Makefile.am | 13 ------------ configure.ac | 3 --- 3 files changed, 10 insertions(+), 53 deletions(-) diff --git a/.guix/guile-xapian-website.scm b/.guix/guile-xapian-website.scm index 9df20a6..9944157 100644 --- a/.guix/guile-xapian-website.scm +++ b/.guix/guile-xapian-website.scm @@ -19,49 +19,22 @@ (define-module (guile-xapian-website) #:use-module ((gnu packages emacs) #:select (emacs-minimal)) - #:use-module ((guix build-system guile) #:select (%guile-build-system-modules)) #:use-module (guix gexp) #:use-module (guix packages) - #:use-module (guix profiles) #:use-module ((guile-xapian-package) #:select (guile-xapian))) (define guile-xapian-website-gexp - (let ((development-profile - (profile - (content (package->development-manifest guile-xapian))))) - (with-imported-modules %guile-build-system-modules - #~(begin - (use-modules (guix build guile-build-system) - (guix build utils)) + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) - (copy-recursively #$(package-source guile-xapian) - (getcwd)) - (set-path-environment-variable - "PATH" (list "/bin") (list #$emacs-minimal #$development-profile)) - (set-path-environment-variable - "C_INCLUDE_PATH" (list "/include") (list #$development-profile)) - (set-path-environment-variable - "CPLUS_INCLUDE_PATH" (list "/include") (list #$development-profile)) - (set-path-environment-variable - "LIBRARY_PATH" (list "/lib") (list #$development-profile)) - (set-path-environment-variable - "ACLOCAL_PATH" (list "/share/aclocal") (list #$development-profile)) - (set-path-environment-variable - "PKG_CONFIG_PATH" (list "/lib/pkgconfig") (list #$development-profile)) - (set-path-environment-variable - "GUILE_LOAD_PATH" - (list (string-append "/share/guile/site/" - (target-guile-effective-version))) - (list #$development-profile)) - (set-path-environment-variable - "GUILE_LOAD_COMPILED_PATH" - (list (string-append "/lib/guile/" (target-guile-effective-version) "/site-ccache")) - (list #$development-profile)) - (invoke "autoreconf" "--verbose" "--install" "--force") - (patch-shebang "configure") - (invoke "./configure" "CONFIG_SHELL=sh" "SHELL=sh") - (invoke "make" "website") - (copy-recursively "website" #$output))))) + (copy-recursively #$(package-source guile-xapian) + (getcwd)) + (invoke #$(file-append emacs-minimal "/bin/emacs") + "--quick" "--batch" + "--load" "build-aux/build-home-page.el" + "--funcall" "build-website") + (copy-recursively "website" #$output)))) (define-public guile-xapian-website (computed-file "guile-xapian-website" guile-xapian-website-gexp)) diff --git a/Makefile.am b/Makefile.am index 6d2e476..f3adbec 100644 --- a/Makefile.am +++ b/Makefile.am @@ -23,11 +23,6 @@ GPG = gpg # Prefix variables for silencing various commands. See "(automake) # Automake Silent Rules" for details. -EMACS_GEN = $(EMACS_GEN_$(V)) -EMACS_GEN_ = $(EMACS_GEN_$(AM_DEFAULT_VERBOSITY)) -EMACS_GEN_0 = @echo " EMACS" $@; -EMACS_GEN_1 = - GUILD_GEN = $(GUILD_GEN_$(V)) GUILD_GEN_ = $(GUILD_GEN_$(AM_DEFAULT_VERBOSITY)) GUILD_GEN_0 = @echo " GUILD " $@; @@ -90,11 +85,3 @@ EXTRA_DIST = $(test_files) $(SOURCES) except.i xapian.i.in xapian-head.i xapian- %.asc: % $(GPG) --detach-sign --armor $< - -# Build website - -website: website/index.html - -CLEANFILES += website/index.html -website/index.html: README.org - $(EMACS_GEN)$(EMACS) -Q --batch --load build-aux/build-home-page.el --funcall build-website diff --git a/configure.ac b/configure.ac index 07e5b57..ebaba78 100644 --- a/configure.ac +++ b/configure.ac @@ -36,9 +36,6 @@ PKG_CHECK_MODULES([ZLIB], [zlib]) # For tests AC_PATH_PROG([GUILE_RUN64], [guile-run64]) -# To build the website -AC_PATH_PROG([EMACS], [emacs]) - dnl pkg-config does not output xapian include flags when the include dnl path is already in CPATH. See dnl https://unix.stackexchange.com/questions/362289/why-is-pkg-config-cflags-openssl-returning-nothing-on-rhel-6-8 -- cgit 1.4.1