[mm-common] MM_ARG_ENABLE_WARNINGS documentation: Add an example call and more clues.



commit 6175f52c9162ca621e74263cadde62b2a12489e3
Author: Murray Cumming <murrayc murrayc com>
Date:   Mon Oct 19 09:33:46 2009 +0200

    MM_ARG_ENABLE_WARNINGS documentation: Add an example call and more clues.
    
    * macros/mm-warnings.m4: Documentation: Add an example call of this macro,
    mention how to use the resulting variable in the Makefile.am, and mentino how
    to force fatal warnings during distcheck.

 macros/mm-warnings.m4 |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/macros/mm-warnings.m4 b/macros/mm-warnings.m4
index 0070333..12ee7b9 100644
--- a/macros/mm-warnings.m4
+++ b/macros/mm-warnings.m4
@@ -44,6 +44,21 @@ AC_ARG_ENABLE([warnings],
 ## which is expanded to -D<module>_DISABLE_DEPRECATED flags if fatal warnings
 ## are enabled, too.
 ##
+## For instance, your configure.ac file might use the macro like this:
+##   MM_ARG_ENABLE_WARNINGS([MYAPP_C_WARNING_FLAGS],
+##                         [-Wall],
+##                         [-pedantic -Wall -Wextra]
+##                         [G PANGO ATK GDK GDK_PIXBUF GTK])
+##
+## Your Makefile.am could then contain a line such as this:
+##   AM_CFLAGS = $(MYAPP_C_WARNING_FLAGS)
+##
+## Note that you may call MM_ARG_ENABLE_WARNINGS twice, once for CFLAGS, and once for CXXFLAGS (for C++).
+##
+## You may force people to fix warnings when creating release tarballs by 
+## adding this line to your Makefile.am:
+##   DISTCHECK_CONFIGURE_FLAGS = --enable-warnings=fatal
+##
 AC_DEFUN([MM_ARG_ENABLE_WARNINGS],
 [dnl
 m4_assert([$# >= 3])[]dnl



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