unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Danny Milosavljevic <dannym@scratchpost.org>
To: 41643@debbugs.gnu.org
Cc: Danny Milosavljevic <dannym@scratchpost.org>
Subject: [bug#41643] [PATCH] build-system: linux-module: Allow passing #:make-flags argument.
Date: Mon,  1 Jun 2020 14:59:10 +0200	[thread overview]
Message-ID: <20200601125910.12840-1-dannym@scratchpost.org> (raw)

* guix/build-system/linux-module.scm (linux-module-build): Add #:make-flags.
(linux-module-build-cross): Add #:make-flags.
* guix/build/linux-module-build-system.scm (install): Pass make-flags.
---
 guix/build-system/linux-module.scm       |  4 ++++
 guix/build/linux-module-build-system.scm | 11 +++++++----
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/guix/build-system/linux-module.scm b/guix/build-system/linux-module.scm
index ca104f7c75..1077215671 100644
--- a/guix/build-system/linux-module.scm
+++ b/guix/build-system/linux-module.scm
@@ -129,6 +129,7 @@
                              (phases '(@ (guix build linux-module-build-system)
                                          %standard-phases))
                              (outputs '("out"))
+                             (make-flags ''())
                              (system (%current-system))
                              (guile #f)
                              (substitutable? #t)
@@ -156,6 +157,7 @@
                      #:arch ,(system->arch (or target system))
                      #:tests? ,tests?
                      #:outputs %outputs
+                     #:make-flags ,make-flags
                      #:inputs %build-inputs)))
 
   (define guile-for-build
@@ -181,6 +183,7 @@
           target native-drvs target-drvs
           (guile #f)
           (outputs '("out"))
+          (make-flags ''())
           (search-paths '())
           (native-search-paths '())
           (tests? #f)
@@ -228,6 +231,7 @@
                              #:target ,target
                              #:arch ,(system->arch (or target system))
                              #:outputs %outputs
+                             #:make-flags ,make-flags
                              #:inputs %build-target-inputs
                              #:native-inputs %build-host-inputs
                              #:search-paths
diff --git a/guix/build/linux-module-build-system.scm b/guix/build/linux-module-build-system.scm
index 73d6b101f6..d51d76f94b 100644
--- a/guix/build/linux-module-build-system.scm
+++ b/guix/build/linux-module-build-system.scm
@@ -58,12 +58,13 @@
 
 ;; This block was copied from make-linux-libre--only took the "modules_install"
 ;; part.
-(define* (install #:key inputs native-inputs outputs #:allow-other-keys)
+(define* (install #:key make-flags inputs native-inputs outputs
+                  #:allow-other-keys)
   (let* ((out (assoc-ref outputs "out"))
          (moddir (string-append out "/lib/modules")))
     ;; Install kernel modules
     (mkdir-p moddir)
-    (invoke "make" "-C"
+    (apply invoke "make" "-C"
             (string-append (assoc-ref inputs "linux-module-builder")
                            "/lib/modules/build")
             (string-append "M=" (getcwd))
@@ -76,7 +77,8 @@
             (string-append "INSTALL_PATH=" out)
             (string-append "INSTALL_MOD_PATH=" out)
             "INSTALL_MOD_STRIP=1"
-            "modules_install")))
+            "modules_install"
+            (or make-flags '()))))
 
 (define %standard-phases
   (modify-phases gnu:%standard-phases
@@ -84,7 +86,8 @@
     (replace 'build build)
     (replace 'install install)))
 
-(define* (linux-module-build #:key inputs (phases %standard-phases)
+(define* (linux-module-build #:key inputs
+                             (phases %standard-phases)
                              #:allow-other-keys #:rest args)
   "Build the given package, applying all of PHASES in order, with a Linux
 kernel in attendance."




             reply	other threads:[~2020-06-01 13:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-01 12:59 Danny Milosavljevic [this message]
2020-06-02  9:05 ` [bug#41643] [PATCH] build-system: linux-module: Allow passing #:make-flags argument Mathieu Othacehe
2020-06-02 12:22   ` bug#41643: " Danny Milosavljevic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200601125910.12840-1-dannym@scratchpost.org \
    --to=dannym@scratchpost.org \
    --cc=41643@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).