Split maintainer-flags from the compiler flags
authorEmmanuele Bassi <ebassi@linux.intel.com>
Fri, 23 Jan 2009 13:09:51 +0000 (13:09 +0000)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Fri, 23 Jan 2009 13:09:51 +0000 (13:09 +0000)
The maintainer compiler flags we use trigger warnings and errors
in the autogenerated code that gtk-doc creates to scan the header
and source files. Since we cannot control that, and we must run
a distcheck with both --enable-gtk-doc and --enable-maintainer-flags
turned on, we need to use less-strict compiler flags when inside
the doc/reference subdirectories.

The way to do this is to split the maintainer compiler flags into
their own Makefile variable, called MAINTAINER_CFLAGS. The we
can use $(MAINTAINER_CFLAGS) in the INCLUDES or _CFLAGS sections
of each part of the source directories we wish to check with the
anal retentiveness suited for maintainers.

clutter/Makefile.am
clutter/cogl/common/Makefile.am
clutter/cogl/gl/Makefile.am
clutter/cogl/gles/Makefile.am
clutter/pango/Makefile.am
configure.ac
tests/conform/Makefile.am
tests/interactive/Makefile.am
tests/micro-bench/Makefile.am

index ecb3e77..780bd7e 100644 (file)
@@ -32,6 +32,7 @@ INCLUDES = \
        $(GCC_FLAGS)                                    \
        $(CLUTTER_CFLAGS)                               \
        $(CLUTTER_DEBUG_CFLAGS)                         \
+       $(MAINTAINER_CFLAGS)                            \
        $(NULL)
 
 LDADD = \
index bfedc2e..d883dad 100644 (file)
@@ -9,6 +9,7 @@ INCLUDES = \
         -DCLUTTER_COMPILATION \
        $(CLUTTER_CFLAGS) \
        $(CLUTTER_DEBUG_CFLAGS) \
+       $(MAINTAINER_CFLAGS) \
        $(GCC_FLAGS)
 
 LDADD = $(CLUTTER_LIBS)
index b355b93..114dfac 100644 (file)
@@ -24,6 +24,7 @@ INCLUDES = \
         -DCLUTTER_COMPILATION \
        $(CLUTTER_CFLAGS) \
        $(CLUTTER_DEBUG_CFLAGS) \
+       $(MAINTAINER_CFLAGS) \
        $(GCC_FLAGS)
 
 LDADD = $(CLUTTER_LIBS)
index 30deaf4..2b56526 100644 (file)
@@ -24,6 +24,7 @@ INCLUDES = \
         -DCLUTTER_COMPILATION \
        $(CLUTTER_CFLAGS) \
        $(CLUTTER_DEBUG_CFLAGS) \
+       $(MAINTAINER_CFLAGS) \
        $(GCC_FLAGS)
 
 LDADD = $(CLUTTER_LIBS)
index 021e35e..1d2d224 100644 (file)
@@ -19,6 +19,7 @@ libcoglpango_la_SOURCES = \
 INCLUDES = \
        @GCC_FLAGS@ @CLUTTER_CFLAGS@                    \
        $(CLUTTER_DEBUG_CFLAGS)                         \
+       $(MAINTAINER_CFLAGS)                            \
        -DCLUTTER_COMPILATION                           \
        -I$(top_srcdir)                                 \
        -I$(top_srcdir)/clutter                         \
index ccfc2e0..7fb831c 100644 (file)
@@ -580,8 +580,9 @@ AC_ARG_ENABLE([maintainer-flags],
               enable_maintainer_flags=maintainer_flags_default)
 
 if test "x$enable_maintainer_flags" = "xyes"; then
-  CPPFLAGS="$CPPFLAGS -Werror -Wall -Wshadow -Wcast-align -Wno-uninitialized -Wempty-body -Wformat-security -Winit-self"
+  MAINTAINER_CFLAGS="-Werror -Wall -Wshadow -Wcast-align -Wno-uninitialized -Wempty-body -Wformat-security -Winit-self"
 fi
+AC_SUBST(MAINTAINER_CFLAGS)
 
 
 dnl = GTK Doc check ========================================================
@@ -699,7 +700,7 @@ echo "                  GL Headers:   ${CLUTTER_GL_HEADER}"
 echo "               Image backend:   ${imagebackend}"
 echo "              Target library:   ${clutterbackendlib}"
 echo "                 Debug level:   ${enable_debug}"
-echo "              Compiler flags:   ${CPPFLAGS}"
+echo "              Compiler flags:   ${CPPFLAGS} ${MAINTAINER_CFLAGS}"
 echo "     Build API Documentation:   ${enable_gtk_doc}"
 echo "  Build Manual Documentation:   ${enable_manual}"
 echo ""
index 04f85af..0889269 100644 (file)
@@ -60,7 +60,9 @@ test_conformance_CFLAGS = \
        -I$(top_srcdir)/ \
        -I$(top_srcdir)/clutter \
        -I$(top_builddir)/clutter \
-       $(CLUTTER_CFLAGS)
+       $(CLUTTER_CFLAGS) \
+       $(MAINTAINER_CFLAGS)
+
 test_conformance_LDADD = $(top_builddir)/clutter/libclutter-@CLUTTER_FLAVOUR@-@CLUTTER_MAJORMINOR@.la
 
 .PHONY: test
@@ -101,11 +103,12 @@ full-report-disable-npots:
              | sed 's/>GTester Unit Test Report</>GTester Unit Test Report (no NPOTs)</' \
              > test-conformance-results-dn.html )
 
-REPORTS = test-conformance-results.html
+XML_REPORTS = test-conformance-results.xml
+HTML_REPORTS = test-conformance-results.html
 
 if HAVE_LIBDL
-
-REPORTS += test-conformance-results-dn.html
+XML_REPORTS += test-conformance-results-dn.xml
+HTML_REPORTS += test-conformance-results-dn.html
 full-report-generate: full-report-normal full-report-disable-npots
 
 else
@@ -114,8 +117,10 @@ full-report-generate: full-report-normal
 endif
 
 full-report: full-report-generate
-       @for x in $(REPORTS); do \
+       @for x in $(HTML_REPORTS); do \
                gnome-open "$$x"; \
        done
 
-EXTRA_DIST = ADDING_NEW_TESTS test-wrapper.sh
+EXTRA_DIST = ADDING_NEW_TESTS test-launcher.sh
+
+CLEANFILES = $(XML_REPORTS) $(HTML_REPORTS)
index 8c20d7c..5fa5428 100644 (file)
@@ -66,7 +66,7 @@ BUILT_SOURCES = wrappers redhand.png test-script.json
 
 INCLUDES = -I$(top_srcdir)/ -I$(top_srcdir)/clutter -I$(top_builddir)/clutter
 LDADD = $(top_builddir)/clutter/libclutter-@CLUTTER_FLAVOUR@-@CLUTTER_MAJORMINOR@.la
-AM_CFLAGS = $(CLUTTER_CFLAGS)
+AM_CFLAGS = $(CLUTTER_CFLAGS) $(MAINTAINER_CFLAGS)
 AM_LDFLAGS = $(CLUTTER_LIBS)
 
 noinst_PROGRAMS = test-interactive
index 8ae34cc..e58bae6 100644 (file)
@@ -3,7 +3,10 @@ noinst_PROGRAMS = \
 
 INCLUDES = -I$(top_srcdir)/ -I$(top_srcdir)/clutter -I$(top_builddir)/clutter
 LDADD = $(top_builddir)/clutter/libclutter-@CLUTTER_FLAVOUR@-@CLUTTER_MAJORMINOR@.la
-AM_CFLAGS = $(CLUTTER_CFLAGS) -DTESTS_DATA_DIR=$(top_srcdir)/tests/data/
+AM_CFLAGS = \
+       $(CLUTTER_CFLAGS) \
+       $(MAINTAINER_CFLAGS) \
+       -DTESTS_DATA_DIR=\""$(top_srcdir)/tests/data/"\"
 AM_LDFLAGS = $(CLUTTER_LIBS)
 
 test_text_SOURCES = test-text.c