guix-comm...@gnu.org skribis:

>                     ;; Tell 'libpthread' where to find 'libihash' on Hurd 
> systems.
> -                   ,@(if (hurd-triplet? (%current-system))
> -                         `((substitute* "libpthread/Makefile"
> -                             (("LDLIBS-pthread.so =.*")
> -                              (string-append "LDLIBS-pthread.so = "
> -                                             (assoc-ref %build-inputs 
> "kernel-headers")
> -                                             "/lib/libihash.a\n"))))
> +                   ,@(if (hurd-system?)
> +                         `(map
> +                           (lambda (f)
> +                            (substitute* f
> +                              (("LDLIBS-pthread.so =.*")
> +                               (string-append "LDLIBS-pthread.so = "
> +                                              (assoc-ref %build-inputs 
> "kernel-headers")
> +                                              "/lib/libihash.a\n")))
> +                            '("sysdeps/mach/Makefile"
> +                              "sysdeps/mach/hurd/Makefile:")))

‘substitute*’ accepts a list of files, so you can write it like this:

  (substitute* '("sysdeps/mach/hurd/Makefile" "sysdeps/mach/Makefile")
    …)

Ludo’.

Reply via email to