From: Emmanuele Bassi Date: Fri, 23 Jan 2009 13:09:51 +0000 (+0000) Subject: Split maintainer-flags from the compiler flags X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=915d9ec7ca782572944a96fd52c2ff2ffdb1dac7;p=profile%2Fivi%2Fclutter.git Split maintainer-flags from the compiler flags 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. --- diff --git a/clutter/Makefile.am b/clutter/Makefile.am index ecb3e77..780bd7e 100644 --- a/clutter/Makefile.am +++ b/clutter/Makefile.am @@ -32,6 +32,7 @@ INCLUDES = \ $(GCC_FLAGS) \ $(CLUTTER_CFLAGS) \ $(CLUTTER_DEBUG_CFLAGS) \ + $(MAINTAINER_CFLAGS) \ $(NULL) LDADD = \ diff --git a/clutter/cogl/common/Makefile.am b/clutter/cogl/common/Makefile.am index bfedc2e..d883dad 100644 --- a/clutter/cogl/common/Makefile.am +++ b/clutter/cogl/common/Makefile.am @@ -9,6 +9,7 @@ INCLUDES = \ -DCLUTTER_COMPILATION \ $(CLUTTER_CFLAGS) \ $(CLUTTER_DEBUG_CFLAGS) \ + $(MAINTAINER_CFLAGS) \ $(GCC_FLAGS) LDADD = $(CLUTTER_LIBS) diff --git a/clutter/cogl/gl/Makefile.am b/clutter/cogl/gl/Makefile.am index b355b93..114dfac 100644 --- a/clutter/cogl/gl/Makefile.am +++ b/clutter/cogl/gl/Makefile.am @@ -24,6 +24,7 @@ INCLUDES = \ -DCLUTTER_COMPILATION \ $(CLUTTER_CFLAGS) \ $(CLUTTER_DEBUG_CFLAGS) \ + $(MAINTAINER_CFLAGS) \ $(GCC_FLAGS) LDADD = $(CLUTTER_LIBS) diff --git a/clutter/cogl/gles/Makefile.am b/clutter/cogl/gles/Makefile.am index 30deaf4..2b56526 100644 --- a/clutter/cogl/gles/Makefile.am +++ b/clutter/cogl/gles/Makefile.am @@ -24,6 +24,7 @@ INCLUDES = \ -DCLUTTER_COMPILATION \ $(CLUTTER_CFLAGS) \ $(CLUTTER_DEBUG_CFLAGS) \ + $(MAINTAINER_CFLAGS) \ $(GCC_FLAGS) LDADD = $(CLUTTER_LIBS) diff --git a/clutter/pango/Makefile.am b/clutter/pango/Makefile.am index 021e35e..1d2d224 100644 --- a/clutter/pango/Makefile.am +++ b/clutter/pango/Makefile.am @@ -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 \ diff --git a/configure.ac b/configure.ac index ccfc2e0..7fb831c 100644 --- a/configure.ac +++ b/configure.ac @@ -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 "" diff --git a/tests/conform/Makefile.am b/tests/conform/Makefile.am index 04f85af..0889269 100644 --- a/tests/conform/Makefile.am +++ b/tests/conform/Makefile.am @@ -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 ReportGTester 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) diff --git a/tests/interactive/Makefile.am b/tests/interactive/Makefile.am index 8c20d7c..5fa5428 100644 --- a/tests/interactive/Makefile.am +++ b/tests/interactive/Makefile.am @@ -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 diff --git a/tests/micro-bench/Makefile.am b/tests/micro-bench/Makefile.am index 8ae34cc..e58bae6 100644 --- a/tests/micro-bench/Makefile.am +++ b/tests/micro-bench/Makefile.am @@ -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