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.
This commit is contained in:
parent
20973bd29f
commit
915d9ec7ca
@ -32,6 +32,7 @@ INCLUDES = \
|
|||||||
$(GCC_FLAGS) \
|
$(GCC_FLAGS) \
|
||||||
$(CLUTTER_CFLAGS) \
|
$(CLUTTER_CFLAGS) \
|
||||||
$(CLUTTER_DEBUG_CFLAGS) \
|
$(CLUTTER_DEBUG_CFLAGS) \
|
||||||
|
$(MAINTAINER_CFLAGS) \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
LDADD = \
|
LDADD = \
|
||||||
|
@ -9,6 +9,7 @@ INCLUDES = \
|
|||||||
-DCLUTTER_COMPILATION \
|
-DCLUTTER_COMPILATION \
|
||||||
$(CLUTTER_CFLAGS) \
|
$(CLUTTER_CFLAGS) \
|
||||||
$(CLUTTER_DEBUG_CFLAGS) \
|
$(CLUTTER_DEBUG_CFLAGS) \
|
||||||
|
$(MAINTAINER_CFLAGS) \
|
||||||
$(GCC_FLAGS)
|
$(GCC_FLAGS)
|
||||||
|
|
||||||
LDADD = $(CLUTTER_LIBS)
|
LDADD = $(CLUTTER_LIBS)
|
||||||
|
@ -24,6 +24,7 @@ INCLUDES = \
|
|||||||
-DCLUTTER_COMPILATION \
|
-DCLUTTER_COMPILATION \
|
||||||
$(CLUTTER_CFLAGS) \
|
$(CLUTTER_CFLAGS) \
|
||||||
$(CLUTTER_DEBUG_CFLAGS) \
|
$(CLUTTER_DEBUG_CFLAGS) \
|
||||||
|
$(MAINTAINER_CFLAGS) \
|
||||||
$(GCC_FLAGS)
|
$(GCC_FLAGS)
|
||||||
|
|
||||||
LDADD = $(CLUTTER_LIBS)
|
LDADD = $(CLUTTER_LIBS)
|
||||||
|
@ -24,6 +24,7 @@ INCLUDES = \
|
|||||||
-DCLUTTER_COMPILATION \
|
-DCLUTTER_COMPILATION \
|
||||||
$(CLUTTER_CFLAGS) \
|
$(CLUTTER_CFLAGS) \
|
||||||
$(CLUTTER_DEBUG_CFLAGS) \
|
$(CLUTTER_DEBUG_CFLAGS) \
|
||||||
|
$(MAINTAINER_CFLAGS) \
|
||||||
$(GCC_FLAGS)
|
$(GCC_FLAGS)
|
||||||
|
|
||||||
LDADD = $(CLUTTER_LIBS)
|
LDADD = $(CLUTTER_LIBS)
|
||||||
|
@ -19,6 +19,7 @@ libcoglpango_la_SOURCES = \
|
|||||||
INCLUDES = \
|
INCLUDES = \
|
||||||
@GCC_FLAGS@ @CLUTTER_CFLAGS@ \
|
@GCC_FLAGS@ @CLUTTER_CFLAGS@ \
|
||||||
$(CLUTTER_DEBUG_CFLAGS) \
|
$(CLUTTER_DEBUG_CFLAGS) \
|
||||||
|
$(MAINTAINER_CFLAGS) \
|
||||||
-DCLUTTER_COMPILATION \
|
-DCLUTTER_COMPILATION \
|
||||||
-I$(top_srcdir) \
|
-I$(top_srcdir) \
|
||||||
-I$(top_srcdir)/clutter \
|
-I$(top_srcdir)/clutter \
|
||||||
|
@ -580,8 +580,9 @@ AC_ARG_ENABLE([maintainer-flags],
|
|||||||
enable_maintainer_flags=maintainer_flags_default)
|
enable_maintainer_flags=maintainer_flags_default)
|
||||||
|
|
||||||
if test "x$enable_maintainer_flags" = "xyes"; then
|
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
|
fi
|
||||||
|
AC_SUBST(MAINTAINER_CFLAGS)
|
||||||
|
|
||||||
|
|
||||||
dnl = GTK Doc check ========================================================
|
dnl = GTK Doc check ========================================================
|
||||||
@ -699,7 +700,7 @@ echo " GL Headers: ${CLUTTER_GL_HEADER}"
|
|||||||
echo " Image backend: ${imagebackend}"
|
echo " Image backend: ${imagebackend}"
|
||||||
echo " Target library: ${clutterbackendlib}"
|
echo " Target library: ${clutterbackendlib}"
|
||||||
echo " Debug level: ${enable_debug}"
|
echo " Debug level: ${enable_debug}"
|
||||||
echo " Compiler flags: ${CPPFLAGS}"
|
echo " Compiler flags: ${CPPFLAGS} ${MAINTAINER_CFLAGS}"
|
||||||
echo " Build API Documentation: ${enable_gtk_doc}"
|
echo " Build API Documentation: ${enable_gtk_doc}"
|
||||||
echo " Build Manual Documentation: ${enable_manual}"
|
echo " Build Manual Documentation: ${enable_manual}"
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -60,7 +60,9 @@ test_conformance_CFLAGS = \
|
|||||||
-I$(top_srcdir)/ \
|
-I$(top_srcdir)/ \
|
||||||
-I$(top_srcdir)/clutter \
|
-I$(top_srcdir)/clutter \
|
||||||
-I$(top_builddir)/clutter \
|
-I$(top_builddir)/clutter \
|
||||||
$(CLUTTER_CFLAGS)
|
$(CLUTTER_CFLAGS) \
|
||||||
|
$(MAINTAINER_CFLAGS)
|
||||||
|
|
||||||
test_conformance_LDADD = $(top_builddir)/clutter/libclutter-@CLUTTER_FLAVOUR@-@CLUTTER_MAJORMINOR@.la
|
test_conformance_LDADD = $(top_builddir)/clutter/libclutter-@CLUTTER_FLAVOUR@-@CLUTTER_MAJORMINOR@.la
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
@ -101,11 +103,12 @@ full-report-disable-npots:
|
|||||||
| sed 's/>GTester Unit Test Report</>GTester Unit Test Report (no NPOTs)</' \
|
| sed 's/>GTester Unit Test Report</>GTester Unit Test Report (no NPOTs)</' \
|
||||||
> test-conformance-results-dn.html )
|
> 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
|
if HAVE_LIBDL
|
||||||
|
XML_REPORTS += test-conformance-results-dn.xml
|
||||||
REPORTS += test-conformance-results-dn.html
|
HTML_REPORTS += test-conformance-results-dn.html
|
||||||
full-report-generate: full-report-normal full-report-disable-npots
|
full-report-generate: full-report-normal full-report-disable-npots
|
||||||
|
|
||||||
else
|
else
|
||||||
@ -114,8 +117,10 @@ full-report-generate: full-report-normal
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
full-report: full-report-generate
|
full-report: full-report-generate
|
||||||
@for x in $(REPORTS); do \
|
@for x in $(HTML_REPORTS); do \
|
||||||
gnome-open "$$x"; \
|
gnome-open "$$x"; \
|
||||||
done
|
done
|
||||||
|
|
||||||
EXTRA_DIST = ADDING_NEW_TESTS test-wrapper.sh
|
EXTRA_DIST = ADDING_NEW_TESTS test-launcher.sh
|
||||||
|
|
||||||
|
CLEANFILES = $(XML_REPORTS) $(HTML_REPORTS)
|
||||||
|
@ -66,7 +66,7 @@ BUILT_SOURCES = wrappers redhand.png test-script.json
|
|||||||
|
|
||||||
INCLUDES = -I$(top_srcdir)/ -I$(top_srcdir)/clutter -I$(top_builddir)/clutter
|
INCLUDES = -I$(top_srcdir)/ -I$(top_srcdir)/clutter -I$(top_builddir)/clutter
|
||||||
LDADD = $(top_builddir)/clutter/libclutter-@CLUTTER_FLAVOUR@-@CLUTTER_MAJORMINOR@.la
|
LDADD = $(top_builddir)/clutter/libclutter-@CLUTTER_FLAVOUR@-@CLUTTER_MAJORMINOR@.la
|
||||||
AM_CFLAGS = $(CLUTTER_CFLAGS)
|
AM_CFLAGS = $(CLUTTER_CFLAGS) $(MAINTAINER_CFLAGS)
|
||||||
AM_LDFLAGS = $(CLUTTER_LIBS)
|
AM_LDFLAGS = $(CLUTTER_LIBS)
|
||||||
|
|
||||||
noinst_PROGRAMS = test-interactive
|
noinst_PROGRAMS = test-interactive
|
||||||
|
@ -3,7 +3,10 @@ noinst_PROGRAMS = \
|
|||||||
|
|
||||||
INCLUDES = -I$(top_srcdir)/ -I$(top_srcdir)/clutter -I$(top_builddir)/clutter
|
INCLUDES = -I$(top_srcdir)/ -I$(top_srcdir)/clutter -I$(top_builddir)/clutter
|
||||||
LDADD = $(top_builddir)/clutter/libclutter-@CLUTTER_FLAVOUR@-@CLUTTER_MAJORMINOR@.la
|
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)
|
AM_LDFLAGS = $(CLUTTER_LIBS)
|
||||||
|
|
||||||
test_text_SOURCES = test-text.c
|
test_text_SOURCES = test-text.c
|
||||||
|
Loading…
x
Reference in New Issue
Block a user