guix-patches
[Top][All Lists]
Advanced

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

[bug#39599] [PATCH 1/4] build-system: Add copy-build-system.


From: Mathieu Othacehe
Subject: [bug#39599] [PATCH 1/4] build-system: Add copy-build-system.
Date: Mon, 17 Feb 2020 12:48:56 +0100
User-agent: mu4e 1.2.0; emacs 26.3

Hey Pierre,

Thanks for this patch! A few remarks below.

> +@item @code{("foo/bar" "share/my-app/baz")}: Install @code{bar}t o 
> @code{share/my-app/baz}.
                                                                   ^
                                                                   typo

> +  (and (not target)                               ;XXX: no cross-compilation

Why don't we support cross-compilation here?

> +    (set! target (if (string-suffix? "/" target)
> +                     (string-append target (basename source))
> +                     target))

We could use let instead of set!, right?

> +  (define* (make-file-predicate matches matches-regexp #:optional 
> (default-value #t))
> +    (if (or matches matches-regexp)
> +        (lambda (file)
> +          (any (lambda (pred) (pred file))
> +               (append
> +                (map (lambda (str)
> +                       (lambda (f) (string-suffix? str f)))
> +                     (or matches '()))
> +                (map (lambda (regexp)
> +                       (lambda (f) (regexp-exec (make-regexp regexp) f)))
> +                     (or matches-regexp '())))))
> +        (const default-value)))

You could maybe explain a bit what this function does. And how 'file'
differs from 'f'.

Thanks,

Mathieu





reply via email to

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