Re: Add gtk-doc usage check to autoreconf

Javier Jardón <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.patches
Message-ID <CAF6QBXF8h4g=DoxQ3_Huwx-ptuc6X4_BrfScKbPvy0VuYd-pEQ@mail.gmail.com>
On 19 August 2012 17:08, Javier Jardón <[email protected]> wrote:
> From 2f97ab5fed8fc0953d9dbe75c5b45c5b0c410f74 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Javier=20Jard=C3=B3n?= <[email protected]>
> Date: Sun, 19 Aug 2012 23:59:58 +0900
> Subject: [PATCH] autoreconf: Add checks for Gtk-Doc usage
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> Signed-off-by: Javier Jardón <[email protected]>
> ---
>  bin/autoreconf.in | 22 ++++++++++++++++++++++
>  lib/autom4te.in   |  1 +
>  2 files changed, 23 insertions(+)
>
> diff --git a/bin/autoreconf.in b/bin/autoreconf.in
> index acf25d4..1f5ff83 100644
> --- a/bin/autoreconf.in
> +++ b/bin/autoreconf.in
> @@ -114,6 +114,7 @@ my $aclocal    = $ENV{'ACLOCAL'}    || 'aclocal';
>  my $libtoolize = $ENV{'LIBTOOLIZE'} || 'libtoolize';
>  my $autopoint  = $ENV{'AUTOPOINT'}  || 'autopoint';
>  my $make       = $ENV{'MAKE'}       || 'make';
> +my $gtkdocize  = $ENV{'GTKDOCIZE'}  || 'gtkdocize';
>
>  # --install -- as --add-missing in other tools.
>  my $install = 0;
> @@ -206,6 +207,7 @@ sub parse_args ()
>        $automake   .= ' --add-missing';
>        $automake   .= ' --copy' unless $symlink;
>        $libtoolize .= ' --copy' unless $symlink;
> +      $gtkdocize  .= ' --copy' unless $symlink;
>      }
>    # --force;
>    if ($force)
> @@ -349,6 +351,24 @@ sub autoreconf_current_directory ()
>
>
>    # ------------------- #
> +  # Running gtkdocize   #
> +  # ------------------- #
> +
> +  if (!$uses_gtkdoc)
> +    {
> +      verb "$configure_ac: not using Gtk-Doc";
> +    }
> +  elsif (!$install)
> +    {
> +      verb "$configure_ac: not running gtkdocize: --install not given";
> +    }
> +  else
> +    {
> +      xsystem_hint ("gtkdocize is needed because this package uses
> Gtk-Doc", "$gtkdocize");
> +    }
> +
> +
> +  # ------------------- #
>    # Running autopoint.  #
>    # ------------------- #
>
> @@ -476,6 +496,7 @@ sub autoreconf_current_directory ()
>              'LT_CONFIG_LTDL_DIR',
>              'AM_GNU_GETTEXT',
>              'AM_INIT_AUTOMAKE',
> +            'GTK_DOC_CHECK',
>             )
>       . ' |');
>    while ($_ = $traces->getline)
> @@ -490,6 +511,7 @@ sub autoreconf_current_directory ()
>        $uses_libltdl = 1             if $macro eq "LT_CONFIG_LTDL_DIR";
>        $uses_autoheader = 1          if $macro eq "AC_CONFIG_HEADERS";
>        $uses_automake = 1            if $macro eq "AM_INIT_AUTOMAKE";
> +      $uses_gtkdoc = 1              if $macro eq "GTK_DOC_CHECK";
>        push @subdir, split (' ', $args[0])
>                                      if $macro eq "AC_CONFIG_SUBDIRS"
> && $recursive;
>      }
> diff --git a/lib/autom4te.in b/lib/autom4te.in
> index a560501..28e7732 100644
> --- a/lib/autom4te.in
> +++ b/lib/autom4te.in
> @@ -96,6 +96,7 @@ args: --preselect AC_PROG_LIBTOOL
>  args: --preselect LT_INIT
>  args: --preselect LT_CONFIG_LTDL_DIR
>  args: --preselect AM_GNU_GETTEXT
> +args: --preselect GTK_DOC_CHECK
>  end-language: "Autoreconf-preselections"
>
>
> --
> 1.7.11.2

Hi,

some time ago I sent the previous patch to add the gtk-doc check upstream.
I wonder if it can get a review?

Thanks,
-- 
Javier Jardón Cabezas
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.