<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>build/Makefile.am</filename>
    </added>
    <added>
      <filename>build/autotools/Makefile.am</filename>
    </added>
    <added>
      <filename>build/autotools/shave-libtool.in</filename>
    </added>
    <added>
      <filename>build/autotools/shave.in</filename>
    </added>
    <added>
      <filename>build/autotools/shave.m4</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -58,3 +58,8 @@ doc/reference/json-glib.hierarchy
 doc/reference/json-glib.interfaces
 doc/reference/json-glib.prerequisites
 doc/reference/json-glib.signals
+omf.make
+xmldocs.make
+/build/autotools/gtk-doc.m4
+/build/autotools/shave-libtool
+/build/autotools/shave</diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -19,3 +19,12 @@ which gnome-autogen.sh || {
 }
 
 REQUIRED_AUTOMAKE_VERSION=1.9 USE_GNOME2_MACROS=1 USE_COMMON_DOC_BUILD=yes . gnome-autogen.sh
+
+# we need to patch gtk-doc.make to support pretty output with
+# libtool 1.x.  Should be fixed in the next version of gtk-doc.
+# To be more resilient with the various versions of gtk-doc one
+# can find, just sed gkt-doc.make rather than patch it.
+sed -e 's#) --mode=compile#) --tag=CC --mode=compile#' gtk-doc.make &gt; gtk-doc.temp \
+                &amp;&amp; mv gtk-doc.temp gtk-doc.make
+sed -e 's#) --mode=link#) --tag=CC --mode=link#' gtk-doc.make &gt; gtk-doc.temp \
+                &amp;&amp; mv gtk-doc.temp gtk-doc.make</diff>
      <filename>autogen.sh</filename>
    </modified>
    <modified>
      <diff>@@ -2,18 +2,14 @@ m4_define([json_major_version], [0])
 m4_define([json_minor_version], [7])
 m4_define([json_micro_version], [1])
 
-m4_define([json_version],
-          [json_major_version.json_minor_version.json_micro_version])
+m4_define([json_version], [json_major_version.json_minor_version.json_micro_version])
 
 m4_define([json_interface_age], [0])
-m4_define([json_binary_age],
-          [m4_eval(100 * json_minor_version + json_micro_version)])
+m4_define([json_binary_age], [m4_eval(100 * json_minor_version + json_micro_version)])
 
-m4_define([lt_current],
-          [m4_eval(100 * json_minor_version + json_micro_version - json_interface_age)])
+m4_define([lt_current], [m4_eval(100 * json_minor_version + json_micro_version - json_interface_age)])
 m4_define([lt_revision], [json_interface_age])
-m4_define([lt_age],
-          [m4_eval(json_binary_age - json_interface_age)])
+m4_define([lt_age], [m4_eval(json_binary_age - json_interface_age)])
 
 m4_define([glib_req_version], [2.15])
 
@@ -21,10 +17,11 @@ AC_PREREQ([2.59])
 
 AC_INIT([json-glib],
         [json_version],
-        [http://bugzilla.openedhand.com/enter_bug.cgi],
+        [http://bugzilla.openedhand.com/enter_bug.cgi?product=json-glib],
         [json-glib])
 
 AC_CONFIG_SRCDIR([json-glib/json-glib.h])
+AC_CONFIG_MACRO_DIR([build/autotools])
 
 AM_INIT_AUTOMAKE([1.9])
 AM_CONFIG_HEADER([config.h])
@@ -33,6 +30,9 @@ AM_DISABLE_STATIC
 AM_PATH_GLIB_2_0
 AM_PROG_LIBTOOL
 
+# Honor aclocal flags
+ACLOCAL=&quot;$ACLOCAL $ACLOCAL_FLAGS&quot;
+
 JSON_MAJOR_VERSION=json_major_version
 JSON_MINOR_VERSION=json_minor_version
 JSON_MICRO_VERSION=json_micro_version
@@ -67,49 +67,61 @@ AM_CONDITIONAL(ENABLE_GLIB_TEST, test &quot;x$enable_glibtest&quot; = &quot;xyes&quot;)
 
 dnl = Enable debug level ===================================================
 
-m4_define([debug_default],
-          m4_if(m4_eval(json_minor_version % 2), [1], [yes], [minimum]))
+m4_define([debug_default], [m4_if(m4_eval(json_minor_version % 2), [1], [yes], [minimum])])
 
 AC_ARG_ENABLE([debug],
-              AC_HELP_STRING([--enable-debug=@&lt;:@no/minimum/yes@:&gt;@],
-                             [turn on debugging @&lt;:@default=debug_default@:&gt;@]),
-,
-              enable_debug=debug_default)
-
-if test &quot;x$enable_debug&quot; = &quot;xyes&quot;; then
-  test &quot;$cflags_set&quot; = set || CFLAGS=&quot;$CFLAGS -g&quot;
-  JSON_DEBUG_CFLAGS=&quot;-DJSON_ENABLE_DEBUG&quot;
-else
-  if test &quot;x$enable_debug&quot; = &quot;xno&quot;; then
-    JSON_DEBUG_CFLAGS=&quot;-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS&quot;
-  else # minimum
-    JSON_DEBUG_CFLAGS=&quot;-DJSON_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS&quot;
-  fi
-fi
+              [AC_HELP_STRING([--enable-debug=@&lt;:@no/minimum/yes@:&gt;@],
+                              [turn on debugging @&lt;:@default=debug_default@:&gt;@])],
+              [],
+              [enable_debug=debug_default])
+
+AS_IF([test &quot;x$enable_debug&quot; = &quot;xyes&quot;],
+      [
+        test &quot;$cflags_set&quot; = set || CFLAGS=&quot;$CFLAGS -g&quot;
+        JSON_DEBUG_CFLAGS=&quot;-DJSON_ENABLE_DEBUG&quot;
+      ],
+
+      [test &quot;x$enable_debug&quot; = &quot;xminimum&quot;],
+      [
+        JSON_DEBUG_CFLAGS=&quot;-DJSON_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS&quot;
+      ],
+
+      [test &quot;x$enable_debug&quot; = &quot;xno&quot;],
+      [
+        JSON_DEBUG_CFLAGS=&quot;-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS&quot;
+      ],
+
+      [AC_MSG_ERROR([Unknown argument to --enable-debug])]
+)
 
 AC_SUBST(JSON_DEBUG_CFLAGS)
 
 dnl = Enable strict compiler flags =========================================
 
 # use strict compiler flags only on development releases
-#m4_define([maintainer_flags_default],
-#          m4_if(m4_eval(json_minor_version % 2), [1], [yes], [no]))
-m4_define([maintainer_flags_default], [no])
+m4_define([maintainer_flags_default], [m4_if(m4_eval(json_minor_version % 2), [1], [yes], [no])])
 AC_ARG_ENABLE([maintainer-flags],
-              AC_HELP_STRING([--enable-maintainer-flags=@&lt;:@no/yes@:&gt;@],
-                             [Use strict compiler flags @&lt;:@default=maintainer_flags_default@:&gt;@]),,
-              enable_maintainer_flags=maintainer_flags_default)
+              [AC_HELP_STRING([--enable-maintainer-flags=@&lt;:@no/yes@:&gt;@],
+                              [Use strict compiler flags @&lt;:@default=maintainer_flags_default@:&gt;@])],
+              [],
+              [enable_maintainer_flags=maintainer_flags_default])
+
+AS_IF([test &quot;x$enable_maintainer_flags&quot; = &quot;xyes&quot; &amp;&amp; test &quot;x$GCC&quot; = &quot;xyes&quot;],
+      [
+        MAINTAINER_CFLAGS=&quot;-Werror -Wall -Wshadow -Wcast-align -Wno-uninitialized -Wformat-security -Winit-self&quot;
+      ]
+)
 
-if test &quot;x$enable_maintainer_flags&quot; = &quot;xyes&quot;; then
-  CPPFLAGS=&quot;$CPPFLAGS -g -Wall -Wshadow -Wcast-align -Wno-uninitialized -Werror&quot;
-else
-  CPPFLAGS=&quot;$CPPFLAGS -g -Wall&quot;
-fi
+GTK_DOC_CHECK([1.11])
 
-GTK_DOC_CHECK([1.8])
+SHAVE_INIT([build/autotools], [enable])
 
 AC_CONFIG_FILES([
         Makefile
+        build/Makefile
+        build/autotools/Makefile
+        build/autotools/shave-libtool
+        build/autotools/shave
         json-glib/Makefile
         json-glib/json-version.h
         json-glib/tests/Makefile
@@ -127,7 +139,7 @@ echo &quot; Json-GLib $VERSION&quot;
 echo &quot;&quot;
 echo &quot;                Prefix: ${prefix}&quot;
 echo &quot;           Debug level: ${enable_debug}&quot;
-echo &quot;        Compiler flags: ${CPPFLAGS}&quot;
+echo &quot;        Compiler flags: ${MAINTAINER_CFLAGS}&quot;
 echo &quot;         API reference: ${enable_gtk_doc}&quot;
 echo &quot;     Enable test suite: ${enable_glibtest}&quot;
 echo &quot;&quot;</diff>
      <filename>configure.ac</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,7 @@
 include $(top_srcdir)/Makefile.decl
 
+QUIET_GEN = $(Q:@=@echo '  GEN   '$@;)
+
 if ENABLE_GLIB_TEST
 SUBDIRS = . tests
 endif
@@ -12,10 +14,9 @@ INCLUDES = \
 	-I$(top_srcdir) 		\
 	-DPREFIX=\&quot;&quot;$(prefix)&quot;\&quot; 	\
 	-DLIBDIR=\&quot;&quot;$(libdir)&quot;\&quot; 	\
+	-DJSON_COMPILATION=1		\
 	-DG_DISABLE_DEPRECATED 		\
 	-DG_LOG_DOMAIN=\&quot;Json\&quot; 	\
-	$(JSON_CFLAGS) 			\
-	$(JSON_DEBUG_CFLAGS) 		\
 	$(NULL)
 
 LDADD = \
@@ -24,68 +25,67 @@ LDADD = \
 	-export-symbols-regex &quot;^json.*&quot; \
 	-rpath $(libdir)
 
+AM_CPPFLAGS = $(JSON_CFLAGS) $(JSON_DEBUG_CFLAGS) $(MAINTAINER_CFLAGS)
+
 BUILT_SOURCES = json-marshal.h json-marshal.c json-enum-types.h json-enum-types.c
 
 STAMP_FILES = stamp-json-marshal.h stamp-json-enum-types.h
 
 source_h = \
-	$(top_srcdir)/json-glib/json-generator.h \
-	$(top_srcdir)/json-glib/json-gobject.h \
-	$(top_srcdir)/json-glib/json-parser.h \
-	$(top_srcdir)/json-glib/json-types.h \
-	$(top_srcdir)/json-glib/json-version.h \
+	$(srcdir)/json-generator.h 	\
+	$(srcdir)/json-gobject.h 	\
+	$(srcdir)/json-parser.h 	\
+	$(srcdir)/json-types.h 		\
 	$(NULL)
 
 source_h_private = \
-	$(top_srcdir)/json-glib/json-scanner.h \
+	$(srcdir)/json-scanner.h 	\
 	$(NULL)
 
 source_c = \
-	json-array.c \
-	json-generator.c \
-	json-gobject.c \
-	json-node.c \
-	json-object.c \
-	json-parser.c \
-	json-scanner.c \
+	json-array.c 		\
+	json-generator.c 	\
+	json-gobject.c 		\
+	json-node.c 		\
+	json-object.c 		\
+	json-parser.c 		\
+	json-scanner.c 		\
 	$(NULL)
 
 json-marshal.h: stamp-json-marshal.h
 	@true
 stamp-json-marshal.h: Makefile json-marshal.list
-	$(GLIB_GENMARSHAL) \
+	$(QUIET_GEN)$(GLIB_GENMARSHAL) \
 		--prefix=_json_marshal \
 		--header \
-	$(srcdir)/json-marshal.list &gt; xgen-jmh &amp;&amp; \
-	(cmp -s xgen-jmh json-marshal.h || cp -f xgen-jmh json-marshal.h) &amp;&amp; \
-	rm -f xgen-jmh &amp;&amp; \
-	echo timestamp &gt; $(@F)
+	$(srcdir)/json-marshal.list &gt; xgen-jmh \
+	&amp;&amp; (cmp -s xgen-jmh json-marshal.h || cp -f xgen-jmh json-marshal.h) \
+	&amp;&amp; rm -f xgen-jmh \
+	&amp;&amp; echo timestamp &gt; $(@F)
 
 json-marshal.c: Makefile json-marshal.list
-	(echo &quot;#include \&quot;json-marshal.h\&quot;&quot; ; \
-	 $(GLIB_GENMARSHAL) \
+	$(QUIET_GEN)(echo &quot;#include \&quot;json-marshal.h\&quot;&quot; ; \
+	  $(GLIB_GENMARSHAL) \
 		--prefix=_json_marshal \
 		--body \
-	 $(srcdir)/json-marshal.list ) &gt; xgen-jmc &amp;&amp; \
-	cp -f xgen-jmc json-marshal.c &amp;&amp; \
-	rm -f xgen-jmc
+	  $(srcdir)/json-marshal.list ) &gt; xgen-jmc \
+	&amp;&amp; cp -f xgen-jmc json-marshal.c \
+	&amp;&amp; rm -f xgen-jmc
 
 json-enum-types.h: stamp-json-enum-types.h
 	@true
 stamp-json-enum-types.h: $(source_h) Makefile
-	( cd $(top_srcdir)/json-glib &amp;&amp; \
-	  $(GLIB_MKENUMS) \
-	  	--template $(top_srcdir)/json-glib/json-enum-types.h.in \
-	  $(source_h) ) &gt; xgen-ceth \
-	&amp;&amp; (cmp xgen-ceth json-enum-types.h || cp xgen-ceth json-enum-types.h) \
+	$(QUIET_GEN)$(GLIB_MKENUMS) \
+		--template $(srcdir)/json-enum-types.h.in \
+	$(source_h) &gt; xgen-ceth \
+	&amp;&amp; (cmp -s xgen-ceth json-enum-types.h || cp xgen-ceth json-enum-types.h) \
 	&amp;&amp; rm -f xgen-ceth \
 	&amp;&amp; echo timestamp &gt; $(@F)
 
 json-enum-types.c: json-enum-types.h
-	( cd $(top_srcdir)/json-glib &amp;&amp; \
-	  $(GLIB_MKENUMS) \
-	  	--template $(top_srcdir)/json-glib/json-enum-types.c.in \
-	  $(source_h) ) &gt; xgen-cetc \
+	$(QUIET_GEN)$(GLIB_MKENUMS) \
+		--template $(srcdir)/json-enum-types.c.in \
+	$(source_h) &gt; xgen-cetc \
 	&amp;&amp; cp xgen-cetc json-enum-types.c \
 	&amp;&amp; rm -f xgen-cetc
 
@@ -102,20 +102,23 @@ libjson_glib_1_0_la_LDFLAGS = $(LDADD)
 
 jsonincludedir = $(includedir)/json-glib-1.0/json-glib
 jsoninclude_DATA = \
-	$(source_h) \
-	$(top_srcdir)/json-glib/json-enum-types.h \
-	$(top_srcdir)/json-glib/json-glib.h
+	$(source_h) 					\
+	$(top_builddir)/json-glib/json-enum-types.h 	\
+	$(top_builddir)/json-glib/json-version.h	\
+	$(top_srcdir)/json-glib/json-glib.h		\
+	$(NULL)
 
 CLEANFILES = $(STAMP_FILES) $(BUILT_SOURCES)
 
 DISTCLEANFILES = json-version.h
 
 EXTRA_DIST += \
-	json-version.h.in \
-	json-scanner.h \
-	json-glib.h \
-	json-marshal.list \
-	json-enum-types.h.in \
-	json-enum-types.c.in
+	json-version.h.in 	\
+	json-scanner.h 		\
+	json-glib.h 		\
+	json-marshal.list 	\
+	json-enum-types.h.in 	\
+	json-enum-types.c.in	\
+	$(NULL)
 
 TESTS_ENVIRONMENT = srcdir=&quot;$(srcdir)&quot; json_all_c_sources=&quot;$(source_c)&quot;</diff>
      <filename>json-glib/Makefile.am</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>8080df63b4b4eae3b59d1214fc67f48149f49773</id>
    </parent>
  </parents>
  <author>
    <name>Emmanuele Bassi</name>
    <email>ebassi@linux.intel.com</email>
  </author>
  <url>http://github.com/ebassi/json-glib/commit/e2c65a75d68aafa26f2084928e732961e48beb99</url>
  <id>e2c65a75d68aafa26f2084928e732961e48beb99</id>
  <committed-date>2009-04-13T15:46:52-07:00</committed-date>
  <authored-date>2009-04-13T15:46:52-07:00</authored-date>
  <message>[build] Improve the build system

Clean up the configure.ac and Makefile.am files to use something
that is not entirely made of FAIL.

Also, use Shave to sanitize the libtool and compiler incantations
and restore sanity to the build system.</message>
  <tree>f41ce8bf7a1785c7dc5e3f9dbb4b96c4678b37d1</tree>
  <committer>
    <name>Emmanuele Bassi</name>
    <email>ebassi@linux.intel.com</email>
  </committer>
</commit>
