chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Partial automation of egg dependencies


From: felix . winkelmann
Subject: Re: Partial automation of egg dependencies
Date: Mon, 21 Nov 2022 23:19:28 +0100

> > Actually, perhaps the best way would be to use a custom build
> > using csm to build the components of the egg. A little bit of
> > inventiveness might be required, but I think it should be possible.
>
> This would make the egg depend on csm. I don't mind this for programs,
> but for eggs that are just libraries, isn't this a bit "opinionated" /
> heavy given that all the build steps (apart from the import groveling)
> can be done using the current chicken-install?
>

Here a quickly hacked together approach:

try.egg:

((components
   (extension bar (custom-build "build"))
   (extension foo (custom-build "build"))))

foo.scm:

(module foo () (import scheme) (import bar) (bar))

bar.scm:

(module bar (bar) (import scheme) (define (bar) (display 'bar)))

build:

#!/bin/sh
sf=
while [ -n "$1" ]; do
    case "$1" in
        -static) sf=-static;;
    esac
    shift
done
csm -compile-imports $sf

It's a totally mad hack - but, man, do I love to improvise ... :-)


felix




reply via email to

[Prev in Thread] Current Thread [Next in Thread]