diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2019-03-17 15:01:21 -0400 |
---|---|---|
committer | Zack Weinberg <zackw@panix.com> | 2020-08-18 08:44:13 -0400 |
commit | dd880a0a6de5602cdd40b770ed6b083b34aa0768 (patch) | |
tree | e490348f3860f71467b58640c2f919ae8824c7b1 /bin | |
parent | aba75f6d4a9c875a9d5d90a07c6b3678db66a4bf (diff) | |
download | autoconf-dd880a0a6de5602cdd40b770ed6b083b34aa0768.tar.gz |
autoreconf: integrate gtkdocize into the standard reconfiguration tools
When the GTK_DOC_CHECK macro is in use, this flags a given configure.ac
as belonging the the common class of gtk-related software that requires
the gtkdocize tool to be run before autoreconf, in order to install the
gtk-doc macro and Makefile fragment. Make this easier to accomplish via
teaching autoreconf how to detect and run this tool automatically; this
gets us one step closer to a world in which `autoreconf -fi` on its own
is enough to bootstrap any autotools project into a configurable state.
Diffstat (limited to 'bin')
-rw-r--r-- | bin/autoreconf.in | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/bin/autoreconf.in b/bin/autoreconf.in index 1ca11f28..14e12895 100644 --- a/bin/autoreconf.in +++ b/bin/autoreconf.in @@ -112,6 +112,7 @@ my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@'; my $automake = $ENV{'AUTOMAKE'} || 'automake'; my $aclocal = $ENV{'ACLOCAL'} || 'aclocal'; my $libtoolize = $ENV{'LIBTOOLIZE'} || 'libtoolize'; +my $gtkdocize = $ENV{'GTKDOCIZE'} || 'gtkdocize'; my $autopoint = $ENV{'AUTOPOINT'} || 'autopoint'; my $make = $ENV{'MAKE'} || 'make'; @@ -174,7 +175,8 @@ sub parse_args () for my $prog ($autoconf, $autoheader, $automake, $aclocal, $autopoint, - $libtoolize) + $libtoolize, + $gtkdocize) { xsystem ("$prog --version | sed 1q >&2"); print STDERR "\n"; @@ -200,6 +202,7 @@ sub parse_args () $automake .= ' --add-missing'; $automake .= ' --copy' unless $symlink; $libtoolize .= ' --copy' unless $symlink; + $gtkdocize .= ' --copy' unless $symlink; } # --force; if ($force) @@ -388,6 +391,7 @@ sub autoreconf_current_directory ($) my $aux_dir; my $uses_gettext_via_traces; my $uses_libtool; + my $uses_gtkdoc; my $uses_libltdl; my $uses_autoheader; my $uses_automake; @@ -409,6 +413,7 @@ sub autoreconf_current_directory ($) 'LT_CONFIG_LTDL_DIR', 'AM_GNU_GETTEXT', 'AM_INIT_AUTOMAKE', + 'GTK_DOC_CHECK', ) . ' |'); while ($_ = $traces->getline) @@ -424,6 +429,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; } @@ -481,7 +487,8 @@ sub autoreconf_current_directory ($) { $libtoolize .= " --ltdl"; } - xsystem_hint ("libtoolize is needed because this package uses Libtool", $libtoolize); + xsystem_hint ("libtoolize is needed because this package uses Libtool", + $libtoolize); $rerun_aclocal = 1; } else @@ -490,6 +497,25 @@ sub autoreconf_current_directory ($) } + # ------------------- # + # Running gtkdocize. # + # ------------------- # + + if (!$uses_gtkdoc) + { + verb "$configure_ac: not using Gtkdoc"; + } + elsif ($install) + { + xsystem_hint ("gtkdocize is needed because this package uses Gtkdoc", + $gtkdocize); + xsystem ($gtkdocize) + } + else + { + verb "$configure_ac: not running gtkdocize: --install not given"; + } + # ------------------- # # Rerunning aclocal. # |