Utilize gtkdocize(1) of gtk-doc-1.1.
[macros.git] / AutoGen.pm
index cad8cbf..f2e6978 100644 (file)
@@ -178,9 +178,11 @@ my($class,%args)=@_;
        my($specsrc)=map((-e $_ ? $_ : "$name.spec.in"),"$name.spec.m4.in");
        my $spec=_readfile $specsrc;
        $spec=~s/\\\n/ /gs;
+       my $configure_args=($spec=~/^[%]configure\b[ \t]*(.*)$/m)[0];
+       $configure_args=~s/--disable-gtk-doc\b/--enable-gtk-doc/g;      # optional; gtk-doc reqd for 'make dist'
        $class->run(%Options,
                        "ARGV"=>["--copy"],
-                       "configure_args"=>[split /\s+/,($spec=~/^[%]configure\b[ \t]*(.*)$/m)[0]],
+                       "configure_args"=>[split /\s+/,$configure_args],
                        );
        _remove "ChangeLog";    # force its rebuild by Makefile/rcs2log
        _system "make dist $name.spec";
@@ -259,11 +261,16 @@ sub _cleanfiles
                                                sgml*
                                                tmpl*
                                                html*
+                                               xml
                                                *.txt
                                                *.txt.bak
+                                               *.new
+                                               *.sgml
                                                *.args
                                                *.hierarchy
                                                *.signals
+                                               *.interfaces
+                                               *.prerequisites
                                                )); }),$Options{"gtk-doc-dir"}),
                                map((!$_ ? () : do { my $dir=$_; map("$dir/$_",qw(
                                                *.html