Added atk_marshal_VOID__INT_INT marshaller. Updated the Makefiles so the
authorBrian Cameron <bcameron@src.gnome.org>
Thu, 31 May 2001 14:15:06 +0000 (14:15 +0000)
committerBrian Cameron <bcameron@src.gnome.org>
Thu, 31 May 2001 14:15:06 +0000 (14:15 +0000)
proper marshall files get included in the dist.  Updated the Makefiles
and configure.in so that the docs get included in the dist.

Makefile.am
atk/Makefile.am
atk/atktext.c
atk/atkutil.c
configure.in
docs/Makefile.am

index 4da774f..7e76652 100644 (file)
@@ -1,6 +1,6 @@
 # Process this file with automake to create Makefile.in.
 
-SUBDIRS=atk tests
+SUBDIRS=atk tests docs
 
 EXTRA_DIST =           \
        atk.pc.in
index 125cfd9..48151a5 100644 (file)
@@ -25,6 +25,12 @@ libatk_la_SOURCES =          \
        atkutil.c               \
        atkvalue.c
 
+ATK_MARSHALFILES = atkmarshal.h atkmarshal.list atkmarshal.c
+EXTRA_DIST += atkmarshal.c atkmarshal.list
+MAINTAINERCLEANFILES += atkmarshal.c
+
+Makefile: $(ATK_MARSHALFILES)
+
 INCLUDES = \
        -I$(top_srcdir)         \
        @DEP_CFLAGS@
@@ -55,3 +61,20 @@ libatkinclude_HEADERS =      \
         atktext.h              \
         atkutil.h              \
         atkvalue.h
+
+# initial creation of the real stamp-* files
+atk.defs atkmarshal.h :          # never add deps here
+       test -f "$(srcdir)/$@" || touch $(srcdir)/$@
+
+$(srcdir)/stamp-atkmarshal.h: @REBUILD@ atkmarshal.list atkmarshal.h
+       cd $(srcdir) \
+       && glib-genmarshal --prefix=atk_marshal atkmarshal.list --header >> xgen-gmh \
+       && (cmp -s xgen-gmh atkmarshal.h || cp xgen-gmh atkmarshal.h) \
+       && rm -f xgen-gmh xgen-gmh~ \
+       && echo timestamp > $(@F)
+$(srcdir)/atkmarshal.c: @REBUILD@ $(srcdir)/stamp-atkmarshal.h
+       cd $(srcdir) \
+       && glib-genmarshal --prefix=atk_marshal atkmarshal.list --body >> xgen-gmc \
+       && cp xgen-gmc atkmarshal.c \
+       && rm -f xgen-gmc xgen-gmc~
+
index c747781..a1798c3 100755 (executable)
@@ -18,6 +18,7 @@
  */
 
 #include "atktext.h"
+#include "atkmarshal.h"
 
 enum {
   TEXT_CHANGED,
@@ -77,9 +78,9 @@ atk_text_base_init (gpointer *g_class)
                      G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
                      G_STRUCT_OFFSET (AtkTextIface, text_changed), 
                      (GSignalAccumulator) NULL, NULL,
-                     g_cclosure_marshal_VOID__VOID,
+                     atk_marshal_VOID__INT_INT,
                      G_TYPE_NONE,
-                     0, G_TYPE_NONE);
+                     2, G_TYPE_INT, G_TYPE_INT);
 
     atk_text_signals[CARET_MOVED] =
       g_signal_newc ("text_caret_moved",
index f1b8aa7..08cc9a2 100755 (executable)
@@ -18,6 +18,7 @@
  */
 
 #include "atkutil.h"
+#include "atkmarshal.c"
 
 /*
  * This file supports the addition and removal of multiple focus handlers
index 7cb5ecc..52038dc 100644 (file)
@@ -13,6 +13,8 @@ AC_PROG_CC
 AM_DISABLE_STATIC
 AM_PROG_LIBTOOL
 
+AC_ARG_ENABLE(rebuilds, [  --disable-rebuilds      disable all source autogeneration rules],,enable_rebuilds=yes)
+
 changequote(,)dnl
 if test "x$GCC" = "xyes"; then
   case " $CFLAGS " in
@@ -73,6 +75,53 @@ AC_CHECK_LIB(pango, pango_context_new, :, AC_MSG_ERROR([
 *** Can't link to Pango. Pango is required to build
 *** GTK+. For more information see http://www.pango.org]), $DEP_LIBS)
 
+AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false)
+
+gtk_doc_min_version=0.6
+if $GTKDOC ; then
+    gtk_doc_version=`gtkdoc-mkdb --version`
+    AC_MSG_CHECKING([gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version])
+    if perl <<EOF ; then
+       exit (("$gtk_doc_version" =~ /^[[0-9]]+\.[[0-9]]+$/) &&
+            ("$gtk_doc_version" >= "$gtk_doc_min_version") ? 0 : 1);
+EOF
+      AC_MSG_RESULT(yes)
+   else
+      AC_MSG_RESULT(no)
+       GTKDOC=false
+   fi
+fi
+
+dnl Let people disable the gtk-doc stuff.
+AC_ARG_ENABLE(gtk-doc, [  --enable-gtk-doc  Use gtk-doc to build documentation [default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=auto)
+
+if test x$enable_gtk_doc = xauto ; then
+  if test x$GTKDOC = xtrue ; then
+    enable_gtk_doc=yes
+  else
+    enable_gtk_doc=no
+  fi
+fi
+
+dnl NOTE: We need to use a separate automake conditional for this
+dnl      to make this work with the tarballs.
+AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
+
+# define a MAINT-like variable REBUILD which is set if Perl
+# and awk are found, so autogenerated sources can be rebuilt
+
+AC_PROG_AWK
+AC_CHECK_PROGS(PERL, perl5 perl)
+
+REBUILD=\#
+if test "x$enable_rebuilds" = "xyes" && \
+       test -n "$PERL" && \
+       $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 && \
+     test -n "$AWK" ; then
+  REBUILD=
+fi
+AC_SUBST(REBUILD)
+
 
 AC_OUTPUT([
 Makefile
index 7a728a8..eb9f7cc 100644 (file)
@@ -1,5 +1,7 @@
 ## Process this file with automake to produce Makefile.in
 
+EXTRA_DIST = Makefile.am atk-api.sgml atk-docs.sgml atk-sections.txt
+
 # The name of the module.
 DOC_MODULE=atk
 
@@ -37,4 +39,29 @@ install-data-local:
        install -m 0644 html/index.sgml $(TARGET_DIR)
        gtkdoc-fixxref --module=$(DOC_MODULE) --html-dir=$(HTML_DIR)
 
-.PHONY : html sgml templates scan
+#
+# Require gtk-doc when making dist
+#
+if ENABLE_GTK_DOC
+dist-check-gtkdoc:
+else
+dist-check-gtkdoc:
+       @echo "*** gtk-doc must be installed and enabled in order to make dist"
+       @false
+endif
+
+dist-hook: dist-check-gtkdoc dist-hook-local
+       mkdir $(distdir)/tmpl
+       mkdir $(distdir)/sgml
+       mkdir $(distdir)/html
+       -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
+       -cp $(srcdir)/sgml/*.sgml $(distdir)/sgml
+       -cp $(srcdir)/html/index.sgml $(distdir)/html
+       -cp $(srcdir)/html/*.html $(srcdir)/html/*.css $(distdir)/html
+
+       images=$(HTML_IMAGES) ;                 \
+       for i in $$images ; do                  \
+         cp $(srcdir)/$$i $(distdir)/html ;  \
+       done
+
+.PHONY : html sgml templates scan dist-hook-local