[gsound] build: Use (much) more strict warning flags



commit c5722e3ce9b14c8c84b1986c83e119dc70647de7
Author: Tristan Brindle <t c brindle gmail com>
Date:   Mon Nov 2 00:11:35 2015 +1300

    build: Use (much) more strict warning flags
    
    Previously -Wall was just hard-coded in Makefile.am. Instead, use
    AX_COMPILE_FLAGS [1] to add just about every (sensible) compiler
    warning there is.
    
    This also enables -Werror by default, which I'm not entirely
    convinced by but there we are. The macro does at least disable
    -Werror for release builds.
    
    [1] http://www.gnu.org/software/autoconf-archive/ax_compiler_flags.html

 configure.ac       |    2 ++
 gsound/Makefile.am |   10 +++++-----
 2 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index cd2ad56..d690d70 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,6 +15,8 @@ AC_PROG_CC
 AM_PROG_CC_C_O
 AM_PROG_VALAC
 
+AX_COMPILER_FLAGS
+
 # Before making a release, the LT_VERSION string should be modified.
 # The string is of the form C:R:A.
 # - If interfaces have been changed or added, but binary compatibility has
diff --git a/gsound/Makefile.am b/gsound/Makefile.am
index 54881f1..5a3125e 100644
--- a/gsound/Makefile.am
+++ b/gsound/Makefile.am
@@ -5,20 +5,20 @@ NULL =
 lib_LTLIBRARIES = libgsound.la
 
 libgsound_la_SOURCES = \
-       gsound-context.c gsound-context.h gsound-attr.h\
+       gsound-context.c gsound-context.h gsound-attr.h \
        $(NULL)
 
 libgsound_la_CPPFLAGS = \
-       ${GSOUND_CFLAGS}
+       ${GSOUND_CFLAGS} \
        ${NULL}
 
 libgsound_la_CFLAGS =\
-       -Wall\
-       -g \
+       ${WARN_CFLAGS} \
        ${NULL}
 
 libgsound_la_LDFLAGS = \
        -version-info $(GSOUND_LT_VERSION) \
+       ${WARN_LDFLAGS} \
        $(NULL)
 
 libgsound_la_LIBADD = \
@@ -47,7 +47,7 @@ introspection_sources = $(libgsound_la_SOURCES)
 
 GSound-1.0.gir: libgsound.la
 GSound_1_0_gir_INCLUDES = GObject-2.0 Gio-2.0
-GSound_1_0_gir_CFLAGS = $(INCLUDES)
+GSound_1_0_gir_CFLAGS = $(INCLUDES) ${WARN_SCANNERFLAGS}
 GSound_1_0_gir_LIBS = libgsound.la
 GSound_1_0_gir_FILES = $(introspection_sources)
 GSound_1_0_gir_SCANNERFLAGS = --c-include "gsound.h"


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