On Sat, 28 Dec 2024, Ludovic Courtès <l...@gnu.org> wrote:
> Hello,
>
> Olivier Dion <od...@efficios.com> skribis:
>
>> For what it is worth, I have been using my own build system purely in
>> Guile for a few years now.  I use it in my main project libpatch
>> (https://git.sr.ht/~old/libpatch/tree).  It is compatible with the
>> gnu-build-system (configure && make && make check && make install), but
>> it does not have to if you want to diverge from this flow.
>
> [...]
>
>> (define-module (project libpatch build libraries)
>>   #:use-module ((config) #:prefix conf:)
>>   #:use-module (ice-9 match)
>>   #:use-module (project build c)
>>   #:use-module (project utils list)
>>   #:use-module (srfi srfi-26)
>>   #:export (libpatch
>>             libpatch-ftrace))
>>
>> (define libpatch-common
>>   (c-binary
>>    (inputs
>>     '("src/lib/libpatch-common/io.c"
>>       "src/lib/libpatch-common/read.c"
>>       "src/lib/libpatch-common/sleep.c"
>>       "src/lib/libpatch-common/write.c"))
>>    (cppflags
>>     (list
>>      (string-append "-I" conf:srcdir "/src/lib/libpatch-common")))
>>    (library? #t)
>>    (shared? #f)
>>    (output "src/lib/libpatch-common.a")))
>>
>> (define libpatch
>>   (c-binary
>>    (inputs
>>     (cons
>>       libpatch-common
>>      (cond-list
>>          '("src/lib/libpatch/core/address.c"
>>            "src/lib/libpatch/core/attr.c"
>
> That looks nice!  Would be interesting to extract it and see how well it
> could serve other projects.

Thanks!  Like mentioned in other mails, the build system is a collection
of Guile modules.  It is actually meant to be embedded in the project.
This is a design decission because I can rely on Guile been installed on
distributions, but not the build system.  So if the build system is
contained within the project itself, problem solve!

However, like I described in an other mail, the build system does not do
everything for you (yet).  You need to define some glue.  Nothing
compared to Autotools I would say.

Do you have a project in mind where it would be interesting to see if
this applies well?  Perhaps a variant of the `hello' package with
autotools completely stripped out?

[...]

Thanks,
Olivier
-- 
Olivier Dion
EfficiOS Inc.
https://www.efficios.com

Reply via email to