guix-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Ludovic Courtès
Date: Fri, 18 Aug 2023 10:16:21 -0400 (EDT)

branch: wip-record-types
commit 95ca6edca5cc12cfacf8994d46ebdc23cd037f21
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Tue Aug 15 16:19:14 2023 +0200

    build: Enable more compiler warnings.
    
    * Makefile.am (GUILE_WARNINGS): New variable.
    (.scm.go): Use it.
---
 Makefile.am | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 6da434f..ae4e6c8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -161,6 +161,12 @@ TESTS = \
   tests/remote.scm \
   tests/utils.scm
 
+# Compiler warning flags.
+GUILE_WARNINGS =                                       \
+   -Wformat -Wunbound-variable -Warity-mismatch                \
+   -Wshadowed-toplevel -Wmacro-use-before-definition   \
+   -Wbad-case-datum -Wduplicate-case-datum # -Wunused-variable
+
 # Unset 'GUILE_LOAD_COMPILED_PATH' altogether while compiling.  Otherwise, if
 # $GUILE_LOAD_COMPILED_PATH contains $(pkgmoduledir), we may find .go files in
 # there that are newer than the local .scm files (for instance because the
@@ -174,10 +180,9 @@ TESTS = \
        $(guilec_verbose)$(MKDIR_P) `dirname "$@"`; \
        export GUILE_AUTO_COMPILE=0 ; unset GUILE_LOAD_COMPILED_PATH; \
        LC_ALL=C \
-       $(top_builddir)/pre-inst-env $(GUILD) compile \
-         --load-path="$(top_builddir)/src" \
-         --load-path="$(top_srcdir)/src" \
-         --warn=format --warn=unbound-variable --warn=arity-mismatch \
+       $(top_builddir)/pre-inst-env $(GUILD) compile                   \
+         -L "$(top_builddir)/src" -L "$(top_srcdir)/src"               \
+         $(GUILE_WARNINGS)                                             \
          --target="$(host)" --output="$@" "$<" $(devnull_verbose)
 
 CLEANFILES =                                   \



reply via email to

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