diff mbox series

[bug#48120] : Teach etc/committer.scm.in some stuff.

Message ID cb4614f9e7fde30068113fc409b28fdda2882854.camel@telenet.be
State New
Headers show
Series [bug#48120] : Teach etc/committer.scm.in some stuff. | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Maxime Devos April 30, 2021, 2:36 p.m. UTC
Hi Guix,

I snarfed these from my cc-for-target branch.
Examples of generated commit messages, without any massaging:

<start snip>
gnu: ufoai-data: Use 'cc-for-target' and friends.

* gnu/packages/games.scm (ufoai-data)
[arguments]<#:configure-flags>: Use the C cross-compiler, instead of hardcoding "gcc". Use the C++ cross-compiler, instead of hardcoding "g++".

gnu: mlt: Use 'cc-for-target' and friends.

* gnu/packages/video.scm (mlt)
[arguments]<#:make-flags>: Use the C cross-compiler, instead of hardcoding "gcc". Use the C++ cross-compiler, instead of hardcoding "g++".

gnu: theorafile: Use the C cross-compiler.

* gnu/packages/video.scm (theorafile)
[arguments]<#:make-flags>: Use the C cross-compiler, instead of hardcoding "gcc".
[arguments]<#:phases>{check}: Only run tests when not requested.
<end snip>

etc/comitter.scm.in should probably do some line wrapping as well.

WDYT?

Greetings,
Maxime.
diff mbox series

Patch

From 295cca1e1745acfea49b54681d566dd3d0c1dd19 Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Fri, 30 Apr 2021 15:45:02 +0200
Subject: [PATCH 6/6] etc: committer: Explain changes in #:configure-flags.

* etc/committer.scm.in
  (change-commit-message/one-pass)[explain-argument]: Handle
  #:configure-flags the same way as #:make-flags for now.
---
 etc/committer.scm.in | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/etc/committer.scm.in b/etc/committer.scm.in
index fc3c929f17..0fd383533d 100755
--- a/etc/committer.scm.in
+++ b/etc/committer.scm.in
@@ -381,8 +381,12 @@  SUMMARY: first using a ‘void port’, then with the ‘real’ output port."
   (define (explain-argument keyword old new)
     (unless (equal? old new)
       (case keyword
-        ((#:make-flags)
-         (format port "[arguments]<#:make-flags>:")
+        ;; Sometimes, arguments like "CC=TARGET-gcc" are passed to the
+        ;; configure script.  Their interpretation is sometimes the same
+        ;; as in makefiles.  Hence, for now we unify the handling of
+        ;; #:make-flags and #:configure-flags.
+        ((#:make-flags #:configure-flags)
+         (format port "[arguments]<~a>:" keyword)
          (if (explain-list-delta (unwrap-list old) (unwrap-list new)
                                  #:pairwise/change explain-make-flags/change)
              ;; There were some unexplained changes.
-- 
2.31.1