From 870ab7dba04afe86d8ff4a0b8434add416539ade Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Wed, 5 Jan 2022 15:33:06 +0530 Subject: configure: Output project name. * Makefile (project): Delete variable. * configure: Pass the kolam, the project name, to configure.scm. * configure.scm (processed-args): Capture the project name argument. Output project name in Makefile.include. --- Makefile | 2 -- configure | 2 +- configure.scm | 7 +++++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index aed14f2..d9c6c67 100644 --- a/Makefile +++ b/Makefile @@ -17,8 +17,6 @@ # License along with kolam. If not, see # . -project = kolam - include Makefile.include GUILE = guile diff --git a/configure b/configure index 25eeb93..af1791d 100755 --- a/configure +++ b/configure @@ -19,4 +19,4 @@ # License along with kolam. If not, see # . -guile --no-auto-compile configure.scm "$@" +guile --no-auto-compile configure.scm kolam "$@" diff --git a/configure.scm b/configure.scm index 6681f17..07a822a 100644 --- a/configure.scm +++ b/configure.scm @@ -56,7 +56,7 @@ (define processed-args (match (program-arguments) - ((_ args ...) + ((_ project args ...) (let* ((args (args-fold args (list (option '("prefix") #t #f option-proc)) @@ -71,7 +71,8 @@ (string-append exec-prefix "/lib"))) (datarootdir (or (assq-ref args 'datarootdir) (string-append prefix "/share")))) - `((libdir . ,libdir) + `((project . ,project) + (libdir . ,libdir) (datarootdir . ,datarootdir)))))) (check-for-guile-3.0) @@ -81,10 +82,12 @@ (lambda (port) (display (format "# This file was automatically generated by configure. +project = ~a libdir = ~a datarootdir = ~a guile_effective_version = ~a " + (assq-ref processed-args 'project) (assq-ref processed-args 'libdir) (assq-ref processed-args 'datarootdir) (effective-version)) -- cgit v1.2.3