[gnome-commander/ConvertWarningsToErrors: 1/5] Convert compilation warnings into errors, add compiler flag tests



commit 2ecd24547341618085cce43c8a9cb06f60b78d08
Author: Uwe Scholz <uwescholz src gnome org>
Date:   Sat Apr 15 18:16:02 2017 +0200

    Convert compilation warnings into errors, add compiler flag tests

 Makefile.am                    |    4 ++++
 configure.ac                   |   14 +++++---------
 libgcmd/Makefile.am            |    4 +++-
 plugins/fileroller/Makefile.am |    4 +++-
 plugins/test/Makefile.am       |    4 +++-
 src/Makefile.am                |    4 +++-
 src/dialogs/Makefile.am        |    4 +++-
 src/intviewer/Makefile.am      |    4 +++-
 src/tags/Makefile.am           |    4 +++-
 tests/Makefile.am              |    4 +++-
 10 files changed, 33 insertions(+), 17 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index e2570c2..fdf46eb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,9 @@
 ACLOCAL_AMFLAGS = -I m4
 
+AM_CXXFLAGS = $(WARN_CXXFLAGS)
+
+AM_LDFLAGS = $(WARN_LDFLAGS)
+
 SUBDIRS = libgcmd src plugins po pixmaps doc data tests
 
 distuninstallcheck_listfiles = find . -type f -print | grep -v scrollkeeper
diff --git a/configure.ac b/configure.ac
index 67d542d..a64cdb7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13,20 +13,16 @@ AC_USE_SYSTEM_EXTENSIONS
 
 GLIB_GSETTINGS
 
+AX_IS_RELEASE([minor-version])
+AX_COMPILER_FLAGS
+AX_COMPILER_FLAGS_CXXFLAGS
+AX_CXX_COMPILE_STDCXX_11
+
 AC_PROG_CC
 AC_PROG_CXX
 AM_PROG_LEX
 LT_INIT
 
-AX_CXX_COMPILE_STDCXX_11
-
-dnl add -Wall to CFLAGS when using gcc
-CC_WARNINGS=
-if test "x$GCC" = "xyes"; then
-  CC_WARNINGS="-Wall"
-fi
-AC_SUBST(CC_WARNINGS)
-
 dnl ===================
 dnl Gettext stuff
 dnl ===================
diff --git a/libgcmd/Makefile.am b/libgcmd/Makefile.am
index 746e211..0a37d12 100644
--- a/libgcmd/Makefile.am
+++ b/libgcmd/Makefile.am
@@ -1,7 +1,9 @@
 ## Process this file with automake to produce Makefile.in
 
+AM_CXXFLAGS = $(WARN_CXXFLAGS)
+AM_LDFLAGS = $(WARN_LDFLAGS)
+
 AM_CPPFLAGS = \
-       $(CC_WARNINGS) \
        $(GNOMEUI_CFLAGS) \
        $(GNOMEVFS_CFLAGS)
 
diff --git a/plugins/fileroller/Makefile.am b/plugins/fileroller/Makefile.am
index 0b9c071..631e3ab 100644
--- a/plugins/fileroller/Makefile.am
+++ b/plugins/fileroller/Makefile.am
@@ -1,7 +1,9 @@
 ## Process this file with automake to produce Makefile.in
 
+AM_CXXFLAGS = $(WARN_CXXFLAGS)
+AM_LDFLAGS = $(WARN_LDFLAGS)
+
 AM_CPPFLAGS = \
-       $(CC_WARNINGS) \
        -I$(top_srcdir) \
        $(GNOMEUI_CFLAGS) \
        $(GNOMEVFS_CFLAGS)
diff --git a/plugins/test/Makefile.am b/plugins/test/Makefile.am
index 43d93ce..c375925 100644
--- a/plugins/test/Makefile.am
+++ b/plugins/test/Makefile.am
@@ -1,7 +1,9 @@
 ## Process this file with automake to produce Makefile.in
 
+AM_CXXFLAGS = $(WARN_CXXFLAGS)
+AM_LDFLAGS = $(WARN_LDFLAGS)
+
 AM_CPPFLAGS = \
-       $(CC_WARNINGS) \
        -I$(top_srcdir) \
        $(GNOMEUI_CFLAGS) \
        $(GNOMEVFS_CFLAGS)
diff --git a/src/Makefile.am b/src/Makefile.am
index fec1554..4874efd 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2,8 +2,10 @@
 
 SUBDIRS = dialogs tags intviewer
 
+AM_CXXFLAGS = $(WARN_CXXFLAGS)
+AM_LDFLAGS = $(WARN_LDFLAGS)
+
 AM_CPPFLAGS = \
-       $(CC_WARNINGS) \
        -I$(top_srcdir) \
        $(GNOMEUI_CFLAGS) \
        $(GNOMEVFS_CFLAGS) \
diff --git a/src/dialogs/Makefile.am b/src/dialogs/Makefile.am
index c079daf..c75b6e2 100644
--- a/src/dialogs/Makefile.am
+++ b/src/dialogs/Makefile.am
@@ -2,8 +2,10 @@
 
 noinst_LIBRARIES = libgcmd-dialogs.a
 
+AM_CXXFLAGS = $(WARN_CXXFLAGS) -Wno-error=missing-declarations -Wno-missing-declarations
+AM_LDFLAGS = $(WARN_LDFLAGS)
+
 AM_CPPFLAGS = \
-       $(CC_WARNINGS) \
        -I$(top_srcdir) \
        -I$(srcdir)/.. \
        $(GNOMEUI_CFLAGS) \
diff --git a/src/intviewer/Makefile.am b/src/intviewer/Makefile.am
index 42096d6..a8c53b3 100644
--- a/src/intviewer/Makefile.am
+++ b/src/intviewer/Makefile.am
@@ -1,7 +1,9 @@
 ## Process this file with automake to produce Makefile.in
 
+AM_CXXFLAGS = $(WARN_CXXFLAGS)
+AM_LDFLAGS = $(WARN_LDFLAGS)
+
 AM_CPPFLAGS = \
-       $(CC_WARNINGS) \
        -I$(top_srcdir) \
        -I$(srcdir)/.. \
        $(GLIB_CFLAGS) \
diff --git a/src/tags/Makefile.am b/src/tags/Makefile.am
index 9849115..be5aadd 100644
--- a/src/tags/Makefile.am
+++ b/src/tags/Makefile.am
@@ -2,8 +2,10 @@
 
 noinst_LIBRARIES = libgcmd-tags.a
 
+AM_CXXFLAGS = $(WARN_CXXFLAGS)
+AM_LDFLAGS = $(WARN_LDFLAGS)
+
 AM_CPPFLAGS = \
-       $(CC_WARNINGS) \
        -I$(top_srcdir) \
        -I$(srcdir)/.. \
        $(GNOMEUI_CFLAGS) \
diff --git a/tests/Makefile.am b/tests/Makefile.am
index be784bc..0bb21d3 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,7 +1,9 @@
 ## Process this file with automake to produce Makefile.in
 
+AM_CXXFLAGS = $(WARN_CXXFLAGS)
+AM_LDFLAGS = $(WARN_LDFLAGS)
+
 AM_CPPFLAGS = \
-       $(CC_WARNINGS) \
        $(GLIB_CFLAGS) \
        $(GOBJECT_CFLAGS) \
        $(GTK_CFLAGS) \


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